Skip to content

pipenv install -r requirements.txt not respecting sys_platform #6101

@777aker

Description

@777aker

Issue description

sys_platform not working in requirements.txt. It is ignoring the sys_platform flag and putting packages in regardless of platform.

Expected result

python-magic-bin; sys_platform == 'win32' should produce a pipfile that looks something like python-magic-bin = {version = "*", markers = "sys_platform == 'win32'"}

Actual result

Pipfile shows python-magic-bin = "*"

### Steps to replicate
file requirements.txt 
---
-r requirements-compliance.txt
---

file requirements-compliance.txt
---
python-magic-bin; sys_platform == 'win32'
---

command
---
pipenv install -r requirements.txt
---

$ pipenv --support

Pipenv version: '2023.3.20'

Pipenv location: '/pyenv/versions/3.11.5/lib/python3.11/site-packages/pipenv'

Python location: '/pyenv/versions/3.11.5/bin/python3.11'

OS Name: 'posix'

User pip version: '23.0.1'

user Python installations found:

  • 3.11.5: /pyenv/versions/3.11.5/bin/python3
  • 3.11.5: /pyenv/versions/3.11.5/bin/python
  • 3.11.5: /pyenv/versions/3.11.5/bin/python3
  • 3.10.12: /usr/bin/python3
  • 3.10.12: /bin/python3
  • 3.7.17: /pyenv/versions/3.7.17/bin/python3.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.11.5',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '6.5.0-21-generic',
 'platform_system': 'Linux',
 'platform_version': '#21~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb  9 '
                     '13:32:52 UTC 2',
 'python_full_version': '3.11.5',
 'python_version': '3.11',
 'sys_platform': 'linux'}

System environment variables:

  • SHELL
  • SESSION_MANAGER
  • QT_ACCESSIBILITY
  • PIPENV_VENV_IN_PROJECT
  • COLORTERM
  • PYENV_SHELL
  • XDG_CONFIG_DIRS
  • SSH_AGENT_LAUNCHER
  • XDG_MENU_PREFIX
  • TERM_PROGRAM_VERSION
  • GNOME_DESKTOP_SESSION_ID
  • GNOME_SHELL_SESSION_MODE
  • SSH_AUTH_SOCK
  • XMODIFIERS
  • DESKTOP_SESSION
  • NO_AT_BRIDGE
  • EDITOR
  • GTK_MODULES
  • PWD
  • KRB5CCNAME
  • XDG_SESSION_DESKTOP
  • LOGNAME
  • XDG_SESSION_TYPE
  • SYSTEMD_EXEC_PID
  • XAUTHORITY
  • VSCODE_GIT_ASKPASS_NODE
  • HOME
  • USERNAME
  • IM_CONFIG_PHASE
  • LANG
  • LS_COLORS
  • XDG_CURRENT_DESKTOP
  • VTE_VERSION
  • WAYLAND_DISPLAY
  • GIT_ASKPASS
  • GNOME_TERMINAL_SCREEN
  • CHROME_DESKTOP
  • VSCODE_GIT_ASKPASS_EXTRA_ARGS
  • GNOME_SETUP_DISPLAY
  • LESSCLOSE
  • XDG_SESSION_CLASS
  • TERM
  • LESSOPEN
  • USER
  • VSCODE_GIT_IPC_HANDLE
  • GNOME_TERMINAL_SERVICE
  • DISPLAY
  • SHLVL
  • QT_IM_MODULE
  • XDG_RUNTIME_DIR
  • PYENV_ROOT
  • VSCODE_GIT_ASKPASS_MAIN
  • XDG_DATA_DIRS
  • GDK_BACKEND
  • PATH
  • GDMSESSION
  • ORIGINAL_XDG_CURRENT_DESKTOP
  • DBUS_SESSION_BUS_ADDRESS
  • PIPENV_TEST_INDEX
  • OLDPWD
  • GOPATH
  • TERM_PROGRAM
  • _
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PIP_PYTHON_PATH
  • PYTHONDONTWRITEBYTECODE
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

  • PIPENV_VENV_IN_PROJECT: 1
  • PIPENV_TEST_INDEX: https://pypi.firstrf.com/simple

Debug–specific environment variables:

  • PATH: /pyenv/versions/3.11.5/bin:/pyenv/shims:/pyenv/bin:/home/mkelley/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/go/bin:/home/mkelley/go/bin:/home/mkelley/.local/bin:/usr/local/go/bin:/home/mkelley/go/bin:/home/mkelley/.local/bin
  • SHELL: /bin/bash
  • EDITOR: /usr/bin/vim
  • LANG: en_US.UTF-8
  • PWD: /home/mkelley/Desktop/piperror

Contents of Pipfile ('/home/mkelley/Desktop/piperror/Pipfile'):

[[source]]
url = "https://pypi.firstrf.com/simple"
verify_ssl = true
name = "pip_conf_index_global"

[packages]
python-magic-bin = "*"

[dev-packages]

[requires]
python_version = "3.7"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Contributor CandidateThe issue has been identified/triaged and contributions are welcomed/encouraged.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions