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

Support Python 3.10 and 3.11, Deprecate Python 2.7 and 3.5 #56

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.6, 3.7, 3.8, 3.9, 3.10, 3.11 ]
name: Mac build for Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
9 changes: 4 additions & 5 deletions pip_package/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,22 @@ 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 &&
rm wheelhouse/* &&
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 \
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

Expand Down
5 changes: 2 additions & 3 deletions pip_package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,12 @@ 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',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
)