1
1
[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"
6
4
7
5
[project ]
8
6
name = " python-flint"
@@ -21,18 +19,46 @@ classifiers = [
21
19
file = " README.md"
22
20
content-type = " text/markdown"
23
21
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
+
24
43
[tool .cibuildwheel ]
25
44
build = " cp39-* cp310-* cp311-* cp312-*"
26
45
skip = " *-win32 *-manylinux_i686 *-musllinux_*"
27
46
manylinux-x86_64-image = " manylinux2014"
28
47
manylinux-i686-image = " manylinux2014"
29
48
test-command = " python -c \" import flint; print(str(flint.fmpz(2)))\" "
30
49
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
35
52
LD_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"
36
62
37
63
[tool .cibuildwheel .linux ]
38
64
before-all = " bin/cibw_before_all_linux.sh"
@@ -44,6 +70,3 @@ before-all = "bin/cibw_before_all_macosx_$(uname -m).sh"
44
70
before-all = " C:\\ msys64\\ usr\\ bin\\ bash bin/cibw_before_all_windows.sh"
45
71
before-build = " pip install delvewheel && C:\\ msys64\\ usr\\ bin\\ bash bin/cibw_before_build_windows.sh"
46
72
repair-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