-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Rename install-requires.txt
to version_requirements.txt
#36999
Conversation
7b4e7b1
to
e990ab1
Compare
e990ab1
to
c629905
Compare
c629905
to
e40b113
Compare
e40b113
to
ea199e4
Compare
There it is "dependencies"? |
That's right. The term "install-requires" has been eliminated. |
Then you made up the name "version_requirements.txt", instead of using "dependencies.txt"? |
That's right. |
(we may come up with a name better than both, but I have no idea now...) |
it needs to end with "_requirements.txt" so that GitHub finds it (see link in PR description). I didn't have a better idea what to stick in front. |
Simply "install_requirements.txt"? |
I cannot come up with an obviously better name than "version_requirements.txt". This file is about version requirements on dependencies (pip packages on pypi). So other possible names are "dependency_requirements.txt" or "pip_requirements.txt". No strong opinion anyway... |
I still don't get why we cannot just use Same format, essentially the same purpose, ease of conversion to pip package. If there is any need to prepend |
Perhaps because an spkg is not a python package? |
Another suggestion: "package_requirements". |
These are Python packages we are talking about, these which are vendored by Sage, i.e. made into spkg packaged as tarfiles or wheels. Package names in If it's a standard package, it's an illegal operation under the current policy; as you know I called a sage-devel vote on changing this policy... |
I agree that "requirements.txt" seems the best choice. According to the developer guide, presence of "requirements.txt" is used to differentiate "pip" spkg from "normal" and "wheel" spkg. How about using presence of "checksums.ini" for this purpose? Do I miss something? Is there other reason that "requirements.txt" cannot be a choice? |
@dimpase I explained it to you in #37401 (comment); complete the review there, please |
Yes, that's right.
This could be done (best after the refactoring in #36740, which needs review), but I would still not use Edit: The part of #36740 needed for that is now split out as #37430 (needs review) |
But you can use version ranges too in the file.
Yes. But as far as I understand, Anyway, "version-requirements.txt" is slightly different from "requirements.txt". I feel that "version" prefix emphasizes the version too much: "the spkg requires the version(?)"... |
I should have written: |
In Python packaging, one distinguishes "abstract dependencies" (install-requires) vs "concrete dependencies" (requirements.txt). See e.g. https://martin-thoma.com/python-requirements/#abstract-dependencies That's why using the name |
No, that's not a good way of viewing the relation of the spkg and the pip package. The spkg does not "depend" on it. It "represents" it. I chose the name "install-requires.txt" to mean: If a Python distribution needs to declare this package as an "install-requires", use the contents of this file for it. And that's what is done when we create By the way, we are also generating "pkgs/*/requirements.txt" files such as |
Thanks for the read. I see now why you reject the name
This explains why I got confused. The name "install-requires.txt" cannot be explained within spkg context. You see the spkg as a "dependency" of the Python distribution, and the content of Now the Python distribution uses |
Exactly that. "install-requires" was an idiosyncratic name only used for one purpose in Python packaging, and hence it was unambiguous. "dependencies" is not just already used, it's also too generic. |
I'm posting to record a vote of -1 on behalf of Tobias Diez. |
It seems to me the dispute is really about the naming. In any case we need to move from the current name +1 for me. |
Still +1 from me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on @kwankyu's suggestion and discussion by the new Code of Conduct Committee, I'm setting this ticket to Needs Review so that all the disputed tickets start with a clean slate prior to being update based on voting. Starting at midnight US/Pacific time tonight anyone involved should feel free to set the status to positive review or needs review in accordance with the new policy. |
Please try building from a clean checkout, I'm getting lots of |
eb18a90
to
51f9539
Compare
…sion_requirements.txt
…ires.txt ]; then git mv install-requires.txt version_requirements.txt; fi); done
…equires.txt ]; then git mv install-requires.txt version_requirements.txt; fi); done
…_requirements.txt
4547dfe
to
918448a
Compare
…nts.txt` <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> As discussed in sagemath#36982: - the name "install-requires" has become outdated with the transition to the new names set by the `pyproject.toml` format (see https://setupto ols.pypa.io/en/latest/userguide/dependency_management.html#declaring- required-dependency, compare the tabs "pyproject.toml" vs. "setup.cfg") - this will help with sagemath#35890, as GitHub will be able to just read the `version_requirements.txt` files sagemath#36982 (comment) Notes for reviewers: - **This is a simple, limited-scope improvement and not intended as a long-term commitment to the format of the files in build/pkgs/....** - PRs sagemath#37430, sagemath#37350, sagemath#36740 remove direct access to build/pkgs in favor of using the sage_bootstrap API (sage --package). <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> - Depends on sagemath#37401 <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36999 Reported by: Matthias Köppe Reviewer(s): Dima Pasechnik, Kwankyu Lee, Nathan Dunfield
Documentation preview for this PR (built with commit 918448a; changes) is ready! 🎉 |
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> [python-flint](https://github.com/flintlib/python-flint) is an optional dependency of the upcoming SymPy 1.13 (https://groups.google.com/g/sympy/c/S3LL7hYvD_A) @oscarbenjamin See also - sagemath#36641 <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> - Depends on sagemath#37222 - Depends on sagemath#36999 (merged here) <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#37224 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee, Matthias Köppe
As discussed in #36982:
pyproject.toml
format (see https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#declaring-required-dependency, compare the tabs "pyproject.toml" vs. "setup.cfg")version_requirements.txt
files#36982 (comment)
Notes for reviewers:
bootstrap
,bootstrap-conda
,m4/sage_spkg_collect.m4
,sage-spkg-info
throughsage --package properties
,sage-get-system-packages
#37430,sage -package dependencies
#37350, Refactorbootstrap-conda
,m4/sage_spkg_collect.m4
through sage-package; handledependencies_build
#36740 remove direct access to build/pkgs in favor of using the sage_bootstrap API (sage --package).📝 Checklist
⌛ Dependencies