-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathpyproject.toml
131 lines (114 loc) · 4.58 KB
/
pyproject.toml
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
[project]
name = "python-flint"
description = "Bindings for FLINT"
version = "0.7.1"
# This needs to be in sync with README, cibuildwheel and CI config.
requires-python = ">= 3.11"
authors = [
{name = "Fredrik Johansson", email = "[email protected]"},
{name = "Oscar Benjamin", email = "[email protected]"},
]
license = {file = "LICENSE"}
classifiers = [
"Topic :: Scientific/Engineering :: Mathematics",
]
[project.urls]
Homepage = "https://github.com/flintlib/python-flint"
Documentation = "https://python-flint.readthedocs.io/en/latest/"
Repository = "https://github.com/flintlib/python-flint"
Changelog = "https://github.com/flintlib/python-flint/blob/master/README.md#changelog"
[project.readme]
file = "README.md"
content-type = "text/markdown"
[build-system]
#
# Minimum build requirements tested in CI need to be kept in sync with the
# versions in requires below so that they are tested.
#
# To support the freethreaded build (CPython 3.13t) the alpha release 3.1.0a1
# of Cython is needed as a minimum requirement. It is possible that future
# versions of Cython might still work but typically a Cython release breaks
# something in the build of python-flint so we pin the exact version here.
#
# Apart from the freethreading build any Cython version from 3.0.11 onwards is
# fine. It is not possible to have a separate version constraint here for the
# freethreading build only though.
#
requires = ["meson-python>=0.13", "cython==3.1.0a1"]
build-backend = "mesonpy"
[tool.cython-lint]
# E129 visually indented line with same indent as next logical line
# Reasoning: this rule is a little controversial
# (see https://github.com/PyCQA/pycodestyle/issues/386)
# and we ignore it to avoid needing additional indentation after
# long logical statements.
#
# E501 line too long (128 > 120 characters)
# Reasoning: this is a work in progress and will be enforced once a line length
# and refactor has taken place. See issue #214
#
# E741 ambiguous variable name
# Reasoning: many places it makes sense to use l or other letters as variable
# names as it is standard in mathematical notation.
max-line-length = 120
ignore = ['E129','E501','E741']
exclude = 'src/flint/flintlib/functions.*'
[tool.spin]
package = "flint"
[tool.spin.commands]
"Build" = [
"spin.cmds.meson.build",
"spin.cmds.meson.test",
"spin.cmds.build.sdist",
"spin.cmds.pip.install",
]
"Documentation" = [
"spin.cmds.meson.docs",
]
"Environments" = [
"spin.cmds.meson.shell",
"spin.cmds.meson.ipython",
"spin.cmds.meson.python",
"spin.cmds.meson.run",
]
[tool.cibuildwheel]
# requires-python needs to keep in sync with this and also the list of Python
# versions the wheels are tested against in CI.
build = "cp311-* cp312-* cp313-* cp313t-*" # pp311-*"
skip = "*-win32 *-manylinux_i686 *-musllinux_*"
# Enable building for free-threaded CPython builds
enable = ["cpython-freethreading"]
manylinux-x86_64-image = "manylinux2014"
manylinux-aarch64-image = "manylinux_2_28"
manylinux-i686-image = "manylinux2014"
test-command = "python -c \"import flint; print(str(flint.fmpz(2)))\""
[tool.cibuildwheel.linux.environment]
# LD_LIBRARY_PATH is needed by auditwheel
LD_LIBRARY_PATH = "$(pwd)/.local/lib:$LD_LIBRARY_PATH"
PKG_CONFIG_PATH = "$(pwd)/.local/lib/pkgconfig"
[tool.cibuildwheel.macos.environment]
PKG_CONFIG_PATH = "$(pwd)/.local/lib/pkgconfig"
[tool.cibuildwheel.windows.environment]
# Setting PKG_CONFIG_PATH here breaks pkgconfig for some reason...
# We set it in the CI workflow instead.
# PKG_CONFIG_PATH = "$(pwd)/.local/lib/pkgconfig:$PKG_CONFIG_PATH"
[tool.cibuildwheel.linux]
before-all = "bin/cibw_before_all_linux_$(uname -m).sh"
[tool.cibuildwheel.macos]
before-all = "bin/cibw_before_all_macosx_$(uname -m).sh"
[tool.cibuildwheel.windows]
before-all = "C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_windows.sh"
before-build = "pip install delvewheel"
repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel} --add-path .local/bin"
# Previously with setuptools and MinGW it was necessary to run
# bin/cibw_before_build_windows.sh before building the wheel to create the
# libpython*.a files. This is no longer necessary now meson is used:
#
# before-build = "pip install delvewheel && C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh"
#
# Previously a custom delvewheel command was needed because delvewheel would
# reject binaries created with MinGW unless they had been stripped. This is not
# needed any more with newer versions of delvewheel:
#
# repair-wheel-command = "bin\\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}"
#