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

pex fails to resolve wheels when a sdist is present in the cache #608

Closed
sitaktif opened this issue Oct 24, 2018 · 0 comments · Fixed by #788
Closed

pex fails to resolve wheels when a sdist is present in the cache #608

sitaktif opened this issue Oct 24, 2018 · 0 comments · Fixed by #788
Assignees

Comments

@sitaktif
Copy link

sitaktif commented Oct 24, 2018

When the source dist for a package is present in the cache, pex will not try to resolve the wheel for that package. Removing the source dist from the cache will allow pex to work as expected.

# Clear the cache
rm ~/.pex/build/*

# Download the source dist and put it into the cache
curl -Lo ~/.pex/build/cryptography-2.3.1.tar.gz https://pypi.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz#sha256=8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6

# Try to create the pex (optionally provide a platform that your local machine cannot build for)
pex cryptography==2.3.1 -vvv --platform linux_x86_64-cp-27-cp27mu -o foo.pex

# Notice that it tries to build the source dist into a pex (and if you are targeting a different platform,  fails with):
# pex.resolver.Untranslateable: Package
# SourcePackage('file:///Users/rchossart/.pex/build/cryptography-2.3.1.tar.gz')
# is not translateable by ChainedTranslator(WheelTranslator, EggTranslator, SourceTranslator)

# Remove the source dist from the cache
rm ~/.pex/build/cryptography-2.3.1.tar.gz

# Try to create the pex again
pex cryptography -vvv --platform linux_x86_64-cp-27-cp27mu -o foo.pex

# Notice that it succeeds
ls foo.pex
# --> foo.pex

Expected behaviour:

I would expect pex to first look for an existing wheel in pypi before trying to create one from the local source distribution.

@jsirois jsirois mentioned this issue Nov 3, 2018
@jsirois jsirois mentioned this issue Dec 6, 2018
@jsirois jsirois mentioned this issue Jan 23, 2019
3 tasks
@jsirois jsirois mentioned this issue Feb 6, 2019
2 tasks
@jsirois jsirois mentioned this issue Mar 10, 2019
3 tasks
@jsirois jsirois self-assigned this Nov 14, 2019
jsirois added a commit that referenced this issue Nov 14, 2019
This changes Pex to vendor pip and defer all resolution and building to it.

As part of this change some ambiguous and / or broken features were changed and APIs adjusted:
+ The egg distribution format is no longer supported.
+ The deprecated `--interpreter-cache-dir` CLI option was removed.
+ The `--cache-ttl` CLI option and `cache_ttl` resolver API argument were removed.
+ The resolver API replaced `fetchers` with a list of `indexes` and a list of `find_links` repos.
+ The resolver API removed (http) `context` which is now automatically handled.
+ The resolver API removed `precedence` which is now pip default precedence - wheels when available and not ruled out via the `--no-wheel` CLI option or `use_wheel=False` API argument.
+ The `--platform` CLI option and `platform` resolver API argument now must be full platform strings that include platform, implementation, version and abi; e.g.: `--platform=macosx-10.13-x86_64-cp-36-m`.
+ The `--manylinux` CLI option and `use_manylinux` resolver API argument were removed. Instead, to resolve manylinux wheels for a foreign platform, specify the manylinux platform to use with an explicit `--platform` CLI flag or `platform` resolver API argument; e.g.: `--platform=manylinux2010-x86_64-cp-36-m`.

Fixes #781

Additionally:
Fixes #771
Fixes #763
Fixes #761
Fixes #735 
Fixes #694 
Fixes #660
Fixes #658 
Fixes #642
Fixes #641
Fixes #628
Fixes #620
Fixes #614
Fixes #611
Fixes #608
Fixes #439
Fixes #415
Fixes #387
Fixes #315
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants