-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
pipenv seemingly not respecting conditional install_requires #2586
Comments
Hi, sorry for the inconvenience. Unfortunately Pipenv only supports the latest environment marker spec, and requires the library to specify conditions in Please help push ruamel.yaml to revert to the 0.15.0 syntax instead. Closing as a duplicate to… many others. #1229 is one. |
Isn't #1229 the opposite of this issue? What I described above is that ruamel.yaml 0.15.0, the version that uses install_requires, does not respect the python2.7 condition. If pipenv requires the library to specify conditions in install_requires, then shouldn't 0.15.0 be the version that builds correctly, and not 0.15.1? |
Err, sorry, I misunderstood what ruamel.yaml did in 0.15.0. Let me try to get this straight. So there are mainly three ways packages do to specify conditional dependencies:
Pipenv only supports the last option. ruamel.yaml 0.15.0 was using option 1 (I thought it was using 3, hence the confusion), and after 0.15.1 it is using option 2, which is not supported. For Pipenv to work correctly, it needs to upgrade to use option 3. So no, it should revert back to the old way. But it should also need to upgrade to the new, recommended way. |
That makes more sense. Thanks. |
Thanks, this was pretty helpful! I ran into this same issue while trying to migrate to pipenv. Since I'm locked into an older version of ruamel.yaml, my workaround was to use PEP 508 specifiers from the pipenv docs to mirror the py27 requirement in the Pipfile. Pipfile snippet:
pipenv install output:
|
Issue description
When trying to install
ruamel.yaml==0.15.0
using Python 3.6, pipenv tries to build ruamel.ordereddict even though this package is only a dependency for Python 2.7. Interestingly though, pipenv does not attempt to build ruamel.ordereddict when installingruamel.yaml==0.15.1
, which changed the way the dependency is defined:ruamel.yaml 0.15.0 - __init__.py
ruamel.yaml 0.15.1 - __init__.py
I'm not terribly familiar with python dependencies, but I've never seen them defined as in ruamel.yaml 0.15.0, so I'm thinking that may be the issue.
Expected result
pipenv not to attempt to build ruamel.ordereddict when running Python 3.6.
Actual result
pipenv tries to build ruamel.ordereddict, which is an issue since the ordereddict package is not only not required when running Python 3.6, but it doesn't even build :-(.
Steps to replicate
or just run
pipenv install
with pipfile included below.$ pipenv --support
Pipenv version:
'2018.7.1'
Pipenv location:
'/usr/local/lib/python3.7/site-packages/pipenv'
Python location:
'/usr/local/opt/python/bin/python3.7'
Other Python installations in
PATH
:2.7
:/usr/local/bin/python2.7
2.7
:/usr/local/bin/python2.7
2.7
:/usr/bin/python2.7
3.7
:/usr/local/bin/python3.7m
3.7
:/usr/local/bin/python3.7
2.7.15
:/usr/local/bin/python
2.7.10
:/usr/bin/python
2.7.15
:/usr/local/bin/python2
3.7.0
:/usr/local/bin/python3
PEP 508 Information:
System environment variables:
LC_ALL
NVM_DIR
LANG
XPC_FLAGS
HISTIGNORE
HISTCONTROL
HISTTIMEFORMAT
PYENV_ROOT
OLDPWD
TERM_SESSION_ID
EDITOR
COLORTERM
NVM_CD_FLAGS
__CF_USER_TEXT_ENCODING
ITERM_SESSION_ID
PYTHONIOENCODING
SSH_AUTH_SOCK
NODE_REPL_HISTORY_SIZE
USER
LSCOLORS
PWD
MANPAGER
HOME
TERM_PROGRAM
TERM_PROGRAM_VERSION
Apple_PubSub_Socket_Render
ITERM_PROFILE
LESS_TERMCAP_md
LESS_TERMCAP_me
TMPDIR
XPC_SERVICE_NAME
TERM
SHELL
NVM_BIN
SHLVL
COLORFGBG
PROMPT_COMMAND
LOGNAME
PATH
PS1
PS2
PS4
HISTSIZE
HISTFILESIZE
_
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/Users/newtonne/.nvm/versions/node/v8.11.3/bin:/Users/newtonne/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHELL
:/usr/local/bin/bash
EDITOR
:vim
LANG
:en_US
PWD
:/Users/newtonne/Downloads/test
Contents of
Pipfile
('/Users/newtonne/Downloads/test/Pipfile'):Contents of
Pipfile.lock
('/Users/newtonne/Downloads/test/Pipfile.lock'):The text was updated successfully, but these errors were encountered: