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

Fetching package info on non-pypa link #1179

Closed
Abhishek-Dev09-zz opened this issue Jul 13, 2020 · 7 comments
Closed

Fetching package info on non-pypa link #1179

Abhishek-Dev09-zz opened this issue Jul 13, 2020 · 7 comments
Labels
bug Something is not working hashes Related to hashes generated via --generate-hashes

Comments

@Abhishek-Dev09-zz
Copy link

Abhishek-Dev09-zz commented Jul 13, 2020

Environment Versions

  1. OS Type
  2. Python version: 3.6.8
  3. pip version: 20.1.1
  4. pip-tools version: 5.2.1

Steps to replicate

pip-compile --find-links=thirdparty --generate-hashes --index-url=https://github.com/nexB/scancode-toolkit/tree/develop/thirdparty

Actual result

Fetch package info from PyPI failed: https://github.com/nexB/scancode-toolkit/tree/develop/pypi/soupsieve/json: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /nexB/scancode-toolkit/tree/develop/pypi/soupsieve/json (Caused by ResponseError('too many 500 error responses',)) Couldn't get hashes from PyPI, fallback to hashing files Hashing soupsieve-1.9.2-py2.py3-none-any.whl pygments

Expected result - it would directly generate hash from file. For example-

Hashing soupsieve-1.9.2-py2.py3-none-any.whl pygments

@atugushev atugushev added the support User support label Jul 18, 2020
@atugushev
Copy link
Member

Hello @Abhishek-Dev09,

Thanks for the issue! That should work:

$ git clone https://github.com/nexB/scancode-toolkit
$ pip-compile --generate-hashes --find-links=scancode-toolkit/thirdparty 

@atugushev
Copy link
Member

You cannot pass GitHub tree URL to --index-url, see the doc:

Base URL of the Python Package Index (default https://pypi.org/simple). This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format.

@Abhishek-Dev09-zz
Copy link
Author

Abhishek-Dev09-zz commented Jul 18, 2020

Hello @Abhishek-Dev09,

Thanks for the issue! That should work:

$ git clone https://github.com/nexB/scancode-toolkit
$ pip-compile --generate-hashes --find-links=scancode-toolkit/thirdparty 

@atugushev : Thanks, But I do not want hashing from pypi instead it fetches from find-links options because deps of my requirenment.txt is not available on pypi.

@atugushev
Copy link
Member

@Abhishek-Dev09

Ah, I see your point. A package, let's say, six from --find-links=./links/ gets its hashes from PyPI, but it should get hashes from a file ./links/six-1.10.tar.gz. in links directory. Thanks!

@atugushev atugushev added bug Something is not working hashes Related to hashes generated via --generate-hashes and removed support User support labels Jul 26, 2020
@Abhishek-Dev09-zz
Copy link
Author

@Abhishek-Dev09

Ah, I see your point. A package, let's say, six from --find-links=./links/ gets its hashes from PyPI, but it should get hashes from a file ./links/six-1.10.tar.gz. in links directory. Thanks!

@atugushev : Yes, you understand my point.

@Abhishek-Dev09-zz
Copy link
Author

Abhishek-Dev09-zz commented Jul 27, 2020

@pombredanne As we are dependent on this tools , soon this bug will be solved , then it get hash directly from wheel in 1st attempt only instead first from pypi then from wheel file in second attempt.

@atugushev
Copy link
Member

Hashing packages from find links was fixed in #1723.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working hashes Related to hashes generated via --generate-hashes
Projects
None yet
Development

No branches or pull requests

2 participants