forked from sagemath/sage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
275 lines (257 loc) · 7.89 KB
/
pyproject.toml
File metadata and controls
275 lines (257 loc) · 7.89 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
[build-system]
build-backend = 'mesonpy'
# Minimum requirements for the build system to execute.
requires = [
'cypari2 >=2.2.1; sys_platform != "win32"',
'meson-python',
# Exclude 1.12.0 because of https://github.com/sagemath/cysignals/issues/212
'cysignals >=1.12.1',
'cython >=3.1.0',
'gmpy2 >=2.1.5',
'jinja2',
'memory_allocator',
'numpy >=2.2.4',
]
[tool.meson-python.args]
# Prevent meson from trying to install the autoconf subprojects
# otherwise we hit https://github.com/mesonbuild/meson-python/issues/598
# The subprojects have to set the rpath to the build directory, which should work as long as
# we don't use build isolation.
# Also don't install subprojects providing static libraries as per https://mesonbuild.com/meson-python/how-to-guides/shared-libraries.html#static-library-from-subproject
# This actually covers all current subprojects; so just don't install any of them.
install = ['--skip-subprojects']
# Ensure that ``library`` targets are built as static, and nothing gets installed
setup = ['--default-library=static']
[project]
authors = [
{ email = "sage-support@googlegroups.com", name = "The Sage Developers" },
]
classifiers = [
"Development Status :: 6 - Mature",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Mathematics",
]
dependencies = [
'conway-polynomials >=0.8',
'cypari2 >=2.2.1; sys_platform != "win32"',
'six >=1.15.0',
# Exclude 1.12.0 because of https://github.com/sagemath/cysignals/issues/212
'cysignals >=1.12.1',
'cython >=3.1.0',
'fpylll >=0.5.9; sys_platform != "win32"',
'gmpy2 >=2.1.5',
'ipykernel >=5.2.1',
'ipython >=8.9.0',
'ipywidgets >=7.5.1',
'jupyter-client',
'matplotlib >=3.7.0',
'memory_allocator',
'mpmath >=1.1.0',
'networkx >=3.1',
'numpy >=1.25',
'pexpect >=4.8.0',
'pillow >=7.2.0',
'platformdirs',
# Issue #30922: pplpy 0.8.4 and earlier do not declare dependencies correctly
'pplpy >=0.8.6; sys_platform != "win32"',
'primecountpy; sys_platform != "win32"',
'ptyprocess > 0.5',
'requests >=2.13.0',
'scipy >=1.11',
'sphinx >=6.2, <9',
'sympy >=1.6, <2.0',
# TODO: Remove this once the migration to meson is complete
'pkgconfig',
'traitlets',
]
description = "Sage: Open Source Mathematics Software: Standard Python Library"
dynamic = ["version"]
license = { text = "GNU General Public License (GPL) v2 or later" }
name = "sagemath"
requires-python = ">=3.12, <3.15"
urls = { Homepage = "https://www.sagemath.org" }
[project.optional-dependencies]
R = ['rpy2 >=3.3']
extra = [
'igraph',
'lrcalc ~=2.1; sys_platform != "win32"',
#'p_group_cohomology >=3.3', # Only used in tests, not available on PyPI
'pycosat >=0.6.3',
'pynormaliz >=2.18; platform_machine != "aarch64" and platform_machine != "arm64"', # Not yet available for Linux aarch64
'sage_numerical_backends_coin',
'symengine >= 0.6.1', # Only used in tests
]
#giac = ['sagemath_giac'] # Not yet available on PyPI (https://github.com/sagemath/sagemath-giac/issues/3)
[project.readme]
content-type = "text/markdown"
file = "README.md"
[project.scripts]
sage = "sage.cli.__main__:main"
[tool.conda-lock]
platforms = ['linux-64', 'linux-aarch64', 'osx-64', 'osx-arm64']
[tool.pytest.ini_options]
norecursedirs = "local prefix venv build builddir pkgs .git src/doc src/bin src/sage_setup/autogen/flint tools subprojects"
python_files = "*_test.py"
# The "no:warnings" is to stop pytest from capturing warnings so that they are printed to the output of the doctest
addopts = "--import-mode importlib -p no:warnings"
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
# https://docs.pytest.org/en/stable/reference/reference.html#confval-consider_namespace_packages
consider_namespace_packages = true
# External dependencies in the format proposed by https://peps.python.org/pep-0725
[external]
build-requires = [
"pkg:generic/pkg-config",
"virtual:compiler/c",
"virtual:compiler/cpp",
]
host-requires = [
"pkg:generic/boost",
"pkg:generic/cddlib",
"pkg:generic/cliquer",
"pkg:generic/ecl",
"pkg:generic/ecm",
"pkg:generic/fflas-ffpack",
"pkg:generic/flint",
"pkg:generic/gap",
"pkg:generic/gfan",
"pkg:generic/givaro",
"pkg:generic/glpk",
"pkg:generic/gmp",
"pkg:generic/gsl",
"pkg:generic/iml",
"pkg:generic/lcalc",
"pkg:generic/libbraiding",
"pkg:generic/libgd",
"pkg:generic/libhomfly",
"pkg:generic/linbox",
"pkg:generic/lrcalc",
"pkg:generic/m4ri",
"pkg:generic/m4rie",
"pkg:generic/maxima",
"pkg:generic/mpc",
"pkg:generic/mpfi",
"pkg:generic/mpfr",
"pkg:generic/nauty",
"pkg:generic/ntl",
"pkg:generic/palp",
"pkg:generic/pari",
"pkg:generic/pari-elldata",
"pkg:generic/pari-galdata",
"pkg:generic/pari-seadata",
"pkg:generic/planarity",
"pkg:generic/primecount",
"pkg:generic/primesieve",
"pkg:generic/qhull",
"pkg:generic/rw",
"pkg:generic/singular",
"pkg:generic/symmetrica",
"pkg:generic/sympow",
"virtual:compiler/fortran",
"virtual:interface/blas",
]
dependencies = [
"pkg:generic/sagemath-elliptic-curves",
"pkg:generic/sagemath-graphs",
"pkg:generic/sagemath-polytopes-db",
"pkg:generic/tachyon",
]
[external.optional-host-requires]
extra = [
"pkg:generic/bliss",
"pkg:generic/brial",
"pkg:generic/coxeter3",
"pkg:generic/eclib",
"pkg:generic/mcqd",
"pkg:generic/meataxe",
"pkg:generic/sirocco",
"pkg:generic/tdlib",
]
[external.optional-dependencies]
R = ["pkg:generic/r-lattice"]
extra = [
"pkg:generic/4ti2",
"pkg:generic/benzene",
"pkg:generic/buckygen",
"pkg:generic/csdp",
"pkg:generic/frobby",
"pkg:generic/kenzo",
"pkg:generic/latte-integrale",
"pkg:generic/lrslib",
"pkg:generic/plantri",
"pkg:generic/qepcad",
"pkg:generic/tides",
]
# Uncommented for now as most devs probably don't need to run it locally
# docs-pdf = [
# "pkg:generic/latexmk",
# "pkg:generic/lualatex",
# "pkg:fonts/freefonts",
# "pkg:generic/xindy",
# ]
[dependency-groups]
dev = [
"conda-lock",
"grayskull",
"meson",
"pygithub",
"python-build",
"tqdm",
"uv",
]
docs = [
"furo",
"jupyter-sphinx",
"python-dateutil",
"sphinx",
"sphinx-copybutton",
"sphinx-inline-tabs",
]
lint = ["flake8-rst-docstrings", "pycodestyle", "relint", "ruff"]
test = ["coverage", "pytest", "pytest-xdist"]
[tool.ruff]
# https://docs.astral.sh/ruff/configuration
# Python 3.12 is the minimum supported version
target-version = "py312"
# This directory is full of old autogenerated files.
# Linting it would just get in the way of adding stricter linter rules
# to our actual code
exclude = ["src/doc/"]
[tool.ruff.lint]
ignore = [
"E501", # Line too long - hard to avoid in doctests, and better handled by black.
]
select = [
"E", # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e
"F", # pyflakes - https://docs.astral.sh/ruff/rules/#pyflakes-f
"I", # isort - https://docs.astral.sh/ruff/rules/#isort-i
"PL", # pylint - https://docs.astral.sh/ruff/rules/#pylint-pl
# ruff-specific rules -- https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
"RUF013",
"RUF036",
"TC", # flake8-type-checking - https://docs.astral.sh/ruff/rules/#flake8-type-checking-tc
# pyupgrade -- https://docs.astral.sh/ruff/rules/#pyupgrade-up
"UP004",
"UP006",
"UP008",
"UP010",
"UP015",
"UP022",
"UP034",
"UP035",
]
[tool.ruff.lint.per-file-ignores]
"all.py" = [
"F401", # Unused import - these files are by definition collections of imports.
]
[tool.uv]
# Don't use build isolation for sage (it's incompatible with meson-python's editable install)
no-build-isolation-package = ["sagemath"]