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

Request: direct integration with setup.py install_requires #1640

Open
jamesbraza opened this issue Jun 22, 2022 · 0 comments
Open

Request: direct integration with setup.py install_requires #1640

jamesbraza opened this issue Jun 22, 2022 · 0 comments
Labels
feature Request for a new feature

Comments

@jamesbraza
Copy link

What's the problem this feature will solve?

I really like the flexibility pip-compile provides for inputting a requirements.in and outputting a requirements.txt that also pins dependencies.

Unfortunately, my company doesn't use requirements.txt, we solely center on setuptools.setup's install_requires=["pgk==1.0.0", ...] for our internal packages. So direct use of pip-compile will not out-of-the-box work for us.

One possible workaround is to use requirements.in with pip-compile and have setuptools.setup read from the generated requirements.txt as described here (simple) or here (advanced).

However, this is a workaround and requires:

  • Deviation from our setup.py-only workflow
  • DIY parsing of a requirements.txt

Describe the solution you'd like

I would like to see pip-compile somehow directly integrate with setuptools.setup's install_requires.

The main benefit is enabling a new workflow: stay close to a package's setup.py (and not adding an extra indirection: the inclusion + parsing of a requirements.txt file).

One possible solution is enabling pip-compile to be input a requirements.in with a flag (e.g. --to-setup path/to/setup.py) that, instead of creating a requirements.txt will update the install_requires inside of a setup.py (or alternately a pyproject.toml, for future users).

Alternative Solutions

I have read a bunch of issues here, and I believe this request hasn't been made before.

Additional context

n/a

@atugushev atugushev added the feature Request for a new feature label Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants