-
Notifications
You must be signed in to change notification settings - Fork 3.1k
pip install from package from github, with github dependencies #3610
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Try running the install command with |
@pfmoore Sorry for the mention on a completely unrelated issue. I think this issue can be safely tagged as |
Oh sorry, I missed the reply. I tried |
Sure. Could you give me a quick summary of your situation? I'd like to see what can be done... |
--process-dependency-links doesn't work for me: After this message the installation attempts to look for my dependency package in pypi. |
@dneise Were you able to get this to work? I remember hearing that git dependencies don't work when you're installing from git. So if you |
@dan-coates Can you point us to where you heard that? It might explain my current problem. |
The problem is the format of your link: dependency_links=[
'git+https://github.com/fact-project/smart_fact_crawler.git#egg=smart_fact_crawler'
], change to this, then run pip with --process-dependency-links:
The reason is contrary to the documentation, pip needs:
|
@garywu 's solution helped me. Didn't find any mention of having to specify a version in each dependency link in the docs. I can confirm that in v9.0.1 pip does need a version number, but does not require a |
@dneise Thanks for your thorough research and detailed sharing, it helps me a lot. |
Is there anything actionable here? |
@dneise You asked, is there a better way? I've given up on this "-e" / "dependency_links" approach because (1) the problem has been going on for a long time, and (2) even if it's fixed, it won't apply to many versions of pip in common use. The solution I'm using is to publish the package to a private PyPi-style repo and use a normal pip install that's made aware of the private repo in addition to the main PyPi repo. This requires the user to add an "--extra-index-url" param on the pip install command line, or an "extra-index-url" param in one of the pip config files. Downside: extra params / config. Upside: it works. The downside is not so bad if you add the new param to a config file, since that's set-and-forget. I chose Gemfury as my repo service - there are several others to consider. |
install sslyze from the master branch on GitHub. No version of sslyze in PyPI currently has the cryptography version fix from @egyptiankarim, so we are forced to do this in order to get pshtt and domain-scan to play nicely together. (domain-scan needs the newer version of cryptography.)
Please don't deprecate This work for our scenario:
requirements.txt
setup.py
|
@hnykda Putting dependency links in I believe dependency links were deprecated in favor of PEP 508 support, which was merged into pip on 2/5/2017 and will be included in the v10 release. Searching the issues of this repo for "dependency links" should provide plenty of other information. Since the release cadence for pip is rather slow I imagine you could use dependency links to try out the PEP 508 support before the v10 release by pointing to master. |
@pamolloy Thanks, good point. Having standard I understood that |
We only use Python for a very small number of projects. Up until very recently we were using git submodules to track dependencies. The Oddly enough it looks like if you have a |
PEP 508 looked good until I learned its implementation merged to pip is good for nothing.
|
To avoid having to install using a bash script, we can specify a version of prompt_toolkit and provide the github branch tarball for 2.0 as a dependency link. This means when installing with pip install sml-sync --process-dependency-links, pip will install prompt toolkit from the github repo. This means we can close the bitbucket repo.
I'll close this a duplicate of #4187; the discussion on this issue ended up going in that direction. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description:
The story goes like this: We wrote a little app shifthelper, which calls us on the phone, in case our experiment (a telescope on a remote island) has a problem. Then we found that part of the app, should be pulled out as a library smart_fact_crawler, since other apps for the same experiment might be able to use it.
Neither the little app nor the little library are on pypi, since we strongly believe only about 20 people in the world can use it, which we all know. At the same time the repos are of course public github repos.
We would like to enable our non-developer friends to be able to install the app (including all dependencies) without prior explicit cloning it. Basically we want the installation to be a one-liner.
What already works:
One can pip install the dependency first and then install the app, like this:
Or one can clone the repo of the app only, pip install the
requirements.txt
and then pip install the app like so:What I've run:
I searched the web and found the "dependency_links" keyword argument for
setuptools.setup()
. Although I also found comments here and there, telling that this feature is to be considered depricated and might vanish soon.So I've put this into the
setup.py
of the appAnd tried to install the app like this:
but pip complained like this in friendly red letters ;-)
My question now is:
Is maybe my entire approach wrong as in: What you are trying is not usually the way people work. You should instead try: ...
Related SO questions are:
The text was updated successfully, but these errors were encountered: