Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 3 additions & 2 deletions Python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@
else:
package_data = {}

# Parse WarpX version information
# Parse WarpX, PICMI versions information
dependencies_file = "../dependencies.json"
with open(dependencies_file, "r") as file:
dependencies_data = json.load(file)
warpx_version = dependencies_data.get("version_warpx")
picmi_version = dependencies_data.get("version_picmi")

setup(
name="pywarpx",
Expand All @@ -77,7 +78,7 @@
package_dir={"pywarpx": "pywarpx"},
description="""Wrapper of WarpX""",
package_data=package_data,
install_requires=["numpy", "picmistandard==0.33.0", "periodictable"],
install_requires=["numpy", f"picmistandard=={picmi_version}", "periodictable"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the file here should maybe just use requirements.txt instead of documenting the dependencies again...?

python_requires=">=3.8", # left for CI, truly ">=3.9"
zip_safe=False,
)
45 changes: 44 additions & 1 deletion Tools/Release/update_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ def update(args):
repo_dict["picsar"]["tags"] = (
"https://api.github.com/repos/ECP-WarpX/picsar/tags"
)
if args.all or args.pybind11:
repo_dict["pybind11"] = {}
repo_dict["pybind11"]["commit"] = (
"https://api.github.com/repos/pybind/pybind11/commits/master"
)
repo_dict["pybind11"]["tags"] = (
"https://api.github.com/repos/pybind/pybind11/tags"
)
Comment on lines +45 to +52
Copy link
Member

@ax3l ax3l Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we do not do a weekly tracking of pybind11. We manually update when we want a newer release.

Most importantly, when we release WarpX we do not depend on the pybind11 development branch (or any dependency as of their development branch).

if args.all or args.picmi:
repo_dict["picmi"] = {}
repo_dict["picmi"]["commit"] = (
"https://api.github.com/repos/picmi-standard/picmi/commits/master"
)
repo_dict["picmi"]["tags"] = (
"https://api.github.com/repos/picmi-standard/picmi/tags"
)
if args.all or args.warpx:
repo_dict["warpx"] = {}
repo_dict["warpx"]["commit"] = (
Expand All @@ -56,6 +72,8 @@ def update(args):
"amrex": "AMReX",
"pyamrex": "pyAMReX",
"picsar": "PICSAR",
"pybind11": "pybind11",
"picmi": "PICMI",
"warpx": "WarpX",
}

Expand Down Expand Up @@ -157,6 +175,22 @@ def update(args):
dest="picsar",
)

# add arguments: pybind11 option
parser.add_argument(
"--pybind11",
help="Update pybind11 only",
action="store_true",
dest="pybind11",
)

# add arguments: PICMI option
parser.add_argument(
"--picmi",
help="Update PICMI only",
action="store_true",
dest="picmi",
)

# add arguments: WarpX option
parser.add_argument(
"--warpx",
Expand All @@ -178,7 +212,16 @@ def update(args):

# set args.all automatically
args.all = (
False if (args.amrex or args.pyamrex or args.picsar or args.warpx) else True
False
if (
args.amrex
or args.pyamrex
or args.picsar
or args.pybind11
or args.picmi
or args.warpx
)
else True
)

# update
Expand Down
10 changes: 8 additions & 2 deletions cmake/dependencies/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function(find_pybind11)
mark_as_advanced(FETCHCONTENT_UPDATES_DISCONNECTED_FETCHEDpybind11)
endif()
else()
find_package(pybind11 3.0.0 CONFIG REQUIRED)
find_package(pybind11 ${pybind11_version} CONFIG REQUIRED)
message(STATUS "pybind11: Found version '${pybind11_VERSION}'")
endif()
endfunction()
Expand All @@ -52,7 +52,13 @@ option(WarpX_pybind11_internal "Download & build pybind11" ON)
set(WarpX_pybind11_repo "https://github.com/pybind/pybind11.git"
CACHE STRING
"Repository URI to pull and build pybind11 from if(WarpX_pybind11_internal)")
set(WarpX_pybind11_branch "v3.0.0"

# Parse AMReX version and commit information
file(READ "${WarpX_SOURCE_DIR}/dependencies.json" dependencies_data)
string(JSON pybind11_version GET "${dependencies_data}" version_pybind11)
string(JSON pybind11_commit GET "${dependencies_data}" commit_pybind11)

set(WarpX_pybind11_branch ${pybind11_commit}
CACHE STRING
"Repository branch for WarpX_pybind11_repo if(WarpX_pybind11_internal)")

Expand Down
6 changes: 5 additions & 1 deletion dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"version_amrex": "25.09",
"version_pyamrex": "25.09",
"version_picsar": "25.06",
"version_pybind11": "3.0.0",
"version_picmi": "0.33.0",
"commit_amrex": "a377c17c36a9885ca1ce4975aaee5a240d8eeaf1",
"commit_pyamrex": "e73fc6081d1750d1558ae43f7904982535e93fb3",
"commit_picsar": "0c329e66010267662a82219f7de7abbd231463f4"
"commit_picsar": "0c329e66010267662a82219f7de7abbd231463f4",
"commit_pybind11": "ed5057ded698e305210269dafa57574ecf964483",
"commit_picmi": "37bb651396d3d33bacfeac016f8745f2434b4e96"
}
Loading