Skip to content
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

Installing pytest via requirements.txt on Python 2 does not install required funcsigs #1229

Closed
davehunt opened this issue Dec 21, 2017 · 2 comments

Comments

@davehunt
Copy link
Contributor

davehunt commented Dec 21, 2017

When installing pytest via an imported requirements.txt on Python2, the extra requirement of funcsigs is not installed.

Describe your environment
  1. OS: macOS High Sierra 10.13.2
  2. Python version: 2.7.13
  3. Pipenv version: 9.0.1
Expected result

funcsigs should be installed

Actual result

funcsigs is not installed

Steps to replicate
cd $(mktemp -d)
echo pytest > requirements.txt
pipenv --two install -r requirements.txt

When running pipenv graph the output shows that funcsigs is a dependency, but no version is installed: funcsigs [required: Any, installed: ?].

Note that using the command pipenv --two install pytest to install pytest directly instead of via a requirements.txt file installs funcsigs as expected. The dependency is specified in pytest here.

@techalchemy
Copy link
Member

Hi @davehunt thanks for the report. This issue is related to dependency resolution across python versions when pipenv is installed using one version of python but your virtualenv is created using another. Usually this works just fine, but occasionally when pipenv is installed with, say, python3, the resolver can have trouble resolving python2 dependencies when they are specified in extras_require. The setuptools packaging documentation recommends using this syntax instead:

 install_requires=[
     'enum34;python_version<"3.4"',
]

I would recommend submitting a PR to pytest to fix this in order for the pip-tools resolver to pick it up, but the rest of the resolver issues are being tracked over in #857 so I'm going to go ahead and close this out for now. Thanks for the detailed report and the link to the relevant setup.py and thanks for using pipenv!

@uranusjr
Copy link
Member

uranusjr commented Jan 9, 2018

I just submitted a PR for Pytest 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants