11[build-system ]
2- requires = [" setuptools" ,
3- " numpy; sys_platform == 'win32' and python_version < '3.12'" ,
4- " Cython>=3" ]
5- build-backend = " setuptools.build_meta"
2+ requires = [" meson-python" , " cython" ]
3+ build-backend = " mesonpy"
64
75[project ]
86name = " python-flint"
@@ -21,18 +19,46 @@ classifiers = [
2119file = " README.md"
2220content-type = " text/markdown"
2321
22+ [tool .spin ]
23+ package = " flint"
24+
25+ [tool .spin .commands ]
26+
27+ "Build" = [
28+ " spin.cmds.meson.build" ,
29+ " spin.cmds.meson.test" ,
30+ " spin.cmds.build.sdist" ,
31+ " spin.cmds.pip.install" ,
32+ ]
33+ "Documentation" = [
34+ " spin.cmds.meson.docs" ,
35+ ]
36+ "Environments" = [
37+ " spin.cmds.meson.shell" ,
38+ " spin.cmds.meson.ipython" ,
39+ " spin.cmds.meson.python" ,
40+ " spin.cmds.meson.run" ,
41+ ]
42+
2443[tool .cibuildwheel ]
2544build = " cp39-* cp310-* cp311-* cp312-*"
2645skip = " *-win32 *-manylinux_i686 *-musllinux_*"
2746manylinux-x86_64-image = " manylinux2014"
2847manylinux-i686-image = " manylinux2014"
2948test-command = " python -c \" import flint; print(str(flint.fmpz(2)))\" "
3049
31- [tool .cibuildwheel .environment ]
32- # bin/build_dependencies_unix.sh places headers and shared libraries under .local
33- C_INCLUDE_PATH = " $(pwd)/.local/include/"
34- LIBRARY_PATH = " $(pwd)/.local/lib/"
50+ [tool .cibuildwheel .linux .environment ]
51+ # LD_LIBRARY_PATH is needed by auditwheel
3552LD_LIBRARY_PATH = " $(pwd)/.local/lib:$LD_LIBRARY_PATH"
53+ PKG_CONFIG_PATH = " $(pwd)/.local/lib/pkgconfig"
54+
55+ [tool .cibuildwheel .macos .environment ]
56+ PKG_CONFIG_PATH = " $(pwd)/.local/lib/pkgconfig"
57+
58+ [tool .cibuildwheel .windows .environment ]
59+ # Setting PKG_CONFIG_PATH here breaks pkgconfig for some reason...
60+ # We set it in the CI workflow instead.
61+ # PKG_CONFIG_PATH = "$(pwd)/.local/lib/pkgconfig:$PKG_CONFIG_PATH"
3662
3763[tool .cibuildwheel .linux ]
3864before-all = " bin/cibw_before_all_linux.sh"
@@ -44,6 +70,3 @@ before-all = "bin/cibw_before_all_macosx_$(uname -m).sh"
4470before-all = " C:\\ msys64\\ usr\\ bin\\ bash bin/cibw_before_all_windows.sh"
4571before-build = " pip install delvewheel && C:\\ msys64\\ usr\\ bin\\ bash bin/cibw_before_build_windows.sh"
4672repair-wheel-command = " bin\\ cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}"
47-
48- [tool .cibuildwheel .windows .environment ]
49- PYTHON_FLINT_MINGW64 = " true"
0 commit comments