Skip to content

Commit 499fcb0

Browse files
authored
Python 3.13 Support, 3.8 EOL (#5361)
Add support for Python 3.13. Remove 3.8 because it is EOL as of Oct 2024. Bump to pybind11 2.13.0+, which add Python 3.13 support in CI.
1 parent 9fdc6ec commit 499fcb0

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ foreach(D IN LISTS WarpX_DIMS)
480480
warpx_enable_IPO(pyWarpX_${SD})
481481
else()
482482
# conditionally defined target in pybind11
483-
# https://github.com/pybind/pybind11/blob/v2.12.0/tools/pybind11Common.cmake#L397-L403
483+
# https://github.com/pybind/pybind11/blob/v2.13.0/tools/pybind11Common.cmake#L407-L413
484484
target_link_libraries(pyWarpX_${SD} PRIVATE pybind11::lto)
485485
endif()
486486
endif()

Docs/source/developers/gnumake/python.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Installing WarpX as a Python package
44
====================================
55

6-
A full Python installation of WarpX can be done, which includes a build of all of the C++ code, or a pure Python version can be made which only installs the Python scripts. WarpX requires Python version 3.8 or newer.
6+
A full Python installation of WarpX can be done, which includes a build of all of the C++ code, or a pure Python version can be made which only installs the Python scripts. WarpX requires Python version 3.9 or newer.
77

88
For a full Python installation of WarpX
99
---------------------------------------

Docs/source/install/dependencies.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Optional dependencies include:
3737
- `SENSEI 4.0.0+ <https://sensei-insitu.org>`__: for in situ analysis and visualization
3838
- `CCache <https://ccache.dev>`__: to speed up rebuilds (For CUDA support, needs version 3.7.9+ and 4.2+ is recommended)
3939
- `Ninja <https://ninja-build.org>`__: for faster parallel compiles
40-
- `Python 3.8+ <https://www.python.org>`__
40+
- `Python 3.9+ <https://www.python.org>`__
4141

4242
- `mpi4py <https://mpi4py.readthedocs.io>`__
4343
- `numpy <https://numpy.org>`__

Python/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@
7171
description="""Wrapper of WarpX""",
7272
package_data=package_data,
7373
install_requires=["numpy", "picmistandard==0.33.0", "periodictable"],
74-
python_requires=">=3.8",
74+
python_requires=">=3.8", # left for CI, truly ">=3.9"
7575
zip_safe=False,
7676
)

cmake/dependencies/pybind11.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function(find_pybind11)
3737
mark_as_advanced(FETCHCONTENT_UPDATES_DISCONNECTED_FETCHEDpybind11)
3838
endif()
3939
else()
40-
find_package(pybind11 2.12.0 CONFIG REQUIRED)
40+
find_package(pybind11 2.13.0 CONFIG REQUIRED)
4141
message(STATUS "pybind11: Found version '${pybind11_VERSION}'")
4242
endif()
4343
endfunction()
@@ -52,7 +52,7 @@ option(WarpX_pybind11_internal "Download & build pybind11" ON)
5252
set(WarpX_pybind11_repo "https://github.com/pybind/pybind11.git"
5353
CACHE STRING
5454
"Repository URI to pull and build pybind11 from if(WarpX_pybind11_internal)")
55-
set(WarpX_pybind11_branch "v2.12.0"
55+
set(WarpX_pybind11_branch "v2.13.6"
5656
CACHE STRING
5757
"Repository branch for WarpX_pybind11_repo if(WarpX_pybind11_internal)")
5858

setup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def build_extension(self, ext):
307307
cmdclass=cmdclass,
308308
# scripts=['warpx_1d', 'warpx_2d', 'warpx_rz', 'warpx_3d'],
309309
zip_safe=False,
310-
python_requires=">=3.8",
310+
python_requires=">=3.8", # left for CI, truly ">=3.9"
311311
# tests_require=['pytest'],
312312
install_requires=install_requires,
313313
# see: src/bindings/python/cli
@@ -336,10 +336,11 @@ def build_extension(self, ext):
336336
"Topic :: Scientific/Engineering :: Physics",
337337
"Programming Language :: C++",
338338
"Programming Language :: Python :: 3",
339-
"Programming Language :: Python :: 3.8",
340339
"Programming Language :: Python :: 3.9",
341340
"Programming Language :: Python :: 3.10",
342341
"Programming Language :: Python :: 3.11",
342+
"Programming Language :: Python :: 3.12",
343+
"Programming Language :: Python :: 3.13",
343344
(
344345
"License :: OSI Approved :: " "BSD License"
345346
), # TODO: use real SPDX: BSD-3-Clause-LBNL

0 commit comments

Comments
 (0)