-
-
Notifications
You must be signed in to change notification settings - Fork 705
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
setup.py does not play nicely with pipenv #525
Comments
Well… I can understand the problem and I'd like to solve it, but I don't understand how |
I have not tested this in setup.py, but my understanding is that you should be able to use the environment markers in https://hynek.me/articles/conditional-python-dependencies/ discusses using them in setup.py in If I've understood correctly, you can remove the bit checking
|
Looks good to me, thanks for the hint! |
No problem, I'm glad to see that it works. Working on getting several projects migrated over to using pipenv has definitely been a bit of a learning experience. I just did a bit more digging and while you may not want to rely on it just yet due to newness, it appears setuptools 36.2.0 added the ability to use the environment markers within |
With the new pipenv, which is recommended by python.org now, there are issues with using os.sys_version in setup.py to determine which dependencies to install.
It appears that since pipenv technically runs in your main python environment rather than inside the virtualenv it manages, setup.py detects that python version. So for example I use python 3.6 as my main python, but have a few legacy projects which are on 2.7 for now. If I use pipenv then weasyprint's setup.py sees python 3.6 in os.sys_version and sets an incorrect version of CairSVG in the requirements.
Would it be possible to use the
extras_require
feature of setuptools 18.0 and up to handle the conditional dependency?Please also see https://github.com/kennethreitz/pipenv/issues/924
The text was updated successfully, but these errors were encountered: