-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
54 lines (45 loc) · 1.94 KB
/
pyproject.toml
File metadata and controls
54 lines (45 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
[build-system]
requires = ["scikit-build-core>=0.10"]
build-backend = "scikit_build_core.build"
[project]
name = "mpi-stubs"
version = "0.1.0"
authors = [
{ name = "Henrik Finsberg", email = "henriknf@simula.no" },
{ name = "Jørgen Dokken", email = "jorgend@simula.no" },
]
description = "ABI-compliant MPI stubs for building MPI applications in serial."
readme = "README.md" # Ensure you have a README.md or change this
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: C",
"Programming Language :: Fortran",
"License :: OSI Approved :: MIT License",
]
[project.scripts]
mpicc = "mpi_stubs:mpicc"
mpicxx = "mpi_stubs:mpicxx"
mpif90 = "mpi_stubs:mpif90"
mpiexec = "mpi_stubs:mpiexec"
[tool.scikit-build]
# Include the Python wrapper module
wheel.packages = ["python/mpi_stubs"]
# Tell CMake to install its artifacts into an inner 'data' folder
wheel.install-dir = "mpi_stubs/data"
# ... (Keep existing pyproject.toml contents) ...
[tool.cibuildwheel]
# Skip PyPy (unless you specifically want to support it) and Musllinux (to save CI time, add back if needed)
skip = ["pp*", "*-musllinux*"]
build-frontend = "build"
# Run a quick sanity check to ensure the python package imports correctly
test-command = "python -c \"import mpi_stubs; print('Successfully imported mpi_stubs')\""
[tool.cibuildwheel.linux]
# manylinux images are CentOS/AlmaLinux based; we need to install gfortran before building
before-all = "yum install -y gcc-gfortran"
[tool.cibuildwheel.macos]
# Force scikit-build-core to use the Homebrew gfortran we will install in the workflow
environment = { FC = "$(ls $(brew --prefix)/bin/gfortran* | sort -V | tail -n 1)" }
[tool.cibuildwheel.windows]
# Force scikit-build-core to use MSYS2/MinGW toolchain instead of MSVC (which lacks Fortran)
environment = { CC = "gcc", CXX = "g++", FC = "gfortran", CMAKE_GENERATOR = "MinGW Makefiles", PATH = "C:\\msys64\\mingw64\\bin;%PATH%" }