cool-easter-32542
05/04/2023, 7:56 PMpex3 lock create -o lxml.lock --platform macosx_13_0_x86_64-cp-39-cp39 --no-allow-pip-version-fallback --pip-version 23.1.2 --resolver-version pip-2020-resolver --find-links '<https://zmanji.github.io/lxml-macos-wheel-builder/>' lxml
I can successfully export this lock file to pip format by running:
pex3 lock export lxml.lock
The output is:
lxml==4.9.2 \
--hash=sha256:d9ac0c02be96069ebf052c5a45b13feec487b5f31b6f071ae3acc728e7047d1a
However placing the above in requirements.txt and running pip install -r requirements.txt results in
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
This is because pip will fetch lxml-4.9.2.tar.gz from pypi for macosx_13_0_x86_64-cp-39-cp39 and will not look at my custom find links url.
The only work around I see is to remember the resolver options passed to pex and pass them to pip again.
I tried another work around which was to build a pex from the lockfile and then extract the wheels to a local directory to pass to pip but the extracted wheels have a different checksum than what was recorded in the lockfile.
What is the recommended to get pip to consume a lockfile that references a custom url?
pantsbuild/pexcool-easter-32542
05/04/2023, 10:54 PM