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

setup.py dev requirements #1384

Closed
ehontoria opened this issue Apr 12, 2021 · 3 comments
Closed

setup.py dev requirements #1384

ehontoria opened this issue Apr 12, 2021 · 3 comments
Labels
question User question setuptools Related to compiling requirements with `setuptools` build backend

Comments

@ehontoria
Copy link

ehontoria commented Apr 12, 2021

Question

Hi folks!

Wondering how to use the setup.py extras_require feature for dev requirements rather than dev-requirements.in. I tried pip-compile --pip-args '-e ".[dev]"' but I didn't have any luck.

Example config

For example, I've got the following setup.py where pytest and freezegun are only required in a dev context:

setup(
    name='eng-incident',
    version=get_version(),
    packages=find_packages(exclude=['tests*']),
    provides=['core'],
    install_requires=[
        'flask==1.1.2',
        'requests==2.23.0',
        'slackclient==2.7.2',
        'sentry-sdk==0.19.4',
        'blinker==1.4',
        'pdpyras == 4.1.2',
        'statsd==3.3.0',
        'google-api-python-client==1.12.8',
        'google-auth-oauthlib==0.4.2',
        'google-auth-httplib2==0.0.4',
    ],
    extras_require={
        'dev': [
            'pytest==6.1.2',
            'freezegun==1.0.0',
        ]
    }
)

and I get the following requirements.txt which does not include pytest or freezegun at all:

#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile --pip-args='-e ".[dev]"'
#
--index-url https://dev-team-local:APAGdCdLMjKAwpZtuX2v5WZMwfpb5EUigavtCJTqj5trumPG2qr8yfzxZ9awgb2YjVxTCttj9PeDGcbiu4f2kM5zmQbWXDYUDkkZjh9@klaviyo.jfrog.io/klaviyo/api/pypi/pypi/simple

aiohttp==3.7.4.post0
    # via slackclient
async-timeout==3.0.1
    # via aiohttp
attrs==20.3.0
    # via aiohttp
blinker==1.4
    # via eng-incident (setup.py)
cachetools==4.2.1
    # via google-auth
certifi==2020.12.5
    # via
    #   requests
    #   sentry-sdk
chardet==3.0.4
    # via
    #   aiohttp
    #   requests
click==7.1.2
    # via flask
flask==1.1.2
    # via eng-incident (setup.py)
google-api-core==1.26.3
    # via google-api-python-client
google-api-python-client==1.12.8
    # via eng-incident (setup.py)
google-auth-httplib2==0.0.4
    # via
    #   eng-incident (setup.py)
    #   google-api-python-client
google-auth-oauthlib==0.4.2
    # via eng-incident (setup.py)
google-auth==1.28.1
    # via
    #   google-api-core
    #   google-api-python-client
    #   google-auth-httplib2
    #   google-auth-oauthlib
googleapis-common-protos==1.53.0
    # via google-api-core
httplib2==0.19.1
    # via
    #   google-api-python-client
    #   google-auth-httplib2
idna==2.10
    # via
    #   requests
    #   yarl
itsdangerous==1.1.0
    # via flask
jinja2==2.11.3
    # via flask
markupsafe==1.1.1
    # via jinja2
multidict==5.1.0
    # via
    #   aiohttp
    #   yarl
oauthlib==3.1.0
    # via requests-oauthlib
packaging==20.9
    # via google-api-core
pdpyras==4.1.2
    # via eng-incident (setup.py)
protobuf==3.15.8
    # via
    #   google-api-core
    #   googleapis-common-protos
pyasn1-modules==0.2.8
    # via google-auth
pyasn1==0.4.8
    # via
    #   pyasn1-modules
    #   rsa
pyparsing==2.4.7
    # via
    #   httplib2
    #   packaging
pytz==2021.1
    # via google-api-core
requests-oauthlib==1.3.0
    # via google-auth-oauthlib
requests==2.23.0
    # via
    #   eng-incident (setup.py)
    #   google-api-core
    #   pdpyras
    #   requests-oauthlib
rsa==4.7.2
    # via google-auth
sentry-sdk==0.19.4
    # via eng-incident (setup.py)
six==1.15.0
    # via
    #   google-api-core
    #   google-api-python-client
    #   google-auth
    #   google-auth-httplib2
    #   protobuf
slackclient==2.7.2
    # via eng-incident (setup.py)
statsd==3.3.0
    # via eng-incident (setup.py)
typing-extensions==3.7.4.3
    # via
    #   aiohttp
    #   yarl
uritemplate==3.0.1
    # via google-api-python-client
urllib3==1.25.11
    # via
    #   pdpyras
    #   requests
    #   sentry-sdk
werkzeug==1.0.1
    # via flask
yarl==1.6.3
    # via aiohttp

# The following packages are considered to be unsafe in a requirements file:
# setuptools
@atugushev atugushev added the question User question label Apr 13, 2021
@atugushev
Copy link
Member

Hello @ehontoria,

Thanks for the issue! The feature is on the way #1363.

@atugushev atugushev added the setuptools Related to compiling requirements with `setuptools` build backend label Apr 13, 2021
@atugushev
Copy link
Member

Closed in #1363

@atugushev
Copy link
Member

pip-tools v6.1.0 is released 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question User question setuptools Related to compiling requirements with `setuptools` build backend
Projects
None yet
Development

No branches or pull requests

2 participants