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

Make pip-compile compatible with parse_requirements() from setuptools #1280

Open
jwygoda opened this issue Dec 29, 2020 · 2 comments
Open

Make pip-compile compatible with parse_requirements() from setuptools #1280

jwygoda opened this issue Dec 29, 2020 · 2 comments
Labels
feature Request for a new feature setuptools Related to compiling requirements with `setuptools` build backend

Comments

@jwygoda
Copy link

jwygoda commented Dec 29, 2020

What's the problem this feature will solve?

I'd like pip-compile to be compatible with parse_requirements from setuptools. It doesn't support multiple line continuations in hashes.

Describe the solution you'd like

I'd like to add a cli option to generate hashes without line continuations. Would patch with additional cli option be accepted?

Alternative Solutions

  • Use sed ':a;N;$!ba;s/\\\n/ /g' requirements.txt before passing requirements to parse_requirements.
  • Convince setuptools maintainers to support multiple line continuations in requirements files.

Additional context

pypa/setuptools#2422

@jwygoda jwygoda changed the title Allow hashing without multiple line continuations Make pip-compile compatible with setuptools Dec 29, 2020
@atugushev atugushev added the setuptools Related to compiling requirements with `setuptools` build backend label Dec 30, 2020
@atugushev
Copy link
Member

Hello @jwygoda,

Thanks for the issue! Currently, pip-compile is compatible with pip's requirements file format (see related discussion in #1063). While I'm not sure it should support parse_requirements from setuptools also, but I'd like to see how would be resolved pypa/setuptools#2422 issue.

@atugushev atugushev changed the title Make pip-compile compatible with setuptools Make pip-compile compatible with parse_requirements() from setuptools Dec 30, 2020
@atugushev atugushev added the feature Request for a new feature label Dec 30, 2020
@jwygoda
Copy link
Author

jwygoda commented Dec 30, 2020

Hi @atugushev,
Your link to the requirements file format was really helpful, thanks. I'll follow up on it in setuptools issue.

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 setuptools Related to compiling requirements with `setuptools` build backend
Projects
None yet
Development

No branches or pull requests

2 participants