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

Python: 3.8+ #1502

Merged
merged 1 commit into from
Aug 10, 2023
Merged
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 CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ if(CMAKE_VERSION VERSION_LESS 3.18.0)
set(_PY_DEV_MODULE Development)
endif()
if(openPMD_USE_PYTHON STREQUAL AUTO)
find_package(Python 3.7.0 COMPONENTS Interpreter ${_PY_DEV_MODULE})
find_package(Python 3.8.0 COMPONENTS Interpreter ${_PY_DEV_MODULE})
if(Python_FOUND)
if(openPMD_USE_INTERNAL_PYBIND11)
add_subdirectory("${openPMD_SOURCE_DIR}/share/openPMD/thirdParty/pybind11")
Expand Down
28 changes: 2 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ FROM quay.io/pypa/manylinux2010_x86_64 as build-env
# FROM quay.io/pypa/manylinux1_x86_64 as build-env
ENV DEBIAN_FRONTEND noninteractive

# Python 3.7-3.11 via "37m 38 39 311"
ARG PY_VERSIONS="37m 38 39 310 311"
# Python 3.8-3.11 via "38 39 311"
ARG PY_VERSIONS="38 39 310 311"

# static libs need relocatable symbols for linking to shared python lib
ENV CFLAGS="-fPIC ${CFLAGS}"
Expand Down Expand Up @@ -112,30 +112,6 @@ RUN for whl in /opt/src/dist/*.whl; do \
&& du -hs /opt/src/dist/* \
&& du -hs /wheelhouse/*

# test in fresh env: Debian:Buster + Python 3.7
FROM debian:buster
ENV DEBIAN_FRONTEND noninteractive
COPY --from=build-env /wheelhouse/openPMD_api-*-cp37-cp37m-manylinux2010_x86_64.whl .
RUN apt-get update \
&& apt-get install -y --no-install-recommends python3 python3-pip \
&& rm -rf /var/lib/apt/lists/*
# binutils
RUN python3 --version \
&& python3 -m pip install -U pip \
&& python3 -m pip install openPMD_api-*-cp37-cp37m-manylinux2010_x86_64.whl
RUN find / -name "openpmd*"
RUN ls -hal /usr/local/lib/python3.7/dist-packages/
RUN ls -hal /usr/local/lib/python3.7/dist-packages/openpmd_api/
# RUN ls -hal /usr/local/lib/python3.7/dist-packages/.libsopenpmd_api
# RUN objdump -x /usr/local/lib/python3.7/dist-packages/openpmd_api.cpython-37m-x86_64-linux-gnu.so | grep RPATH
RUN ldd /usr/local/lib/python3.7/dist-packages/openpmd_api/openpmd_api_cxx.cpython-37m-x86_64-linux-gnu.so
RUN python3 -c "import openpmd_api as io; print(io.__version__); print(io.variants)"
RUN python3 -m openpmd_api.ls --help
RUN openpmd-ls --help
#RUN echo "* soft core 100000" >> /etc/security/limits.conf && \
# python3 -c "import openpmd_api as io"; \
# gdb -ex bt -c core

# test in fresh env: Debian:Sid + Python 3.8
FROM debian:sid
ENV DEBIAN_FRONTEND noninteractive
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ while those can be built either with or without:

Optional language bindings:
* Python:
* Python 3.7 - 3.11
* Python 3.8 - 3.11
* pybind11 2.11.1+
* numpy 1.15+
* mpi4py 2.1+ (optional, for MPI)
Expand Down
2 changes: 1 addition & 1 deletion conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies:
- pre-commit
- pyarrow # for dask
# - pybind11 # shipped internally
- python>=3.7
- python>=3.8

# just a note for later hackery, we could install pip packages inside the env, too:
# - pip:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/dev/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Optional: language bindings

* Python:

* Python 3.7 - 3.11
* Python 3.8 - 3.11
* pybind11 2.11.1+
* numpy 1.15+
* mpi4py 2.1+ (optional, for MPI)
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def build_extension(self, ext):
cmdclass=dict(build_ext=CMakeBuild),
# scripts=['openpmd-ls'],
zip_safe=False,
python_requires='>=3.7',
python_requires='>=3.8',
# tests_require=['pytest'],
install_requires=install_requires,
# see: src/bindings/python/cli
Expand Down Expand Up @@ -221,7 +221,6 @@ def build_extension(self, ext):
'Topic :: Database :: Front-Ends',
'Programming Language :: C++',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
Expand Down