skipped/ignored packages' dependencies get installed
See original GitHub issueDescribe your environment
- OS Type: Windows 7
- Python version: 3.6.3
- Pipenv version: 8.3.2
Issue
Issue is that pipenv will install sub-dependencies when they are not actually needed. For example, when running pipenv install against a Pipfile which specifies celery = {version = “*”, os_name = “== ‘linux’”} in a Windows environment, celery does indeed get ignored, but all of celery’s dependencies get installed. After running the pipenv install command, I see Ignoring celery message, but I also see that amqp, billiard, kombu, pytz, and vine get installed.
This issue seems to be unique to Windows, as I tested this in Debian 8.7
Expected result
I expect nothing to be installed because “celery” is specified to be installed on Linux platform only.
Actual result
Celery dependencies get installed, even when celery is ignored.
Steps to replicate
- mkdir exampleenv
- cd exampleenv
- pipenv install
Creating a virtualenv for this project. Using base prefix ‘c:\python363-32’ New python executable in c:\dev\venvs\exampleenv-Ck4lzouS\Scripts\python.exe Installing setuptools, pip, wheel…done.
Virtualenv location: c:\dev\venvs\exampleenv-Ck4lzouS Creating a Pipfile for this project. Pipfile.lock not found, creating. Locking [dev-packages] dependencies. Locking [packages] dependencies. Updated Pipfile.lock (c23e27)! Installing dependencies from Pipfile.lock (c23e27). ================================ 0/0 - 00:00:00 To activate this project’s virtualenv, run the following: $ pipenv shell
- Edit Pipfile: celery = {version = “*”, os_name = “== ‘linux’”} (see below Pipfile)
- pipenv install
Pipfile.lock (c23e27) out of date, updating to (ddb95c). Locking [dev-packages] dependencies. Locking [packages] dependencies. Updated Pipfile.lock (ddb95c)! Installing dependencies from Pipfile.lock (ddb95c). Ignoring celery: markers ‘os_name == “linux”’ don’t match your environment ================================ 6/6 - 00:00:10 To activate this project’s virtualenv, run the following: $ pipenv shell
- pipenv run pip freeze (output below)
C:\dev\exampleenv>pipenv run pip freeze amqp==2.2.2 billiard==3.5.0.3 kombu==4.1.0 pytz==2017.3 vine==1.1.4
Pipfile contents
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
celery = {version = "*", os_name = "== 'linux'"}
[dev-packages]
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (14 by maintainers)
Top GitHub Comments
Looking at this now. We have to apply the markers to the deps when we lock the file. Currently the marker only gets applied to the package from the pipfile as seen above. Working on a fix now.
Huh, interesting. Good catch. This is gonna be a fun one… /cc @kennethreitz @vphillippon