Buck can't use Python Wheels (.whl) as binary_src for prebuilt_python_library because _markerlib isn't vendored
Created by: borgstrom
When I build with a whl file as a dependency:
prebuilt_python_library(
name='click',
binary_src='click-6.6-py2.py3-none-any.whl',
visibility=['PUBLIC']
)
I get the following traceback:
Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 314, in execute
File ".bootstrap/_pex/pex.py", line 78, in _activate
File ".bootstrap/_pex/environment.py", line 132, in activate
File ".bootstrap/_pex/environment.py", line 184, in _activate
File ".bootstrap/_pex/environment.py", line 147, in _resolve
File ".bootstrap/pkg_resources/__init__.py", line 854, in resolve
File ".bootstrap/pkg_resources/__init__.py", line 2617, in requires
File ".bootstrap/pkg_resources/__init__.py", line 2818, in _dep_map
File ".bootstrap/pkg_resources/__init__.py", line 2835, in _compute_dependencies
ImportError: No module named _markerlib
In the vendored copy of setuptools we've only kept the pkg_resources resource, but we need to also vendor _markerlib from the 18.5 tree: https://github.com/pypa/setuptools/tree/18.5/_markerlib
This can be fixed by adding _markerlib to our copy of setuptools and then wiring up _markerlib the same as pkg_resources in make_pex.py.
copy_package(pex_builder, '_markerlib', prefix=pex_builder.BOOTSTRAP_DIR)