Change pip default cache path to `**/pyproject.toml`
See original GitHub issueDescription:
requirements.txt
is a convention. The only existing standard for where to specify Python dependencies is PEP 621
Related 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 a project.dependencies
array.
Actual behavior:
The default cache path is **/requirements.txt
.
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Cache pip dependencies from pyproject.toml file ... - GitHub
The action uses requirements.txt file to generate hash for the primary key. You can override this file with cache-dependency-path.
Read more >Caching - pip documentation v22.3.1
pip provides an on-by-default caching, designed to reduce the amount of time spent on duplicate downloads and builds.
Read more >Change directory of pip cache on Linux? - Stack Overflow
You should be using pip 's --cache-dir <dir> command line argument ... defaults to match your needs, including alternative location of cache ......
Read more >Configuration | Documentation | Poetry - Python dependency ...
To change or otherwise add a new configuration setting, you can pass a value after ... poetry config virtualenvs.path /path/to/cache/directory/virtualenvs.
Read more >Options - cibuildwheel - Read the Docs
You can configure cibuildwheel with a config file, such as pyproject.toml . ... Set the tool to use to build, either "pip" (default...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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,
actions/setup-python
should support the official Python packaging standard (PEP 621 & cie). At minima, the doc should indicate usage when usingpyproject.toml
based-dependencies.