Remove references to six (#9096)

We no longer support Python 2 and therefore no longer need to depend on
six. I'm hoping this will make it possible to merge #8214.
pull/9097/head
Adam Cozzette 3 years ago committed by GitHub
parent 3881f49ce9
commit f8a22b45c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      BUILD
  2. 1
      Makefile.am
  3. 2
      kokoro/linux/aarch64/python_run_tests_with_qemu_aarch64.sh
  4. 1
      kokoro/release/python/windows/build_artifacts.bat
  5. 8
      protobuf_deps.bzl
  6. 2
      third_party/BUILD
  7. 19
      third_party/six.BUILD

@ -954,7 +954,6 @@ py_proto_library(
protoc = ":protoc",
py_libs = [
":python_srcs",
"@six//:six",
],
srcs_version = "PY2AND3",
visibility = ["//visibility:public"],

@ -1426,7 +1426,6 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \
examples/pubspec.yaml \
protobuf.bzl \
protobuf_deps.bzl \
third_party/six.BUILD \
third_party/zlib.BUILD \
util/python/BUILD \
internal.bzl

@ -7,7 +7,7 @@ cd $(dirname $0)/../../..
cd python
PYTHON="/opt/python/cp38-cp38/bin/python"
${PYTHON} -m pip install --user six pytest auditwheel
${PYTHON} -m pip install --user pytest auditwheel
# check that we are really using aarch64 python
(${PYTHON} -c 'import sysconfig; print(sysconfig.get_platform())' | grep -q "linux-aarch64") || (echo "Wrong python platform, needs to be aarch64 python."; exit 1)

@ -9,7 +9,6 @@ set PACKAGE_NAME=protobuf
set REPO_DIR=protobuf
set BUILD_DLL=OFF
set UNICODE=ON
set PB_TEST_DEP="six==1.9"
set OTHER_TEST_DEP="setuptools==38.5.1"
set OLD_PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%

@ -24,14 +24,6 @@ def protobuf_deps():
urls = ["https://github.com/madler/zlib/archive/v1.2.11.tar.gz"],
)
if not native.existing_rule("six"):
http_archive(
name = "six",
build_file = "@com_google_protobuf//:third_party/six.BUILD",
sha256 = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73",
urls = ["https://pypi.python.org/packages/source/s/six/six-1.12.0.tar.gz"],
)
if not native.existing_rule("rules_cc"):
http_archive(
name = "rules_cc",

2
third_party/BUILD vendored

@ -1 +1 @@
exports_files(["six.BUILD", "zlib.BUILD"])
exports_files(["zlib.BUILD"])

@ -1,19 +0,0 @@
load("@rules_python//python:defs.bzl", "py_library")
# Consume `six.py` as `__init__.py` for compatibility
# with `--incompatible_default_to_explicit_init_py`.
# https://github.com/protocolbuffers/protobuf/pull/6795#issuecomment-546060749
# https://github.com/bazelbuild/bazel/issues/10076
genrule(
name = "copy_six",
srcs = ["six-1.12.0/six.py"],
outs = ["__init__.py"],
cmd = "cp $< $(@)",
)
py_library(
name = "six",
srcs = ["__init__.py"],
srcs_version = "PY2AND3",
visibility = ["//visibility:public"],
)
Loading…
Cancel
Save