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

Pip-compile ignores environment-marked requirements in setup.py #946

Closed
ghost opened this issue Oct 15, 2019 · 2 comments
Closed

Pip-compile ignores environment-marked requirements in setup.py #946

ghost opened this issue Oct 15, 2019 · 2 comments
Labels
bug Something is not working duplicate Duplicate of an existing issue/PR

Comments

@ghost
Copy link

ghost commented Oct 15, 2019

Pip-compile ignores environment-marked requirements in setup.py's install_requires section, even when the condition succeeds. However, this does not happen when using a requirements.in file with the same requirements.

Environment Versions

  1. macOS Mojave
  2. Python version: 3.6.0
  3. pip version: 19.3
  4. pip-tools version: 4.2.0

Steps to replicate

  1. Create a requirements.in file with requests>1.0;python_version=='3.6'. Run pip-compile with Python 3.6 .
  2. In a separate folder, create a setup.py file with
from setuptools import setup
setup(
    name="my-package",
    install_requires=["requests>=1.0;python_version=='3.6'"],
)

Run pip-compile with Python 3.6 .

Expected result

#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile
#
certifi==2019.9.11        # via requests
chardet==3.0.4            # via requests
idna==2.8                 # via requests
requests==2.22.0 ; python_version == "3.6"
urllib3==1.25.6           # via requests

for both.

Actual result

The above for the requirements.in file, just the top comments (no actual requirements) for the setup.py file.

@atugushev
Copy link
Member

Hello @jbai14,

Thanks for the detailed issue! It duplicates #625.

@atugushev atugushev added bug Something is not working duplicate Duplicate of an existing issue/PR labels Oct 15, 2019
@ghost
Copy link
Author

ghost commented Oct 15, 2019

Ah, thanks! I'll close this then.

@ghost ghost closed this as completed Oct 15, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

1 participant