-
Notifications
You must be signed in to change notification settings - Fork 115
Fetching dependencies assumes python2 #42
Comments
Fun fact: According to https://github.com/google/oauth2client, " The recommended replacement is |
Do you know when python3 will be officially supported? We're stuck on a really old version of Bazel since the newer versions of Bazel run these rules with whatever you have your py_runtime set to. |
@mytran try setting the |
@mytran actually that helped only for building the image, but it still failed while trying to push the image. Here's another workaround:
By putting that hacky path first in the PATH variable, bazel and all it's dependency will see the symling python which is python2. |
I got stuck on building the container_image. Hit a snag with the debian packages in container_image
|
I've run into that urlparse error, as well, when trying to build containers with bazel's rules_docker library. (See bazelbuild/rules_docker#293) |
#85 brought python 3 support and there is a PR for rules_docker (bazelbuild/rules_docker#449), so can this be closed now? |
@Globegitter I do not believe this should be closed yet, as the puller.par is still produced with the python2-only httplib2 mentioned in the body of the issue: Line 20 in 2f1cfd3
Despite #85 and bazelbuild/rules_docker#449, users that attempt to run bazel with Python 3 will still be unable to pull images. For example, I get the following:
|
+cc @deft-code |
One step forward seems close here: |
Specifically, see this line:
containerregistry/def.bzl
Line 20 in 60a61ec
The
httplib2
package ships two separate trees for python 2/3 compat, and we are exclusively using thepython2
tree. This means that if a user is trying to run this code under python 3, it will fail, since that tree is not compatible with python3.I'm not sure the right answer here. In an ideal world, Bazel would expose the python version to us, and we could include the right tree based on that. Perhaps we could fix bazelbuild/rules_python#33 and then use
pip
to import these dependencies, rather than fetching the archives directly.Alternatively, we could move from
httplib2
tourllib
(or the python 2/3 compatible version insix.moves.urllib
), but it turns out thatoauth2client
also useshttplib2
, so we'd still need it for transitive dependency resolution.Until this is fixed, it is unlikely that python 3 users can use these rules.
The text was updated successfully, but these errors were encountered: