-
-
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 install with platform markers doesn't work #2378
Comments
Hm yep, that seems like it would be a thing that happens. Another unfortunate consequence of some early lack of foresight about how much command line interaction requirements parsing might take for pipfiles. |
This actually now works (as of the /t/test pipenv install "nsenter ; platform_system == 'Linux'"
Installing nsenter ; platform_system == 'Linux'...
Collecting nsenter
Downloading https://files.pythonhosted.org/packages/8d/6d/65e257cd8cc42a68894292e28c8d25dcb5a6b8f959cfdd8c69cdc555efd1/nsenter-0.2-py3-none-any.whl
Collecting contextlib2 (from nsenter)
Downloading https://files.pythonhosted.org/packages/a2/71/8273a7eeed0aff6a854237ab5453bc9aa67deb49df4832801c21f0ff3782/contextlib2-0.5.5-py2.py3-none-any.whl
Collecting pathlib (from nsenter)
Downloading https://files.pythonhosted.org/packages/ac/aa/9b065a76b9af472437a0059f77e8f962fe350438b927cb80184c32f075eb/pathlib-1.0.1.tar.gz (49kB)
Collecting argparse (from nsenter)
Downloading https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl
Building wheels for collected packages: pathlib
Running setup.py bdist_wheel for pathlib: started
Running setup.py bdist_wheel for pathlib: finished with status 'done'
Stored in directory: /home/hawk/.cache/pipenv/wheels/f9/b2/4a/68efdfe5093638a9918bd1bb734af625526e849487200aa171
Successfully built pathlib
Installing collected packages: contextlib2, pathlib, argparse, nsenter
Successfully installed argparse-1.4.0 contextlib2-0.5.5 nsenter-0.2 pathlib-1.0.1
Adding nsenter ; platform_system == 'Linux' to Pipfile's [packages]...
Pipfile.lock (fe220f) out of date, updating to (29cc54)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Updated Pipfile.lock (29cc54)!
Installing dependencies from Pipfile.lock (29cc54)...
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 12/12 — 00:00:01
To activate this project's virtualenv, run pipenv shell.
Alternativaly, run a command inside the virtualenv with pipenv run. grep -A6 nsenter Pipfile.lock
"nsenter": {
"hashes": [
"sha256:876a18cb03de85948e4cd72fd4cfda4879561b7264f5722603f6437d452a25cb",
"sha256:d44ba70199f9b454139f2093141e63218bca5b1285c65fcf6e4b139116088867"
],
"index": "pypi",
"markers": "platform_system == 'Linux'", |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the issue briefly here.
I want to install a package with platform-specific markers, for example by doing:
pipenv install "nsenter ; platform_system == 'Linux'"
This doesn't work (raises an exception). When doing this with
pipenv install -r requirements.txt
, the package is installed, ignoring the markers.I'm showing Windows output below, but the same behavior happens on Linux as well.
Please run
$ python -m pipenv.help
, and paste the results here.$ python -m pipenv.help output
Pipenv version:
'2018.05.18'
Pipenv location:
'C:\\Python36\\lib\\site-packages\\pipenv'
Python location:
'C:\\Python36\\python.exe'
Other Python installations in
PATH
:2.7
:C:\Python27-64\python.exe
3.6
:C:\Python36\python.exe
3.6.5
:C:\Python36\python.exe
2.7.12
:C:\Python27-64\python.exe
3.6.5
:C:\Windows\py.exe
PEP 508 Information:
System environment variables:
ALLUSERSPROFILE
APPDATA
COMMONPROGRAMFILES
COMMONPROGRAMFILES(X86)
COMMONPROGRAMW6432
COMPUTERNAME
COMSPEC
DRIVERDATA
FPS_BROWSER_APP_PROFILE_STRING
FPS_BROWSER_USER_PROFILE_STRING
FP_NO_HOST_CHECK
HOMEDRIVE
HOMEPATH
LOCALAPPDATA
LOGONSERVER
MOZ_PLUGIN_PATH
NUMBER_OF_PROCESSORS
ONEDRIVE
OS
PATH
PATHEXT
PROCESSOR_ARCHITECTURE
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
PROGRAMDATA
PROGRAMFILES
PROGRAMFILES(X86)
PROGRAMW6432
PROMPT
PSMODULEPATH
PUBLIC
QT_OPENGL
SESSIONNAME
SYSTEMDRIVE
SYSTEMROOT
TEMP
TMP
USERDOMAIN
USERDOMAIN_ROAMINGPROFILE
USERNAME
USERPROFILE
VBOX_MSI_INSTALL_PATH
VS110COMNTOOLS
VS120COMNTOOLS
VS140COMNTOOLS
WINDIR
_NT_SYMBOL_PATH
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:C:\Python36\Scripts\;C:\Python36\;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\ProgramData\Oracle\Java\javapath;C:\Python27-64\;C:\Python27-64\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files (x86)\WinSCP\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\OpenVPN\bin;C:\Program Files\Git\cmd;C:\WINDOWS\Syst;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\CMake\bin;C:\Users\Yoni\AppData\Local\Microsoft\WindowsApps;
Contents of
Pipfile
('C:\Temp\blahtest\Pipfile'):Contents of
Pipfile.lock
('C:\Temp\blahtest\Pipfile.lock'):Expected result
I expected the Pipfile to be populated with the line
nsenter = { version = "*", markers = "platform_system == 'Linux'" }
, and the package to be installed or not installed based the platform.Actual result
When not using requirements.txt, I got this exception:
When using
pipenv install -r requirements.txt
, it just installed the package, ignoring the platform marker, and addednsenter = "*"
to the Pipfile. The contents of my requirements.txt are:nsenter ; platform_system == 'Linux'
Steps to replicate
Option 1:
Option 2:
The text was updated successfully, but these errors were encountered: