-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/titan' into get_atom_data_error
- Loading branch information
Showing
9 changed files
with
109 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
cmake_minimum_required(VERSION 3.17.2...3.26) | ||
project(${SKBUILD_PROJECT_NAME} LANGUAGES C Fortran) | ||
|
||
find_package( | ||
Python | ||
COMPONENTS Interpreter Development.Module NumPy | ||
REQUIRED) | ||
|
||
# F2PY headers | ||
execute_process( | ||
COMMAND "${PYTHON_EXECUTABLE}" -c | ||
"import numpy.f2py; print(numpy.f2py.get_include())" | ||
OUTPUT_VARIABLE F2PY_INCLUDE_DIR | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
|
||
add_library(fortranobject OBJECT "${F2PY_INCLUDE_DIR}/fortranobject.c") | ||
target_link_libraries(fortranobject PUBLIC Python::NumPy) | ||
target_include_directories(fortranobject PUBLIC "${F2PY_INCLUDE_DIR}") | ||
set_property(TARGET fortranobject PROPERTY POSITION_INDEPENDENT_CODE ON) | ||
|
||
add_custom_command( | ||
OUTPUT _auroramodule.c example-f2pywrappers.f | ||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/aurora/main.f90" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/aurora/impden.f90" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/aurora/math.f90" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/aurora/grids.f90" | ||
VERBATIM | ||
COMMAND "${Python_EXECUTABLE}" -m numpy.f2py | ||
"${CMAKE_CURRENT_SOURCE_DIR}/aurora/main.f90" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/aurora/impden.f90" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/aurora/math.f90" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/aurora/grids.f90" | ||
-m _aurora --lower) | ||
|
||
python_add_library(_aurora MODULE "${CMAKE_CURRENT_BINARY_DIR}/_auroramodule.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/aurora/main.f90" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/aurora/impden.f90" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/aurora/math.f90" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/aurora/grids.f90" | ||
WITH_SOABI) | ||
target_link_libraries(_aurora PRIVATE fortranobject) | ||
|
||
install(TARGETS _aurora DESTINATION aurora/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
[project] | ||
name = "aurorafusion" | ||
dynamic = ["version"] | ||
description = "Aurora package for particle transport, radiation and neutrals in magnetically-confined plasmas" | ||
authors = [ | ||
{ name = "F. Sciortino", email = "[email protected]" }, | ||
] | ||
urls = { "Homepage" = "https://github.com/fsciortino/Aurora" } | ||
keywords = ["particle and impurity transport, neutrals, radiation, magnetic confinement fusion"] | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
] | ||
dependencies = [ | ||
"matplotlib", | ||
"numpy<2.0.0", | ||
"omfit_classes", | ||
"pandas", | ||
"pexpect", | ||
"requests", | ||
"scipy", | ||
# transitive dependencies of omfit_classes | ||
# that omfit_classes does not advertise | ||
"fortranformat", | ||
"netCDF4", | ||
"uncertainties", | ||
"omas", | ||
# omfit_classes will have issues with newer versions | ||
# of xarray for two different reasons: | ||
# 1. because of a recently-introduced xarray bug that | ||
# will be fixed in the next release after v2024.02.0 | ||
# (this commit: https://github.com/pydata/xarray/commit/a241845c0dfcb8a5a0396f5ef7602e9dae6155c0). | ||
# This constrains xarray<=v2023.07.0. | ||
# 2. because omfit_classes uses xarray.plot.plot, which has | ||
# been removed/renamed by a commit from October 2022. | ||
# This constrains xarray<=v2022.09.0 | ||
"xarray==v2022.09.0", | ||
# omfit_classes has issues with newer versions of | ||
# matplotlib, see https://github.com/gafusion/OMFIT-source/issues/6784 | ||
"matplotlib<=3.5", | ||
] | ||
|
||
[build-system] | ||
requires = ["scikit-build-core", "numpy"] | ||
build-backend = "scikit_build_core.build" | ||
|
||
[tool.scikit-build] | ||
ninja.minimum-version = "1.10" | ||
cmake.minimum-version = "3.17.2" | ||
wheel.packages = ["aurora"] | ||
|
||
[tool.scikit-build.metadata.version] | ||
provider = "scikit_build_core.metadata.regex" | ||
input = "aurora/__init__.py" |
This file was deleted.
Oops, something went wrong.