From 42c670ab9870698622226a6f451bdbf6432583e2 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 1 Oct 2024 15:36:42 -0700 Subject: [PATCH 1/3] Python 3.13 Support, 3.8 EOL Add support for Python 3.13. Remove 3.8 because it is EOL as of Oct 2024. --- README.md | 2 +- docs/source/install/dependencies.rst | 2 +- setup.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ea27453e..ec131ef2 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ pyAMReX depends on the following popular third party software. - [CMake 3.24.0+](https://cmake.org) - [AMReX *development*](https://amrex-codes.github.io): we automatically download and compile a copy of AMReX - [pybind11](https://github.com/pybind/pybind11/) 2.12.0+: we automatically download and compile a copy of pybind11 ([new BSD](https://github.com/pybind/pybind11/blob/master/LICENSE)) - - [Python](https://python.org) 3.8+ + - [Python](https://python.org) 3.9+ - [Numpy](https://numpy.org) 1.15+ Optional dependencies include: diff --git a/docs/source/install/dependencies.rst b/docs/source/install/dependencies.rst index ef0d6222..d1071c79 100644 --- a/docs/source/install/dependencies.rst +++ b/docs/source/install/dependencies.rst @@ -11,7 +11,7 @@ Please see installation instructions below. - `Git 2.18+ `__ - `AMReX `__: we automatically download and compile a copy - `pybind11 2.12.0+ `__: we automatically download and compile a copy -- `Python 3.8+ `__ +- `Python 3.9+ `__ - `numpy 1.15+ `__ diff --git a/setup.py b/setup.py index 6e61cdd3..d23cdb01 100644 --- a/setup.py +++ b/setup.py @@ -237,7 +237,7 @@ def build_extension(self, ext): ext_modules=cxx_modules, cmdclass=cmdclass, zip_safe=False, - python_requires=">=3.8", + python_requires=">=3.9", tests_require=["pytest"], install_requires=install_requires, # cmdclass={'test': PyTest}, @@ -257,11 +257,11 @@ def build_extension(self, ext): "Topic :: Software Development :: Libraries", "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 :: BSD License" ), # TODO: use real SPDX: BSD-3-Clause-LBNL From e1e47e5f4d4559a37a661d1fcdd4019f97ded749 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 1 Oct 2024 15:41:39 -0700 Subject: [PATCH 2/3] pybind11: 2.13.0+ --- CMakeLists.txt | 2 +- README.md | 4 ++-- cmake/dependencies/pybind11.cmake | 4 ++-- docs/source/install/dependencies.rst | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c20b10e1..df170ecd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,7 +143,7 @@ foreach(D IN LISTS AMReX_SPACEDIM) pyamrex_enable_IPO(pyAMReX_${D}d) else() # conditionally defined target in pybind11 - # https://github.com/pybind/pybind11/blob/v2.12.0/tools/pybind11Common.cmake#L397-L403 + # https://github.com/pybind/pybind11/blob/v2.13.0/tools/pybind11Common.cmake#L407-L413 target_link_libraries(pyAMReX_${D}d PRIVATE pybind11::lto) endif() endif() diff --git a/README.md b/README.md index ec131ef2..2da3fc14 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ pyAMReX depends on the following popular third party software. - a mature [C++17](https://en.wikipedia.org/wiki/C%2B%2B17) compiler, e.g., GCC 8, Clang 7, NVCC 11.0, MSVC 19.15 or newer - [CMake 3.24.0+](https://cmake.org) - [AMReX *development*](https://amrex-codes.github.io): we automatically download and compile a copy of AMReX -- [pybind11](https://github.com/pybind/pybind11/) 2.12.0+: we automatically download and compile a copy of pybind11 ([new BSD](https://github.com/pybind/pybind11/blob/master/LICENSE)) +- [pybind11](https://github.com/pybind/pybind11/) 2.13.0+: we automatically download and compile a copy of pybind11 ([new BSD](https://github.com/pybind/pybind11/blob/master/LICENSE)) - [Python](https://python.org) 3.9+ - [Numpy](https://numpy.org) 1.15+ @@ -199,7 +199,7 @@ Furthermore, pyAMReX adds a few selected CMake build options: | `pyAMReX_pybind11_src` | *None* | Absolute path to pybind11 source directory (preferred if set) | | `pyAMReX_pybind11_internal` | **ON**/OFF | Needs a pre-installed pybind11 library if set to `OFF` | | `pyAMReX_pybind11_repo` | `https://github.com/pybind/pybind11.git` | Repository URI to pull and build pybind11 from | -| `pyAMReX_pybind11_branch` | `v2.12.0` | Repository branch for `pyAMReX_pybind11_repo` | +| `pyAMReX_pybind11_branch` | `v2.13.6` | Repository branch for `pyAMReX_pybind11_repo` | | `Python_EXECUTABLE` | (newest found) | Path to Python executable | As one example, one can also build against a local AMReX copy. diff --git a/cmake/dependencies/pybind11.cmake b/cmake/dependencies/pybind11.cmake index 3fe2c473..bb1c4439 100644 --- a/cmake/dependencies/pybind11.cmake +++ b/cmake/dependencies/pybind11.cmake @@ -36,7 +36,7 @@ function(find_pybind11) mark_as_advanced(FETCHCONTENT_UPDATES_DISCONNECTED_FETCHEDpybind11) endif() elseif(NOT pyAMReX_pybind11_internal) - find_package(pybind11 2.12.0 CONFIG REQUIRED) + find_package(pybind11 2.13.0 CONFIG REQUIRED) message(STATUS "pybind11: Found version '${pybind11_VERSION}'") endif() endfunction() @@ -51,7 +51,7 @@ option(pyAMReX_pybind11_internal "Download & build pybind11" ON) set(pyAMReX_pybind11_repo "https://github.com/pybind/pybind11.git" CACHE STRING "Repository URI to pull and build pybind11 from if(pyAMReX_pybind11_internal)") -set(pyAMReX_pybind11_branch "v2.12.0" +set(pyAMReX_pybind11_branch "v2.13.6" CACHE STRING "Repository branch for pyAMReX_pybind11_repo if(pyAMReX_pybind11_internal)") diff --git a/docs/source/install/dependencies.rst b/docs/source/install/dependencies.rst index d1071c79..552deb27 100644 --- a/docs/source/install/dependencies.rst +++ b/docs/source/install/dependencies.rst @@ -10,7 +10,7 @@ Please see installation instructions below. - `CMake 3.24.0+ `__ - `Git 2.18+ `__ - `AMReX `__: we automatically download and compile a copy -- `pybind11 2.12.0+ `__: we automatically download and compile a copy +- `pybind11 2.13.0+ `__: we automatically download and compile a copy - `Python 3.9+ `__ - `numpy 1.15+ `__ From 9b5f82efcb4789a65efad6becf56e83be1a53d09 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 2 Oct 2024 13:19:44 -0700 Subject: [PATCH 3/3] `setup.py`: ">=3.8" for CI --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d23cdb01..80e50eb0 100644 --- a/setup.py +++ b/setup.py @@ -237,7 +237,7 @@ def build_extension(self, ext): ext_modules=cxx_modules, cmdclass=cmdclass, zip_safe=False, - python_requires=">=3.9", + python_requires=">=3.8", # left for CI, truly ">=3.9" tests_require=["pytest"], install_requires=install_requires, # cmdclass={'test': PyTest},