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

Fix whl.py for Windows #195

Open
wants to merge 1 commit into
base: master
from
Open

Conversation

@meteorcloudy
Copy link
Member

@meteorcloudy meteorcloudy commented Jun 17, 2019

Related #2

@meteorcloudy
Copy link
Member Author

@meteorcloudy meteorcloudy commented Jun 17, 2019

I did some investigation on enabling rules_python on Windows.
Building ... was still failing with:

pcloudy@pcloudy0-w MSYS ~/workspace/rules_python
$ bazel build ...
DEBUG: C:/src/tmp/i6sxytkk/external/bazel_skylib/skylark_library.bzl:23:1: WARNING: skylark_library.bzl is deprecated and will go away in the future, please use bzl_library.bzl instead.
ERROR: C:/tools/msys64/home/pcloudy/workspace/rules_python/examples/extras/BUILD:21:1: Traceback (most recent call last):
        File "C:/tools/msys64/home/pcloudy/workspace/rules_python/examples/extras/BUILD", line 21
                py_test(name = "extras_test", srcs = ["ext..."], <2 more arguments>)
        File "C:/tools/msys64/home/pcloudy/workspace/rules_python/examples/extras/BUILD", line 27, in py_test
                requirement("googleapis-common-protos[grpc]")
        File "C:/src/tmp/i6sxytkk/external/examples_extras/requirements.bzl", line 218, in requirement
                fail(("Could not find pip-provided de...))
Could not find pip-provided dependency: 'googleapis-common-protos[grpc]'
ERROR: package contains errors: examples/extras
ERROR: error loading package 'examples/extras': Package 'examples/extras' contains errors
INFO: Elapsed time: 21.908s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

The root cause is googleapis_common_protos-1.6.0-py2-none-any.whl doesn't contain a metadata.json file so that it fell back to parsing the METADATA file, which didn't implement parsing for extras. This PR solves this for extras, but as the comment said, we probably need to deal with other attributes as well.

@mattmoor @brandjon

@meteorcloudy
Copy link
Member Author

@meteorcloudy meteorcloudy commented Jun 17, 2019

I didn't strictly build the par files in the docker. If that is required, I can revert the binaries change and someone else can help me update them. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.