witty-crayon-22786
09/18/2017, 9:56 PMrough-minister-58256
09/18/2017, 10:14 PMrough-minister-58256
09/18/2017, 10:15 PMrough-minister-58256
09/18/2017, 10:16 PMrough-minister-58256
09/18/2017, 10:18 PM--- a/src/python/pants/init/plugin_resolver.py
+++ b/src/python/pants/init/plugin_resolver.py
@@ -11,7 +11,7 @@ import os
from pex import resolver
from pex.base import requirement_is_exact
-from pex.package import EggPackage, SourcePackage
+from pex.package import EggPackage, SourcePackage, WheelPackage
from pkg_resources import working_set as global_working_set
from pkg_resources import Requirement
@@ -79,7 +79,7 @@ class PluginResolver(object):
# When bootstrapping plugins without the full pants python backend machinery in-play, we are not
# guaranteed a properly initialized interpreter with wheel support so we enforce eggs only for
# bdists with this custom precedence.
- precedence = (EggPackage, SourcePackage)
+ precedence = (WheelPackage, EggPackage, SourcePackage)
<http://logger.info|logger.info>('Resolving new plugins...:\n {}'.format('\n '.join(self._plugin_requirements)))
return resolver.resolve(self._plugin_requirements,
fetchers=self._python_repos.get_fetchers(),
witty-crayon-22786
09/18/2017, 10:44 PMwitty-crayon-22786
09/18/2017, 10:45 PMrough-minister-58256
09/18/2017, 11:05 PMrough-minister-58256
09/18/2017, 11:05 PMrough-minister-58256
09/18/2017, 11:15 PMimport wheel
in a try/except block and erroring with something along the lines of ‘please install wheel’witty-crayon-22786
09/18/2017, 11:17 PMwitty-crayon-22786
09/18/2017, 11:18 PMwitty-crayon-22786
09/18/2017, 11:34 PMwheel
in the venv
?witty-crayon-22786
09/18/2017, 11:35 PM$ gr 'wheel' 3rdparty/python/
3rdparty/python//requirements.txt:wheel==0.29.0
isn't sufficient to ensure that pants has wheel on the path though...witty-crayon-22786
09/18/2017, 11:35 PMwitty-crayon-22786
09/18/2017, 11:40 PMwitty-crayon-22786
09/18/2017, 11:54 PMrough-minister-58256
09/18/2017, 11:56 PMwheel
installed before handwitty-crayon-22786
09/18/2017, 11:56 PMrough-minister-58256
09/18/2017, 11:56 PMrough-minister-58256
09/18/2017, 11:57 PMwitty-crayon-22786
09/19/2017, 12:14 AMwitty-crayon-22786
09/19/2017, 12:20 AMwitty-crayon-22786
09/19/2017, 6:52 PMwhl
is actually loaded? does wheel inject itself into python module resolution such that it will actually load one right off the path? the result of the resolution seems to be a whl
file on the PYTHONPATH, which is then not loadedrough-minister-58256
09/19/2017, 6:53 PMrough-minister-58256
09/19/2017, 6:54 PMwitty-crayon-22786
09/20/2017, 12:23 AMpantsbuild.pants.contrib.android-1.4.0.dev13.tar.gz
contains the relevant __init__.py
files for pants.contrib.android
to do the right thing. but the wheel that ends up on the path (i guess due to the pex resolver converting the tar.gz into a whl) does not contain __init__.py
fileswitty-crayon-22786
09/20/2017, 12:24 AMrough-minister-58256
09/20/2017, 12:25 AMpython setup.py bdist_wheel
witty-crayon-22786
09/20/2017, 12:25 AM