From 3cc335c0ae6aea3a3c4a38f55ef6b71ee86ef686 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 1 Oct 2024 15:48:51 -0700 Subject: [PATCH] Python 3.9-3.13 Python 3.13 is released. Python 3.8 is EOL as of October 2024. --- Dockerfile | 30 +++++++++++++++--------------- NEWS.rst | 1 + README.md | 2 +- Singularity | 2 +- cmake/dependencies/pybind11.cmake | 4 ++-- conda.yml | 2 +- docs/source/dev/dependencies.rst | 2 +- docs/source/install/install.rst | 2 +- setup.py | 4 ++-- 9 files changed, 25 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index a6d1fcbfbc..36fd45f4a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -112,21 +112,6 @@ RUN for whl in /opt/src/dist/*.whl; do \ && du -hs /opt/src/dist/* \ && du -hs /wheelhouse/* -# test in fresh env: Debian:Sid + Python 3.8 -FROM debian:sid -ENV DEBIAN_FRONTEND noninteractive -COPY --from=build-env /wheelhouse/openPMD_api-*-cp38-cp38-manylinux2010_x86_64.whl . -RUN apt-get update \ - && apt-get install -y --no-install-recommends python3.8 python3-distutils ca-certificates curl \ - && rm -rf /var/lib/apt/lists/* -RUN python3.8 --version \ - && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ - && python3.8 get-pip.py \ - && python3.8 -m pip install openPMD_api-*-cp38-cp38-manylinux2010_x86_64.whl -RUN python3.8 -c "import openpmd_api as io; print(io.__version__); print(io.variants)" -RUN python3.8 -m openpmd_api.ls --help -RUN openpmd-ls --help - # test in fresh env: Debian:Bullseye + Python 3.9 FROM debian:bullseye ENV DEBIAN_FRONTEND noninteractive @@ -187,6 +172,21 @@ RUN python3.12 -c "import openpmd_api as io; print(io.__version__); print RUN python3.12 -m openpmd_api.ls --help RUN openpmd-ls --help +# test in fresh env: Debian:Bullseye + Python 3.13 +FROM debian:bullseye +ENV DEBIAN_FRONTEND noninteractive +COPY --from=build-env /wheelhouse/openPMD_api-*-cp313-cp313-manylinux2010_x86_64.whl . +RUN apt-get update \ + && apt-get install -y --no-install-recommends python3.13 python3-distutils ca-certificates curl \ + && rm -rf /var/lib/apt/lists/* +RUN python3.13 --version \ + && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ + && python3.13 get-pip.py \ + && python3.13 -m pip install openPMD_api-*-cp313-cp313-manylinux2010_x86_64.whl +RUN python3.13 -c "import openpmd_api as io; print(io.__version__); print(io.variants)" +RUN python3.13 -m openpmd_api.ls --help +RUN openpmd-ls --help + # copy binary artifacts (wheels) FROM quay.io/pypa/manylinux2010_x86_64 MAINTAINER Axel Huebl diff --git a/NEWS.rst b/NEWS.rst index aa7dfdfb05..eafc2eec49 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -15,6 +15,7 @@ Note that ADIOS2 does not support compression in BP3 files. CMake 3.22.0 is now the minimally supported version for CMake. pybind11 2.13.0 is now the minimally supported version for Python support. +Python 3.12 & 3.13 are now supported, Python 3.7 & 3.8 are removed. The ``len(...)`` of many classes has been reworked for consistency and returns now the number of entries (iterations, record components, etc.). Previously, this sporadically returned the number of attributes, which is better queried via ``len(.attributes)``. diff --git a/README.md b/README.md index d6e3e0c884..f99b7c96f9 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ while those can be built either with or without: Optional language bindings: * Python: - * Python 3.8 - 3.12 + * Python 3.9 - 3.13 * pybind11 2.13.0+ * numpy 1.15+ * mpi4py 2.1+ (optional, for MPI) diff --git a/Singularity b/Singularity index f58b39a2d5..5d77c6dd55 100644 --- a/Singularity +++ b/Singularity @@ -42,7 +42,7 @@ Supported frontends are C++11 and Python3. -DopenPMD_USE_PYTHON=ON \ -DopenPMD_BUILD_TESTING=OFF \ -DCMAKE_INSTALL_PREFIX=/usr/local \ - -DCMAKE_INSTALL_PYTHONDIR=lib/python3.6/dist-packages + -DCMAKE_INSTALL_PYTHONDIR=lib/python3.12/dist-packages make # make test make install diff --git a/cmake/dependencies/pybind11.cmake b/cmake/dependencies/pybind11.cmake index 742aafa7dc..ae23c66c3d 100644 --- a/cmake/dependencies/pybind11.cmake +++ b/cmake/dependencies/pybind11.cmake @@ -78,9 +78,9 @@ set(openPMD_pybind11_branch "v2.13.6" "Repository branch for openPMD_pybind11_repo if(openPMD_USE_INTERNAL_PYBIND11)") if(openPMD_USE_PYTHON STREQUAL AUTO) - find_package(Python 3.7.0 COMPONENTS Interpreter Development.Module) + find_package(Python 3.9.0 COMPONENTS Interpreter Development.Module) elseif(openPMD_USE_PYTHON) - find_package(Python 3.7.0 COMPONENTS Interpreter Development.Module REQUIRED) + find_package(Python 3.9.0 COMPONENTS Interpreter Development.Module REQUIRED) else() set(openPMD_HAVE_PYTHON FALSE) endif() diff --git a/conda.yml b/conda.yml index e82567b2ae..0ed0278a73 100644 --- a/conda.yml +++ b/conda.yml @@ -36,7 +36,7 @@ dependencies: - pre-commit - pyarrow # for dask # - pybind11 # shipped internally - - python>=3.8 + - python>=3.9 # just a note for later hackery, we could install pip packages inside the env, too: # - pip: diff --git a/docs/source/dev/dependencies.rst b/docs/source/dev/dependencies.rst index c577e0e01e..284b534e56 100644 --- a/docs/source/dev/dependencies.rst +++ b/docs/source/dev/dependencies.rst @@ -38,7 +38,7 @@ Optional: language bindings * Python: - * Python 3.8 - 3.12 + * Python 3.9 - 3.13 * pybind11 2.13.0+ * numpy 1.15+ * mpi4py 2.1+ (optional, for MPI) diff --git a/docs/source/install/install.rst b/docs/source/install/install.rst index a0268a2a99..08e56dba5b 100644 --- a/docs/source/install/install.rst +++ b/docs/source/install/install.rst @@ -192,7 +192,7 @@ CMake will summarize the install paths for you before the build step. # Note that one some systems, /lib might need to be replaced with /lib64. # change path to your python MAJOR.MINOR version - export PYTHONPATH=$HOME/somepath/lib/python3.8/site-packages:$PYTHONPATH + export PYTHONPATH=$HOME/somepath/lib/python3.12/site-packages:$PYTHONPATH Adding those lines to your ``$HOME/.bashrc`` and re-opening your terminal will set them permanently. diff --git a/setup.py b/setup.py index 7c97800249..4a821d9e91 100644 --- a/setup.py +++ b/setup.py @@ -196,7 +196,7 @@ def build_extension(self, ext): cmdclass=dict(build_ext=CMakeBuild), # scripts=['openpmd-ls'], zip_safe=False, - python_requires='>=3.8', + python_requires='>=3.9', # tests_require=['pytest'], install_requires=install_requires, # see: src/bindings/python/cli @@ -225,11 +225,11 @@ def build_extension(self, ext): 'Topic :: Database :: Front-Ends', 'Programming Language :: C++', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', ('License :: OSI Approved :: ' 'GNU Lesser General Public License v3 or later (LGPLv3+)'), ],