Skip to content
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

How to cache dependencies installed via setup.py #282

Closed
steveoh opened this issue Nov 25, 2021 · 4 comments
Closed

How to cache dependencies installed via setup.py #282

steveoh opened this issue Nov 25, 2021 · 4 comments
Labels
question Further information is requested

Comments

@steveoh
Copy link

steveoh commented Nov 25, 2021

cache: pip looks for a requirements.txt file. Is it possible to cache from pip when installing a module from a setup.py?

@steveoh steveoh added feature request New feature or request to improve the current logic needs triage labels Nov 25, 2021
@dmitry-shibanov dmitry-shibanov added question Further information is requested and removed feature request New feature or request to improve the current logic needs triage labels Nov 25, 2021
@dmitry-shibanov
Copy link
Contributor

Hello @steveoh. Thank you for your report. If you want to use cache for pip, but you do not have requirements.txt you can use cache-dependency-path to override file is used for generating hash key. You can try to use this snippet.

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.9'
        cache: pip
        cache-dependency-path: setup.py # or **/setup.py

@dmitry-shibanov
Copy link
Contributor

Hello @steveoh. Does it work for you ?

@steveoh
Copy link
Author

steveoh commented Nov 27, 2021

I'm sure it will if the file is used for cache key generating.

@dmitry-shibanov
Copy link
Contributor

Hello @steveoh. Thank you for your response.
I'm closing the issue. If you have any concerns feel free to ping us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants