-
-
Notifications
You must be signed in to change notification settings - Fork 619
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
Refactor parsing setup.py in favour of pip install -e . #908
Comments
I believe there is another issue where it currently doesn't handle |
I think a new cli argument could do it. For example, |
That would definitely be helpful. I'm currently bumping up against |
UPDATE: added more use-cases to the issue:
|
we should update this document once jazzband/pip-tools#625 is fixed and/or jazzband/pip-tools#908 is merged Signed-off-by: Kefu Chai <[email protected]>
we should update this document once jazzband/pip-tools#625 is fixed and/or jazzband/pip-tools#908 is merged Signed-off-by: Kefu Chai <[email protected]>
we should update this document once jazzband/pip-tools#625 is fixed and/or jazzband/pip-tools#908 is merged Signed-off-by: Kefu Chai <[email protected]>
we should update this document once jazzband/pip-tools#625 is fixed and/or jazzband/pip-tools#908 is merged Signed-off-by: Kefu Chai <[email protected]>
we should update this document once jazzband/pip-tools#625 is fixed and/or jazzband/pip-tools#908 is merged Signed-off-by: Kefu Chai <[email protected]>
Since we drop the support of old pip versions (see #926) I think better to go for the alternative solution and use pip internals. |
EDIT: I wrote this whole thing, skipping this important part of the initial issue (sorry!):
I basically agree on the idea behind that, absolutely. At this point, I'd suggest to work on making piping ( Example: Original wall-of-text-below, still might be relevant info, will leave it there. Consider it an argument against directly processing I'll share what might be an unpopular and purist opinion: I really don't like the fact that we support My purist argument boils down to this article on In short: The distribution package is not the app. You don't need a For the case of the distribution package dev setup, to use dev-requirements.in:
and now your devs/contributors can run The point, once again, is to distinguish the distribution package from the thing you want to install, which is a list of concrete dependencies, which includes your package. When installing your package for dev, you don't run TL;DR This feature seems hard to get right (ex: support extras) because it tries to do the wrong job IMO. Should we remove that feature: I'd like to, but we might be doing more wrong than right. |
You've previously made your opinions / dislike of setup.py known. As I also previously mentioned, adding the package itself to There is considerable value to using setup.py to establish the baseline requirements, along with the requirements file being used for freezing the requirements according to that specific machine / ci workflow. I feel like the people who don't see the value to setup.py aren't actively making packages that use it. |
Thanks for the input, and bringing this previous mention:
I'm still not sure I see how adding the package itself to |
See my last comment in that thread It's a problem. Not sure why you haven't ran into this yet -- but I don't want my package getting added as a dependency of itself. It makes no sense! |
I do not usually use
Thinking about it over again, I guess I can see some example such as using @atugushev's idea of handling this via an equivalent to |
Thanks for taking the time to learn more about the issue. |
@vphilippon thanks for sharing your thoughts!
The idea of |
it may be better to use "pep517.meta.load" from |
One comment from the peanut gallery:
pip developers are generally not happy with others doing this. pip does not have an API, the devs have repeatedly stated so in several places [citation needed] and regardless, any solution regarding on pip internals will be very fragile. |
@astrojuanlu pip-tools makes heavy use of pip internals already |
The downside of using |
@jaraco agrees with @graingert pypa/setuptools#1951 (comment) And it seems to retain environment markers. |
Fix jazzband#908, first step towards addressing jazzband#1047.
Fix jazzband#908, first step towards addressing jazzband#1047.
What's the problem this feature will solve?
The current implementation of
pip-compile setup.py
doesn't handle the following use-cases and errors:setup.cfg
pyproject.toml
configThe solution based on
-e .
became "de facto" workaround, so why can't we handle it by pip-compile itself?Describe the solution you'd like
Instead of:
get dependencies using something like (consider bash onliner as a demonstration):
For example:
Alternative Solutions
Use pip's internal api to get dependencies from
setup.py
:But i found it challenging to maintain, especially for old pip versions.
Additional context
N/A
UPDATE 2020-05-16: The downside is that
-e .
solution loses the environment markers.The text was updated successfully, but these errors were encountered: