-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathpyproject.toml
More file actions
178 lines (155 loc) · 6.54 KB
/
pyproject.toml
File metadata and controls
178 lines (155 loc) · 6.54 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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
[project]
name = "python-flint"
description = "Bindings for FLINT"
version = "0.8.0"
# This needs to be in sync with README, and CI config.
requires-python = ">= 3.11"
authors = [
{name = "Fredrik Johansson", email = "fredrik.johansson@gmail.com"},
{name = "Oscar Benjamin", email = "oscar.j.benjamin@gmail.com"},
]
license = "MIT"
license-files = ["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) version 3.1.0 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 include an upper bound 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.18", "cython >=3.1,<3.3"]
build-backend = "mesonpy"
[tool.meson-python]
limited-api = true
[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.mypy]
files = ["src"]
[tool.pytest.ini_options]
addopts = "--import-mode=importlib"
[tool.cibuildwheel]
skip = "*-win32 *-manylinux_i686 *-manylinux_armv7l *-musllinux_*"
enable = [
# Uncomment this to test beta versions of CPython in CI (but comment out
# again if releasing while CPython is in beta):
# "cpython-prerelease",
"cpython-freethreading",
"pypy",
]
manylinux-x86_64-image = "manylinux2014"
manylinux-aarch64-image = "manylinux_2_28"
manylinux-i686-image = "manylinux2014"
[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"
before-build = "pip install wheel auditwheel"
repair-wheel-command = [
"""bin/cibw_repair_wheel_licenses.py {wheel} \
--license LGPL-3.0-or-later \
--license-file '.local/src/gmp-*/COPYING:python-flint.libs/gmp-*/COPYING' \
--license-file '.local/src/gmp-*/COPYING.LESSERv3:python-flint.libs/gmp-*/COPYING.LESSERv3' \
--license-file '.local/src/mpfr-*/COPYING:python-flint.libs/mpfr-*/COPYING' \
--license-file '.local/src/mpfr-*/COPYING.LESSER:python-flint.libs/mpfr-*/COPYING.LESSER' \
--license-file '.local/src/flint-*/COPYING:python-flint.libs/flint-*/COPYING' \
--license-file '.local/src/flint-*/COPYING.LESSER:python-flint.libs/flint-*/COPYING.LESSER' \
""",
"auditwheel repair -w {dest_dir} {wheel}",
]
[tool.cibuildwheel.macos]
before-all = "bin/cibw_before_all_macosx_$(uname -m).sh"
before-build = "pip install wheel delocate"
repair-wheel-command = [
"""bin/cibw_repair_wheel_licenses.py {wheel} \
--license LGPL-3.0-or-later \
--license-file '.local/src/gmp-*/COPYING:python-flint.libs/gmp-*/COPYING' \
--license-file '.local/src/gmp-*/COPYING.LESSERv3:python-flint.libs/gmp-*/COPYING.LESSERv3' \
--license-file '.local/src/mpfr-*/COPYING:python-flint.libs/mpfr-*/COPYING' \
--license-file '.local/src/mpfr-*/COPYING.LESSER:python-flint.libs/mpfr-*/COPYING.LESSER' \
--license-file '.local/src/flint-*/COPYING:python-flint.libs/flint-*/COPYING' \
--license-file '.local/src/flint-*/COPYING.LESSER:python-flint.libs/flint-*/COPYING.LESSER' \
""",
"delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}",
]
[tool.cibuildwheel.windows]
before-all = "C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_windows.sh"
before-build = "pip install wheel delvewheel"
repair-wheel-command = [
"""python bin/cibw_repair_wheel_licenses.py {wheel} \
--license LGPL-3.0-or-later \
--license-file .local/src/gmp-*/COPYING:python-flint.libs/gmp-*/COPYING \
--license-file .local/src/gmp-*/COPYING.LESSERv3:python-flint.libs/gmp-*/COPYING.LESSERv3 \
--license-file .local/src/mpfr-*/COPYING:python-flint.libs/mpfr-*/COPYING \
--license-file .local/src/mpfr-*/COPYING.LESSER:python-flint.libs/mpfr-*/COPYING.LESSER \
--license-file .local/src/flint-*/COPYING:python-flint.libs/flint-*/COPYING \
--license-file .local/src/flint-*/COPYING.LESSER:python-flint.libs/flint-*/COPYING.LESSER \
\
--license "MIT AND BSD-3-Clause-Clear" \
--license-file wheels/winpthreads/COPYING:python-flint.libs/winpthreads/COPYING \
\
--license "GPL-3.0-or-later WITH GCC-exception-3.1 AND LGPL-2.1-or-later" \
--license-file wheels/gcc/COPYING3:python-flint.libs/gcc/COPYING3 \
--license-file wheels/gcc/COPYING.LIB:python-flint.libs/gcc/COPYING.LIB \
--license-file wheels/gcc/COPYING.RUNTIME:python-flint.libs/gcc/COPYING.RUNTIME \
""",
"delvewheel repair -w {dest_dir} {wheel} --add-path .local/bin",
]