From 1cb7b1b706aa1c77b2f4858f9154d1b377274ba9 Mon Sep 17 00:00:00 2001 From: Sourya Kovvali <12588291+souryavarenya@users.noreply.github.com> Date: Thu, 31 Aug 2023 15:04:38 +0200 Subject: [PATCH 1/2] Support py 3.10 and 3.11 --- .github/workflows/main.yml | 2 +- pip_package/build.sh | 4 +++- pip_package/setup.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9e834fe..e478c6b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,7 +45,7 @@ jobs: runs-on: macos-10.15 strategy: matrix: - python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9.0 ] + python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 ] name: Mac build for Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v2 diff --git a/pip_package/build.sh b/pip_package/build.sh index a273121..791a0db 100755 --- a/pip_package/build.sh +++ b/pip_package/build.sh @@ -33,7 +33,9 @@ for version in \ cp36-cp36m \ cp37-cp37m \ cp38-cp38 \ - cp39-cp39; do + cp39-cp39 \ + cp310-cp310 \ + cp311-cp311; do # Link the correct version of python ln -sf /opt/python/$version/bin/python /usr/bin/python3 diff --git a/pip_package/setup.py b/pip_package/setup.py index fc119be..23cd01a 100644 --- a/pip_package/setup.py +++ b/pip_package/setup.py @@ -67,5 +67,7 @@ def finalize_options(self): 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', ], ) From 8d2d6607febbf057c7b6b647d057b223ab508cd4 Mon Sep 17 00:00:00 2001 From: Sourya Kovvali Date: Thu, 31 Aug 2023 19:03:44 +0200 Subject: [PATCH 2/2] Update scripts --- .github/workflows/main.yml | 2 +- Dockerfile | 6 ++---- WORKSPACE | 6 +++--- pip_package/build.sh | 5 +---- pip_package/setup.py | 3 --- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e478c6b..74b5786 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,7 +45,7 @@ jobs: runs-on: macos-10.15 strategy: matrix: - python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 ] + python-version: [ 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 ] name: Mac build for Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v2 diff --git a/Dockerfile b/Dockerfile index 9b3fada..9d67f1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,12 @@ -FROM quay.io/pypa/manylinux2014_x86_64 +FROM quay.io/pypa/manylinux_2_28_x86_64 ARG BAZEL_VERSION ENV USE_BAZEL_VERSION=$BAZEL_VERSION -RUN yum install npm git python-devel python2-pip python3-pip gdb -y -q && \ +RUN yum install npm git python3-pip gdb -y -q && \ npm install -g npm@9.2.0 \ npm install -g @bazel/bazelisk && \ - python -m pip install --upgrade "pip < 21.0" --user && \ - python -m pip install wheel --user && \ python3 -m pip install --upgrade "pip < 21.0" --user && \ python3 -m pip install wheel --user diff --git a/WORKSPACE b/WORKSPACE index 87a6a27..f46514f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -35,9 +35,9 @@ http_archive( http_archive( name = "pybind11", build_file = "@pybind11_bazel//:pybind11.BUILD", - sha256 = "c6160321dc98e6e1184cc791fbeadd2907bb4a0ce0e447f2ea4ff8ab56550913", - strip_prefix = "pybind11-2.9.1", - urls = ["https://github.com/pybind/pybind11/archive/v2.9.1.tar.gz"], + sha256 = "d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c", + strip_prefix = "pybind11-2.11.1", + urls = ["https://github.com/pybind/pybind11/archive/v2.11.1.tar.gz"], ) load("@pybind11_bazel//:python_configure.bzl", "python_configure") diff --git a/pip_package/build.sh b/pip_package/build.sh index 791a0db..9f8bcb4 100755 --- a/pip_package/build.sh +++ b/pip_package/build.sh @@ -17,7 +17,7 @@ function build() { # Build wheel cp /tmp/embag/bazel-bin/python/libembag.so /tmp/pip_build/embag (cd /tmp/pip_build && "$PYTHON_PATH" setup.py bdist_wheel && - auditwheel repair /tmp/pip_build/dist/embag*.whl --plat manylinux2014_x86_64 && + auditwheel repair /tmp/pip_build/dist/embag*.whl --plat manylinux_2_28_x86_64 && "$PYTHON_PATH" -m pip install wheelhouse/embag*.whl --user && "$PYTHON_PATH" -c 'import embag; embag.View(); print("Successfully loaded embag!")' && cp wheelhouse/* /tmp/out && @@ -25,9 +25,6 @@ function build() { rm -rf build dist) } -# Build embag for Python 2 (soon to be deprecated) -build "/usr/bin" 2 - # Build embag for various version of Python 3 for version in \ cp36-cp36m \ diff --git a/pip_package/setup.py b/pip_package/setup.py index 23cd01a..7907e7e 100644 --- a/pip_package/setup.py +++ b/pip_package/setup.py @@ -59,10 +59,7 @@ def finalize_options(self): 'License :: OSI Approved :: MIT License', 'Operating System :: POSIX', 'Operating System :: MacOS', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8',