-
Notifications
You must be signed in to change notification settings - Fork 619
Change pip default cache path to **/pyproject.toml
#529
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
Comments
Hi @flying-sheep, we will take a loot at this. |
Hello @flying-sheep. The action uses |
The only problem with that is that the pure existence of Maybe we change the abstraction to be smarter (or more flexible) than the combination of |
In this case I think you should specify multiple files in For now I'm going to close the issue. |
why? my point is that pyproject.toml is the standard way to specify dependencies in Python. requirements.txt is not. It’s an old convention. The default settings should support the standard. Supporting the old convention should be second priority. |
In this case we can use my previous suggestion and change logic to use |
Sure, if that’s how you want to do it. I think once a standard python lockfile exists, we can get rid of
I’m curious: Why did you do that? This issue is neither fixed nor invalid. |
I closed the issue related to your previous comment. As I understood you'd like to introducing changes for parsing both files to get metadata and identify which file should be used for hash. For more complex caching logic it's better to use actions/cache that is why I closed it. For now I'm going to reopen it. |
+1, |
…on is looking for Waiting on actions/setup-python#529
…on is looking for Waiting on actions/setup-python#529
This would be a nice feature/fix 👍 New projects using the PEP 621 standard for packaging metadata will have to duplicate their dependencies in the non-standard I agree with @Conchylicultor about indicating this in the docs, as well. |
Although the current Python packaging standard now uses pyproject.toml, GitHub Actions currently does not support that. Hence I include a requirements.txt file. Discussion: actions/setup-python#529
The docs on this are confusing. I read this readme section as saying I don't manually have to specify
The error for not setting
|
My bad, just saw this was added recently but not released yet. |
@flying-sheep i am closing the issue because the PR #604 has been merged and will be available on the next action release. It is possible to use the change before the release with
Please feel free reopen this issue or create another one in case if the problem still exists |
sounds good to me! |
I think you should pin this issue. I had the same issue and it took a bit to find this. |
Description:
requirements.txt
is a convention. The only existing standard for where to specify Python dependencies is PEP 621Related to #502, but not following standards is IMHO a bug, not a missing feature.
Action version:
v4
Platform, Runner type, Tools version:
N/A
Repro steps:
Create a standard Python project, e.g. via
hatch new
or by following the official tutorial: https://packaging.python.org/en/latest/tutorials/packaging-projects/Expected behavior:
The default path(s) should end with
pyproject.toml
.An option would be to be smart about it and only consider
pyproject.toml
if it contains aproject.dependencies
array.Actual behavior:
The default cache path is
**/requirements.txt
.The text was updated successfully, but these errors were encountered: