-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with pip : pip-compile does not support URLs as packages #272
Comments
What is the reasoning behind pip-tools not supporting URLs for non-editable installs? Is it possible to introduce a switch to override this behaviour? For me, It would be great if pip-tools supported non-editable installs from Github repositories. I'd be happy to help implementing this, if you agree. |
There's no reason preventing it per se, it's just not been implemented. The main thing that's tricky is to figure out how to distill the dependencies from it, and what name the package ends up with locally when you install it. You cannot derive these properties from the URL itself, you'll need to download the package, unpack it, inspect it. So there's definitely some work involved. If you feel brave, I invite you to try and add it to pip-tools, it'd be a cool feature :) |
Thanks for the quick reply! I naively thought we could delegate most of this work to pip :) I will see if I can come up with a solution. |
I wonder if an easier short-term solution would be to allow it to pass-through certain lines to the final Maybe a |
Sounds like a great idea to me. I never got around to come up with a real solution. This would solve my use-cases and should be reasonably easy to implement. |
It looks like there would have to be a corresponding |
#405 is related, I think? |
“The main thing that's tricky is to figure out how to distill the dependencies from it” The same issue exists with editable requirements (#466). “and what name the package ends up with locally when you install it” This could be solved with the same syntax as editable reqs: add #egg=requirement-name |
This is a temporary hack until our django-logging-json fixed gets patched upstream. There are some tickets relating to this in pip-compile: jazzband/pip-tools#272 Honestly, I dont have the time bandwidth to investigate for this issue. The work-around is to not really take advantage of pip-compile for the time being which I think is a fine trade-off to get stuff working.
This is a temporary hack until our django-logging-json fixed gets patched upstream. There are some tickets relating to this in pip-compile: jazzband/pip-tools#272 Honestly, I dont have the time bandwidth to investigate for this issue. The work-around is to not really take advantage of pip-compile for the time being which I think is a fine trade-off to get stuff working.
Here is a PoC for this. Do you think I can continue and make a PR with this kind of stuff ? from io import BytesIO
from zipfile import ZipFile
import mock
import setuptools
try: # python 3
from urllib.request import urlopen
except: # python 2
from urllib import urlopen
url = 'https://github.com/django/django/archive/master.zip'
zipfile = ZipFile(BytesIO(urlopen(url).read()))
for f in zipfile.namelist():
if f == 'setup.py' or f.endswith('/setup.py'):
setupfile = f
break
with mock.patch.object(setuptools, 'setup') as mock_setup:
exec(zipfile.open(setupfile).read(), {})
_, kwargs = mock_setup.call_args
assert 'pytz' in kwargs['install_requires'] |
Hum, no. We should use |
Any update on this, could this perhaps be merged? |
Is there any news with this? seems like pip-compile-multi isn't covering URL as its based upon pip-compile.. |
I'm feeling this lack, as well. I was trying to follow a good compile/sync flow, but either they fail if I specify a patch branch for one of my dependencies, or they uninstall my dependency and reinstall the broken pypi version. |
I'm using
pip
withpip-compile
(installed this way:pip install pip-tools
)I got the following error when I run the
pip-compile -v
command:I have tried with the
-e
option, but this causes another problem.Below is an short extract of my
requirements.in
file:I'm using Docker container based on the
python:2.7-slim
image.The
requirements.in
work well on one other similar docker container.I don't know why on mine,
pip-compile
does not work...Have you any idea?
I case of bad use of pip, I have open a ticket on stackoverflow : http://stackoverflow.com/questions/34267352/error-with-pip-pip-compile-does-not-support-urls-as-packages
The text was updated successfully, but these errors were encountered: