question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change pip default cache path to `**/pyproject.toml`

See original GitHub issue

Description: 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:open
  • Created a year ago
  • Reactions:4
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dmitry-shibanovcommented, Oct 25, 2022

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.

0reactions
Conchylicultorcommented, Nov 22, 2022

+1, actions/setup-python should support the official Python packaging standard (PEP 621 & cie). At minima, the doc should indicate usage when using pyproject.toml based-dependencies.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found