-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
105 lines (90 loc) · 3.57 KB
/
pyproject.toml
File metadata and controls
105 lines (90 loc) · 3.57 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[build-system]
requires = [
"scikit-build-core>=0.10",
"pybind11>=2.12",
"oldest-supported-numpy",
"setuptools_scm>=7",
]
build-backend = "scikit_build_core.build"
[project]
name = "cpp_hf"
dynamic = ["version"]
description = "Hartree–Fock (k-grid) with FFTW + Eigen via pybind11"
readme = "Readme.md" # keep as-is if this filename exists; otherwise rename file to README.md
requires-python = ">=3.10"
authors = [{ name = "ContiMod contributors" }]
license = { file = "LICENSE" }
keywords = ["hartree-fock", "fftw", "eigen", "pybind11", "condensed-matter", "physics"]
classifiers = [
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: C++",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Topic :: Scientific/Engineering :: Physics",
]
[project.urls]
Homepage = "https://github.com/skilledwolf/cpp_hf"
Issues = "https://github.com/skilledwolf/cpp_hf/issues"
# -------------------- scikit-build-core --------------------
[tool.scikit-build]
# Lock behavior/defaults to your required backend version
minimum-version = "build-system.requires"
# Faster local rebuilds
build-dir = "build/{wheel_tag}"
# Let skbuild fetch CMake/Ninja if system versions are too old
cmake.version = ">=3.26.1"
ninja.version = ">=1.11"
ninja.make-fallback = false
# Static CMake options used everywhere
[tool.scikit-build.cmake.define]
HF_USE_OPENMP = true
HF_USE_FFTW_THREADS = true
# Drive the CMake deployment target from env (fallback 15.0 to match bundled FFTW)
CMAKE_OSX_DEPLOYMENT_TARGET = { env = "MACOSX_DEPLOYMENT_TARGET", default = "15.0" }
# Dynamic version from setuptools_scm (built-in provider)
[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.setuptools_scm"
[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "node-and-date"
fallback_version = "0.0"
[tool.scikit-build.wheel]
# Ensure license/notice files are embedded in the wheel
license-files = ["LICENSE", "THIRD_PARTY_NOTICES.md"]
[tool.scikit-build.sdist]
# Ensure third-party notices are included in the sdist
include = ["LICENSE", "THIRD_PARTY_NOTICES.md"]
# -------------------- cibuildwheel --------------------
[tool.cibuildwheel]
build = "cp310-* cp311-* cp312-*"
skip = "pp* *-musllinux_*"
# Tests
test-requires = ["numpy"]
test-command = "python {project}/ci/smoke_test.py"
# Linux image + pre-steps (runs inside manylinux container)
[tool.cibuildwheel.linux]
before-all = "bash ci/linux_before_all.sh"
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
# macOS builds (Intel & ARM runners use native arch)
[tool.cibuildwheel.macos]
archs = ["native"]
# Ensure delocate finds local FFTW (ARM) / Homebrew libs (Intel)
repair-wheel-command = """
delocate-wheel -L $HOME/.local/lib -L /opt/homebrew/lib -L /usr/local/lib \
--require-archs {delocate_archs} -w {dest_dir} -v {wheel}
"""
[tool.cibuildwheel.macos.environment]
# Baseline deployment target (also feeds scikit-build via define above)
MACOSX_DEPLOYMENT_TARGET = "15.0"
# Help CMake/pkg-config find user-local FFTW on ARM builds
PKG_CONFIG_PATH = "$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH"
CMAKE_PREFIX_PATH = "$HOME/.local:$CMAKE_PREFIX_PATH"
LIBRARY_PATH = "$HOME/.local/lib:$HOME/.local/lib64:$LIBRARY_PATH"
CPATH = "$HOME/.local/include:$CPATH"