Pipenv: Installing pytest via requirements.txt on Python 2 does not install required funcsigs

Created on 21 Dec 2017  路  2Comments  路  Source: pypa/pipenv

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.

Most helpful comment

I just submitted a PR for Pytest 馃

All 2 comments

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!

I just submitted a PR for Pytest 馃

Was this page helpful?
0 / 5 - 0 ratings