Skip to content

Commit 8e06d5a

Browse files
committed
Python: 3.6 - 3.9
Add support for Python 3.9, drop support for 3.5 (end-of-life since 9/2020).
1 parent ba3c177 commit 8e06d5a

8 files changed

Lines changed: 22 additions & 19 deletions

File tree

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Other
2424
"""""
2525

2626
- switch to C++14 #825
27+
- Python: support 3.6 - 3.9 #828
2728
- Docs:
2829

2930
- Release cibuildwheel example #775

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ if(openPMD_USE_PYTHON STREQUAL AUTO)
269269
"${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}' "
270270
"is NOT supported. Set for example "
271271
"-DPYTHON_EXECUTABLE=$(which python3) "
272-
"to use 3.5+.")
272+
"to use 3.6+.")
273273
endif()
274274
elseif(openPMD_USE_PYTHON)
275275
if(openPMD_USE_INTERNAL_PYBIND11)
@@ -286,7 +286,7 @@ elseif(openPMD_USE_PYTHON)
286286
"${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}' "
287287
"is NOT supported. Set for example "
288288
"-DPYTHON_EXECUTABLE=$(which python3) "
289-
"to use 3.5+.")
289+
"to use 3.6+.")
290290
endif()
291291
else()
292292
set(openPMD_HAVE_PYTHON FALSE)

Dockerfile

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ FROM quay.io/pypa/manylinux2010_x86_64 as build-env
55
# FROM quay.io/pypa/manylinux1_x86_64 as build-env
66
ENV DEBIAN_FRONTEND noninteractive
77

8-
# Python 3.5-3.8 via "35m 36m 37m 38"
9-
ARG PY_VERSIONS="35m 36m 37m 38"
8+
# Python 3.6-3.9 via "36m 37m 38 39"
9+
ARG PY_VERSIONS="36m 37m 38 39"
1010

1111
# static libs need relocatable symbols for linking to shared python lib
1212
ENV CFLAGS="-fPIC ${CFLAGS}"
@@ -175,18 +175,19 @@ RUN python3 -c "import openpmd_api as io; print(io.__version__); print(io
175175
RUN python3 -m openpmd_api.ls --help
176176
RUN openpmd-ls --help
177177

178-
# test in fresh env: Debian:Stretch + Python 3.5
179-
FROM debian:stretch
178+
# test in fresh env: Debian:Bullseye + Python 3.9
179+
FROM debian:bullseye
180180
ENV DEBIAN_FRONTEND noninteractive
181-
COPY --from=build-env /wheelhouse/openPMD_api-*-cp35-cp35m-manylinux2010_x86_64.whl .
181+
COPY --from=build-env /wheelhouse/openPMD_api-*-cp39-cp39-manylinux2010_x86_64.whl .
182182
RUN apt-get update \
183-
&& apt-get install -y --no-install-recommends python3 python3-pip \
183+
&& apt-get install -y --no-install-recommends python3.9 python3-distutils ca-certificates curl \
184184
&& rm -rf /var/lib/apt/lists/*
185-
RUN python3 --version \
186-
&& python3 -m pip install -U pip \
187-
&& python3 -m pip install openPMD_api-*-cp35-cp35m-manylinux2010_x86_64.whl
188-
RUN python3 -c "import openpmd_api as io; print(io.__version__); print(io.variants)"
189-
RUN python3 -m openpmd_api.ls --help
185+
RUN python3.9 --version \
186+
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
187+
&& python3.9 get-pip.py \
188+
&& python3.9 -m pip install openPMD_api-*-cp39-cp39-manylinux2010_x86_64.whl
189+
RUN python3.9 -c "import openpmd_api as io; print(io.__version__); print(io.variants)"
190+
RUN python3.9 -m openpmd_api.ls --help
190191
RUN openpmd-ls --help
191192

192193

NEWS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Upgrade Guide
77
-----------
88

99
Building openPMD-api now requires a compiler that supports C++14 or newer.
10+
Supported Python version are now 3.6 to 3.9.
1011

1112

1213
0.12.0-alpha

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ while those can be built either with or without:
119119

120120
Optional language bindings:
121121
* Python:
122-
* Python 3.5 - 3.8
123-
* pybind 2.4.3+
122+
* Python 3.6 - 3.9
123+
* pybind11 2.4.3+
124124
* numpy 1.15+
125125
* mpi4py 2.1+
126126

docs/source/dev/dependencies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Optional: language bindings
3939

4040
* Python:
4141

42-
* Python 3.5 - 3.8
42+
* Python 3.6 - 3.9
4343
* pybind11 2.4.3+
4444
* numpy 1.15+
4545
* mpi4py 2.1+

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def build_extension(self, ext):
164164
cmdclass=dict(build_ext=CMakeBuild),
165165
# scripts=['openpmd-ls'],
166166
zip_safe=False,
167-
python_requires='>=3.5, <3.9',
167+
python_requires='>=3.6, <3.10',
168168
# tests_require=['pytest'],
169169
install_requires=install_requires,
170170
# see: src/bindings/python/cli
@@ -192,10 +192,10 @@ def build_extension(self, ext):
192192
'Topic :: Database :: Front-Ends',
193193
'Programming Language :: C++',
194194
'Programming Language :: Python :: 3',
195-
'Programming Language :: Python :: 3.5',
196195
'Programming Language :: Python :: 3.6',
197196
'Programming Language :: Python :: 3.7',
198197
'Programming Language :: Python :: 3.8',
198+
'Programming Language :: Python :: 3.9',
199199
('License :: OSI Approved :: '
200200
'GNU Lesser General Public License v3 or later (LGPLv3+)'),
201201
],

share/openPMD/thirdParty/pybind11/tools/pybind11Tools.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if(NOT PYBIND11_PYTHON_VERSION)
1212
set(PYBIND11_PYTHON_VERSION "" CACHE STRING "Python version to use for compiling modules")
1313
endif()
1414

15-
set(Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5 3.4)
15+
set(Python_ADDITIONAL_VERSIONS 3.9 3.8 3.7 3.6)
1616
find_package(PythonLibsNew ${PYBIND11_PYTHON_VERSION} REQUIRED)
1717

1818
include(CheckCXXCompilerFlag)

0 commit comments

Comments
 (0)