You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ok, I think I understand the error now, but not sure how to fix.
Normal installation of the wheel package installs a Python command for bdist_wheel. Wheel construction seems to rely on the capacity to shell out to:
/usr/bin/python -u -c "..." bdist_wheel -d ...
However, because we don't have pip or wheel installed on the system, this assumption is bad.
I'm not sure how this would work in a virtualenv for instance, but perhaps we could make the context of a {par,py}_binary look like a virtualenv to subprocesses and somehow communicate this kind of tool installation from the whl_library to the py_binary (through py_library hops)?
@duggelz I'd appreciate your thoughts on this (no rush).
pkg_resources seems to load package information via a convoluted process around sys.path_hooks (docs).
Exploring this in a Bazel context (py_test) I see that sys.path_hooks basically has a single hook: zipimport.zipimporter.
Interestingly pkg_resources.resource_filename works fine in py_test, but I know @duggelz has indicated pkg_resources doesn't like some of the games Bazel / Python plays.
Activity
mattmoor commentedon Sep 22, 2017
It looks like this starts working once
pip
is installed on the system.mattmoor commentedon Sep 22, 2017
Ok, I think I understand the error now, but not sure how to fix.
Normal installation of the
wheel
package installs a Python command forbdist_wheel
. Wheel construction seems to rely on the capacity to shell out to:/usr/bin/python -u -c "..." bdist_wheel -d ...
However, because we don't have
pip
orwheel
installed on the system, this assumption is bad.I'm not sure how this would work in a
virtualenv
for instance, but perhaps we could make the context of a{par,py}_binary
look like avirtualenv
to subprocesses and somehow communicate this kind of tool installation from thewhl_library
to thepy_binary
(throughpy_library
hops)?@duggelz I'd appreciate your thoughts on this (no rush).
mattmoor commentedon Oct 11, 2017
@duggelz if you are around, I'd appreciate any thoughts you might have in this space.
mattmoor commentedon Oct 12, 2017
Here's where this is configured in
setup.py
: https://github.com/pypa/wheel/blob/master/setup.py#L54mattmoor commentedon Oct 12, 2017
The
wheel
's.whl
has the following inmetadata.json
:mattmoor commentedon Oct 12, 2017
Watching this crazy video on how
virtualenv
works... :)mattmoor commentedon Oct 12, 2017
I think this comes down to:
Which should show:
mattmoor commentedon Oct 12, 2017
pkg_resources
seems to load package information via a convoluted process aroundsys.path_hooks
(docs).Exploring this in a Bazel context (
py_test
) I see thatsys.path_hooks
basically has a single hook:zipimport.zipimporter
.Interestingly
pkg_resources.resource_filename
works fine inpy_test
, but I know @duggelz has indicatedpkg_resources
doesn't like some of the games Bazel / Python plays.mattmoor commentedon Oct 12, 2017
Hmm, within the context of the
version_test.py
, if I addwheel==0.30.0a0
torequirements.txt
and if I add:... to the test, I get the right
Distribution
s of everything...I'll try putting this into a PAR, and if all else fails having that PAR invoke a little python script.
mattmoor commentedon Oct 12, 2017
Woof, so this is
py_binary
vs.par_binary
.If you clone the
par-kour
branch on my fork:16 remaining items