-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
82 lines (77 loc) · 3.49 KB
/
Copy pathpyproject.toml
File metadata and controls
82 lines (77 loc) · 3.49 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
[build-system]
requires = ["scikit-build-core>=0.9", "cmake>=3.18,<4", "ninja"]
build-backend = "scikit_build_core.build"
[project]
name = "pyganak"
version = "2.6.2"
description = "Bindings to Ganak, a high-performance exact model counter"
keywords = ["sat", "model counting", "exact counting", "projected counting"]
license = { file = "LICENSE.txt" }
maintainers = [{name="Mate Soos", email="soos.mate@gmail.com"}]
authors = [{name="Mate Soos", email="soos.mate@gmail.com"}]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Utilities",
]
requires-python = ">=3.9"
readme = "python/README.md"
[tool.scikit-build]
cmake.build-type = "Release"
# BUILD_SHARED_LIBS=OFF → all dependencies become static libs linked into the extension.
# CMAKE_POSITION_INDEPENDENT_CODE=ON → required for linking static libs into a .so.
cmake.args = [
"-DBUILD_PYTHON_EXTENSION=ON",
"-DENABLE_TESTING=OFF",
"-DBUILD_SHARED_LIBS=OFF",
"-DSTATIC_BINARY=OFF",
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
"-DCMAKE_C_COMPILER_LAUNCHER=ccache",
"-DCMAKE_CXX_COMPILER_LAUNCHER=ccache",
]
wheel.packages = [] # no pure-Python packages; extension only
install.components = ["python"] # only install pyganak.so, not the full ganak install
[tool.cibuildwheel]
build = "cp39-* cp310-* cp311-* cp312-* cp313-*"
skip = "pp* *-musllinux* *i686"
build-frontend = "build"
test-requires = "pytest"
test-command = "cd /tmp && pytest {project}/python/tests -v"
[tool.cibuildwheel.linux]
# manylinux_2_34 = AlmaLinux 9; gmp-devel/mpfr-devel ship .pc files, so only FLINT
# needs to be built from source (not packaged in the default repos).
manylinux-x86_64-image = "manylinux_2_34"
manylinux-aarch64-image = "manylinux_2_34"
before-all = """
set -e
yum install -y epel-release && yum install -y ccache curl gcc-c++ mpfr-devel
GMP_VER=6.3.0
curl -fL -o gmp-${GMP_VER}.tar.xz https://gmplib.org/download/gmp/gmp-${GMP_VER}.tar.xz || \
curl -fL -o gmp-${GMP_VER}.tar.xz https://ftp.gnu.org/gnu/gmp/gmp-${GMP_VER}.tar.xz
tar xf gmp-${GMP_VER}.tar.xz
cd gmp-${GMP_VER} && ./configure --prefix=/usr --enable-cxx --disable-static && make -j$(nproc) && make install && cd ..
FLINT_VER=3.1.2
curl -fL -o flint-${FLINT_VER}.tar.gz https://github.com/flintlib/flint/releases/download/v${FLINT_VER}/flint-${FLINT_VER}.tar.gz
tar xf flint-${FLINT_VER}.tar.gz
cd flint-${FLINT_VER} && ./configure --prefix=/usr --disable-static --with-gmp=/usr --with-mpfr=/usr && make -j$(nproc) && make install && cd ..
ldconfig
"""
# CCACHE_DIR must be under /project so the host-side actions/cache step can reach it.
environment = { CCACHE_DIR = "/project/.ccache" }
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
[tool.cibuildwheel.macos]
before-all = "brew install gmp mpfr flint ccache"
environment = { CMAKE_PREFIX_PATH = "/opt/homebrew/opt/flint:/opt/homebrew", CCACHE_DIR = "~/.ccache" }
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"