diff --git a/.zuul.yaml b/.zuul.yaml index 6f22bf3..ea400d7 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,6 +1,6 @@ - project: templates: - - openstack-python-jobs + - openstack-python3-jobs - libec-pyeclib-jobs-arm64 - build-openstack-docs-pti check: @@ -14,21 +14,11 @@ pre-run: tools/playbooks/release-wheel/download-artifacts.yaml vars: build_wheel: false - - openstack-tox-py35: &py35_overrides - ansible-version: 8 - vars: - tox_envlist: py35-compilelibs - tox_environment: - LIBERASURECODE_REF: '1.4.0' - - openstack-tox-py36 - - openstack-tox-py37 - - openstack-tox-py38 - - openstack-tox-py39 - openstack-tox-py310 - openstack-tox-py311 - openstack-tox-py312 - openstack-tox-py313 - - pyeclib-tox-py39-centos-9-stream + - pyeclib-tox-py311-centos-9-stream - libec-pyeclib-unit - libec-pyeclib-unit-centos-9-stream gate: @@ -36,16 +26,11 @@ - pyeclib-build-wheels - pyeclib-build-wheels-arm64 - test-release-openstack: *release_overrides - - openstack-tox-py35: *py35_overrides - - openstack-tox-py36 - - openstack-tox-py37 - - openstack-tox-py38 - - openstack-tox-py39 - openstack-tox-py310 - openstack-tox-py311 - openstack-tox-py312 - openstack-tox-py313 - - pyeclib-tox-py39-centos-9-stream + - pyeclib-tox-py311-centos-9-stream - libec-pyeclib-unit - libec-pyeclib-unit-centos-9-stream post: @@ -65,19 +50,22 @@ - release-openstack-python: *release_overrides - job: - name: pyeclib-tox-py39-centos-9-stream - parent: openstack-tox-py39 + name: pyeclib-tox-py311-centos-9-stream + parent: openstack-tox-py311 description: | - Run unit tests using ``py39`` environment on CentOS 9. + Run unit tests using ``py311`` environment on CentOS 9. nodeset: centos-9-stream + vars: + python_use_pyenv: true - job: name: libec-pyeclib-unit-centos-9-stream - parent: openstack-tox-py39 + parent: openstack-tox-py311 timeout: 1800 nodeset: centos-9-stream vars: - tox_envlist: py39-compilelibs + python_use_pyenv: true + tox_envlist: py311-compilelibs - job: name: libec-pyeclib-unit diff --git a/Dockerfile b/Dockerfile index 22ad6e8..5f3feee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,14 @@ # manylinux2010 has oldest build chain that can still build modern ISA-L -# 2021-02-06-3d322a5 is newest tag that still had 2.7 support -# aarch64 images never had 2.7, but 2021-05-01-a10bece is the newest that still had 3.5 ARG TARGET="x86_64" -FROM quay.io/pypa/manylinux2010_x86_64:2021-02-06-3d322a5 AS x86_64 -FROM quay.io/pypa/manylinux2014_aarch64:2021-05-01-a10bece AS aarch64 -FROM quay.io/pypa/musllinux_1_1_x86_64:2021-09-18-f12faf3 AS musl_x86_64 -FROM quay.io/pypa/musllinux_1_1_aarch64:2021-09-18-f12faf3 AS musl_aarch64 +FROM quay.io/pypa/manylinux2010_x86_64:latest AS x86_64 +FROM quay.io/pypa/manylinux2014_aarch64:latest AS aarch64 +FROM quay.io/pypa/musllinux_1_1_x86_64:latest AS musl_x86_64 +FROM quay.io/pypa/musllinux_1_1_aarch64:latest AS musl_aarch64 FROM ${TARGET} -MAINTAINER OpenStack Swift +LABEL org.opencontainers.image.authors="OpenStack Swift" # can also take branch names, e.g. "master" ARG LIBERASURECODE_TAG=1.6.4 @@ -19,8 +17,7 @@ ARG ISAL_TAG=v2.31.0 ARG SO_SUFFIX=-pyeclib ENV SO_SUFFIX=${SO_SUFFIX} ENV UID=1000 -# Alternatively, try cp27-cp27m, cp27-cp27mu -ENV PYTHON_VERSION=cp35-cp35m +ENV PYTHON_VERSION=cp310-cp310 RUN mkdir /opt/src /output @@ -33,9 +30,6 @@ RUN if [ -e /etc/yum.repos.d ]; then \ fi RUN if [ -n "$(type -p yum)" ]; then yum install -y zlib-devel ; fi -# Update auditwheel so it can improve our tag to manylinux1 automatically -# Not *too far*, though, since we've got the old base image -RUN /opt/_internal/tools/bin/pip install -U 'auditwheel<5.2' ADD https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.15.05.tar.gz /opt/src/nasm.tar.gz RUN tar -C /opt/src -xz -f /opt/src/nasm.tar.gz @@ -62,4 +56,4 @@ RUN cd /opt/src/liberasurecode*/ && \ make install COPY . /opt/src/pyeclib/ -ENTRYPOINT ["/bin/sh", "-c", "/opt/python/${PYTHON_VERSION}/bin/python /opt/src/pyeclib/pack_wheel.py /opt/src/pyeclib/ --repair --so-suffix=${SO_SUFFIX} --wheel-dir=/output"] +ENTRYPOINT ["/bin/sh", "-c", "/opt/python/${PYTHON_VERSION}/bin/python3 /opt/src/pyeclib/pack_wheel.py /opt/src/pyeclib/ --repair --so-suffix=${SO_SUFFIX} --wheel-dir=/output"] diff --git a/README.rst b/README.rst index f0eb891..3165d68 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ PyEClib ------- This library provides a simple Python interface for implementing erasure codes -and is known to work with Python 2.7 and 3.5 through 3.13. To obtain the best +and is known to work with Python 3.10 through 3.13. To obtain the best possible performance, the library utilizes liberasurecode, which is a C based erasure code library. @@ -23,7 +23,7 @@ Installation Install pre-requisites: -* Python 2.7 or 3.5+ (including development packages), argparse, setuptools +* Python 3.10+ (including development packages), argparse, setuptools * liberasurecode v1.4.0 or greater [3] * Erasure code backend libraries, gf-complete and Jerasure [1],[2], ISA-L [4], etc diff --git a/bindep.txt b/bindep.txt index 3f49977..a096404 100644 --- a/bindep.txt +++ b/bindep.txt @@ -10,9 +10,7 @@ libtool liberasurecode-dev [platform:dpkg] # There's no library in CentOS 7 but Fedora and openSUSE have it. liberasurecode-devel [platform:rpm !platform:centos] -python-dev [(platform:dpkg py27)] -python3-dev [(platform:dpkg !py27)] -python-devel [(platform:rpm py27)] -python3-devel [(platform:rpm !py27)] +python3-dev [platform:dpkg] +python3-devel [platform:rpm] zlib-devel [platform:rpm] zlib1g-dev [platform:dpkg] diff --git a/pack_wheel.py b/pack_wheel.py index 0d9a800..b0633ab 100644 --- a/pack_wheel.py +++ b/pack_wheel.py @@ -103,7 +103,7 @@ def build_wheel(src_dir): try: subprocess.check_call([ sys.executable, 'setup.py', - 'bdist_wheel', '-d', tmp, '--py-limited-api=cp35', + 'bdist_wheel', '-d', tmp, '--py-limited-api=cp310', ], cwd=src_dir) files = os.listdir(tmp) assert len(files) == 1, files diff --git a/setup.py b/setup.py index 65eb1f5..5216c98 100644 --- a/setup.py +++ b/setup.py @@ -243,14 +243,7 @@ setup(name='pyeclib', 'written in C.'), classifiers=[ "Development Status :: 5 - Production/Stable", - "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 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -264,6 +257,7 @@ setup(name='pyeclib', license='BSD', ext_modules=[module], packages=['pyeclib'], + python_requires='>=3.10', package_dir={'pyeclib': 'pyeclib'}, cmdclass={'build': build, 'install': install, 'clean': clean}, py_modules=['pyeclib.ec_iface', 'pyeclib.core'], diff --git a/test-requirements.txt b/test-requirements.txt index cef2af8..66b0d94 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,6 +3,5 @@ # process, which may cause wedges in the gate later. coverage -attrs<22; python_version<"3.5" pytest six>=1.9.0 diff --git a/tools/playbooks/build-wheel/roles/build-pyeclib-wheel/defaults/main.yaml b/tools/playbooks/build-wheel/roles/build-pyeclib-wheel/defaults/main.yaml index d345c8c..7adeac5 100644 --- a/tools/playbooks/build-wheel/roles/build-pyeclib-wheel/defaults/main.yaml +++ b/tools/playbooks/build-wheel/roles/build-pyeclib-wheel/defaults/main.yaml @@ -1,3 +1,3 @@ tag: pyeclib-build-wheel-latest -wheel_python_version: cp35-cp35m +wheel_python_version: cp310-cp310 musl: False diff --git a/tools/playbooks/build-wheel/run.yaml b/tools/playbooks/build-wheel/run.yaml index 38e24ad..995fe48 100644 --- a/tools/playbooks/build-wheel/run.yaml +++ b/tools/playbooks/build-wheel/run.yaml @@ -3,16 +3,6 @@ - build-pyeclib-images - role: build-pyeclib-wheel - wheel_python_version: cp27-cp27m - when: wheel_target != "aarch64" - role: build-pyeclib-wheel - wheel_python_version: cp27-cp27mu - when: wheel_target != "aarch64" - - - role: build-pyeclib-wheel - wheel_python_version: cp35-cp35m - - - role: build-pyeclib-wheel - wheel_python_version: cp36-cp36m musl: True diff --git a/tox.ini b/tox.ini index af1d338..b731056 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{27,35,36,37,38,39,310}-compilelibs,pep8,docs +envlist = py3{10,11,12}-compilelibs,pep8,docs [testenv] deps =