remove obsolete scripts for python wheels (#8250)

Nowadays, this seems to be script where python wheels are being built:
https://github.com/protocolbuffers/protobuf/blob/ac63e80/kokoro/release/python/linux/build_artifacts.sh

Removing the obsolete scripts to avoid confusion.
pull/8256/head
Jan Tattermusch 4 years ago committed by GitHub
parent ac63e80bbb
commit aa13fde017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Makefile.am
  2. 6
      python/release/wheel/Dockerfile
  3. 17
      python/release/wheel/README.md
  4. 27
      python/release/wheel/build_wheel_manylinux.sh
  5. 66
      python/release/wheel/protobuf_optimized_pip.sh

@ -1397,10 +1397,6 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \
examples/pubspec.yaml \ examples/pubspec.yaml \
protobuf.bzl \ protobuf.bzl \
protobuf_deps.bzl \ protobuf_deps.bzl \
python/release/wheel/build_wheel_manylinux.sh \
python/release/wheel/Dockerfile \
python/release/wheel/protobuf_optimized_pip.sh \
python/release/wheel/README.md \
third_party/six.BUILD \ third_party/six.BUILD \
third_party/zlib.BUILD \ third_party/zlib.BUILD \
third_party/wyhash/LICENSE \ third_party/wyhash/LICENSE \

@ -1,6 +0,0 @@
FROM quay.io/pypa/manylinux1_x86_64
RUN yum install -y libtool
RUN /opt/python/cp27-cp27mu/bin/pip install twine
COPY protobuf_optimized_pip.sh /

@ -1,17 +0,0 @@
Description
------------------------------
This directory is used to build released wheels according to PEP513 and upload
them to pypi.
Usage
------------------------------
For example, to release 3.3.0:
./protobuf_optimized_pip.sh 3.3.0 PYPI_USERNAME PYPI_PASSWORD
Structure
------------------------------
| Source | Source |
|--------------------------------------|---------------------------------------------------|
| protobuf_optimized_pip.sh | Entry point. Calling Dockerfile and build_wheel_manylinux.sh |
| Dockerfile | Build docker image according to PEP513. |
| build_wheel_manylinux.sh | Build wheel packages in the docker container. |

@ -1,27 +0,0 @@
#!/bin/bash
# Print usage and fail.
function usage() {
echo "Usage: protobuf_optimized_pip.sh PROTOBUF_VERSION PYPI_USERNAME PYPI_PASSWORD" >&2
exit 1 # Causes caller to exit because we use -e.
}
# Validate arguments.
if [ $0 != ./build_wheel_manylinux.sh ]; then
echo "Please run this script from the directory in which it is located." >&2
exit 1
fi
if [ $# -lt 3 ]; then
usage
exit 1
fi
PROTOBUF_VERSION=$1
PYPI_USERNAME=$2
PYPI_PASSWORD=$3
docker rmi protobuf-python-wheel
docker build . -t protobuf-python-wheel
docker run --rm protobuf-python-wheel ./protobuf_optimized_pip.sh $PROTOBUF_VERSION $PYPI_USERNAME $PYPI_PASSWORD
docker rmi protobuf-python-wheel

@ -1,66 +0,0 @@
#!/usr/bin/env bash
# DO NOT use this script manually! Called by docker.
set -ex
# Print usage and fail.
function usage() {
echo "Usage: protobuf_optimized_pip.sh PROTOBUF_VERSION" >&2
exit 1 # Causes caller to exit because we use -e.
}
# Build wheel
function build_wheel() {
PYTHON_VERSION=$1
PYTHON_BIN=/opt/python/${PYTHON_VERSION}/bin/python
$PYTHON_BIN setup.py bdist_wheel --cpp_implementation --compile_static_extension
auditwheel repair dist/protobuf-${PROTOBUF_VERSION}-${PYTHON_VERSION}-linux_x86_64.whl
}
# Validate arguments.
if [ $0 != ./protobuf_optimized_pip.sh ]; then
echo "Please run this script from the directory in which it is located." >&2
exit 1
fi
if [ $# -lt 1 ]; then
usage
exit 1
fi
PROTOBUF_VERSION=$1
PYPI_USERNAME=$2
PYPI_PASSWORD=$3
DIR=${PWD}/'protobuf-python-build'
PYTHON_VERSIONS=('cp27-cp27mu' 'cp33-cp33m' 'cp34-cp34m' 'cp35-cp35m' 'cp36-cp36m')
mkdir -p ${DIR}
cd ${DIR}
curl -SsL -O https://github.com/protocolbuffers/protobuf/archive/v${PROTOBUF_VERSION}.tar.gz
tar xzf v${PROTOBUF_VERSION}.tar.gz
cd $DIR/protobuf-${PROTOBUF_VERSION}
# Autoconf on centos 5.11 cannot recognize AC_PROG_OBJC.
sed -i '/AC_PROG_OBJC/d' configure.ac
sed -i 's/conformance\/Makefile//g' configure.ac
# Use the /usr/bin/autoconf and related tools to pick the correct aclocal macros
export PATH="/usr/bin:$PATH"
# Build protoc
./autogen.sh
CXXFLAGS="-fPIC -g -O2" ./configure
make -j8
export PROTOC=$DIR/src/protoc
cd python
for PYTHON_VERSION in "${PYTHON_VERSIONS[@]}"
do
build_wheel $PYTHON_VERSION
done
/opt/python/cp27-cp27mu/bin/twine upload wheelhouse/*
Loading…
Cancel
Save