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

Allow manylinux wheels when resolving plugins. #5959

Merged
merged 1 commit into from
Jun 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/python/pants/backend/python/subsystems/python_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def register_options(cls, register):
'NOTE: this keyword is a temporary fix and will be reverted per: '
'https://github.com/pantsbuild/pants/issues/5696. The long term '
'solution is tracked by: https://github.com/pantsbuild/pex/issues/456.')
register('--resolver-use-manylinux', advanced=True, type=bool, default=True, fingerprint=True,
help='Whether to consider manylinux wheels when resolving requirements for linux '
'platforms.')

@property
def interpreter_constraints(self):
Expand Down Expand Up @@ -124,6 +127,10 @@ def resolver_allow_prereleases(self):
def resolver_blacklist(self):
return self.get_options().resolver_blacklist

@property
def use_manylinux(self):
return self.get_options().resolver_use_manylinux

@property
def artifact_cache_dir(self):
"""Note that this is unrelated to the general pants artifact cache."""
Expand Down
3 changes: 2 additions & 1 deletion src/python/pants/backend/python/tasks/pex_build_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def _resolve_multi(interpreter, requirements, platforms, find_links):
cache=requirements_cache_dir,
cache_ttl=python_setup.resolver_cache_ttl,
allow_prereleases=python_setup.resolver_allow_prereleases,
pkg_blacklist=python_setup.resolver_blacklist)
pkg_blacklist=python_setup.resolver_blacklist,
use_manylinux=python_setup.use_manylinux)

return distributions
5 changes: 4 additions & 1 deletion src/python/pants/init/plugin_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ def _resolve_plugins(self):
context=self._python_repos.get_network_context(),
cache=self.plugin_cache_dir,
cache_ttl=10 * 365 * 24 * 60 * 60, # Effectively never expire.
allow_prereleases=PANTS_SEMVER.is_prerelease)
allow_prereleases=PANTS_SEMVER.is_prerelease,
# Plugins will all depend on `pantsbuild.pants` which is distributed as
# a manylinux wheel.
use_manylinux=True)

@memoized_property
def plugin_cache_dir(self):
Expand Down