Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sage
Path: blob/develop/pyproject.toml
4052 views
1
[build-system]
2
build-backend = 'mesonpy'
3
# Minimum requirements for the build system to execute.
4
requires = [
5
'cypari2 >=2.2.1; sys_platform != "win32"',
6
'meson-python',
7
# Exclude 1.12.0 because of https://github.com/sagemath/cysignals/issues/212
8
'cysignals >=1.11.2, != 1.12.0',
9
# Exclude 3.0.3 because of https://github.com/cython/cython/issues/5748
10
'cython >=3.0, != 3.0.3',
11
'gmpy2 ~=2.1.b999',
12
'jinja2',
13
'memory_allocator',
14
'numpy >=1.25',
15
]
16
[tool.meson-python.args]
17
# Prevent meson from trying to install the autoconf subprojects
18
# otherwise we hit https://github.com/mesonbuild/meson-python/issues/598
19
# The subprojects have to set the rpath to the build directory, which should work as long as
20
# we don't use build isolation.
21
# 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
22
# This actually covers all current subprojects; so just don't install any of them.
23
install = ['--skip-subprojects']
24
# Ensure that ``library`` targets are built as static, and nothing gets installed
25
setup = ['--default-library=static']
26
27
[project]
28
authors = [
29
{ email = "[email protected]", name = "The Sage Developers" },
30
]
31
classifiers = [
32
"Development Status :: 6 - Mature",
33
"Intended Audience :: Education",
34
"Intended Audience :: Science/Research",
35
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
36
"Operating System :: MacOS :: MacOS X",
37
"Operating System :: POSIX",
38
"Programming Language :: Python :: 3 :: Only",
39
"Programming Language :: Python :: 3.11",
40
"Programming Language :: Python :: 3.12",
41
"Programming Language :: Python :: 3.13",
42
"Programming Language :: Python :: Implementation :: CPython",
43
"Topic :: Scientific/Engineering :: Mathematics",
44
]
45
dependencies = [
46
'conway-polynomials >=0.8',
47
'cypari2 >=2.2.1; sys_platform != "win32"',
48
'six >=1.15.0',
49
# Exclude 1.12.0 because of https://github.com/sagemath/cysignals/issues/212
50
'cysignals >=1.11.2, != 1.12.0',
51
'cython >=3.0, != 3.0.3',
52
'fpylll >=0.5.9; sys_platform != "win32"',
53
'gmpy2 ~=2.1.b999',
54
'ipykernel >=5.2.1',
55
'ipython >=8.9.0',
56
'ipywidgets >=7.5.1',
57
'jupyter-client',
58
'matplotlib >=3.7.0',
59
'memory_allocator',
60
'mpmath >=1.1.0',
61
'networkx >=3.1',
62
'numpy >=1.25',
63
'pexpect >=4.8.0',
64
'pillow >=7.2.0',
65
'platformdirs',
66
# Issue #30922: pplpy 0.8.4 and earlier do not declare dependencies correctly
67
'pplpy >=0.8.6; sys_platform != "win32"',
68
'primecountpy; sys_platform != "win32"',
69
'ptyprocess > 0.5',
70
'requests >=2.13.0',
71
'scipy >=1.11',
72
'sphinx >=5.2, <9',
73
'sympy >=1.6, <2.0',
74
# According to https://github.com/python/typing_extensions/blob/main/CHANGELOG.md,
75
# version 4.4.0 adds another Python 3.11 typing backport
76
'typing_extensions >= 4.4.0; python_version<"3.11"',
77
# TODO: Remove this once the migration to meson is complete
78
'pkgconfig',
79
'traitlets',
80
]
81
description = "Sage: Open Source Mathematics Software: Standard Python Library"
82
dynamic = ["version"]
83
license = { text = "GNU General Public License (GPL) v2 or later" }
84
name = "sagemath"
85
requires-python = ">=3.11, <3.14"
86
urls = { Homepage = "https://www.sagemath.org" }
87
88
[project.optional-dependencies]
89
R = ['rpy2 >=3.3']
90
extra = [
91
'igraph',
92
'lrcalc ~=2.1; sys_platform != "win32"',
93
'p_group_cohomology >=3.3', # Only used in tests
94
'pycosat >=0.6.3',
95
'pynormaliz >=2.18; platform_machine != "aarch64" and platform_machine != "arm64"', # Not yet available for Linux aarch64
96
'sage_numerical_backends_coin',
97
'symengine >= 0.6.1', # Only used in tests
98
]
99
giac = ['sagemath_giac']
100
101
[project.readme]
102
content-type = "text/markdown"
103
file = "README.md"
104
105
[project.scripts]
106
sage = "sage.cli:main"
107
108
[tool.conda-lock]
109
platforms = ['linux-64', 'linux-aarch64', 'osx-64', 'osx-arm64']
110
111
[tool.pytest.ini_options]
112
norecursedirs = "local prefix venv build builddir pkgs .git src/doc src/bin src/sage_setup/autogen/flint tools"
113
python_files = "*_test.py"
114
# The "no:warnings" is to stop pytest from capturing warnings so that they are printed to the output of the doctest
115
addopts = "--import-mode importlib -p no:warnings"
116
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
117
# https://docs.pytest.org/en/stable/reference/reference.html#confval-consider_namespace_packages
118
consider_namespace_packages = true
119
120
# External dependencies in the format proposed by https://peps.python.org/pep-0725
121
[external]
122
build-requires = [
123
"pkg:generic/pkg-config",
124
"virtual:compiler/c",
125
"virtual:compiler/cpp",
126
]
127
128
host-requires = [
129
"pkg:generic/boost",
130
"pkg:generic/cddlib",
131
"pkg:generic/cliquer",
132
"pkg:generic/ecl",
133
"pkg:generic/ecm",
134
"pkg:generic/fflas-ffpack",
135
"pkg:generic/flint",
136
"pkg:generic/gap",
137
"pkg:generic/gfan",
138
"pkg:generic/givaro",
139
"pkg:generic/glpk",
140
"pkg:generic/gmp",
141
"pkg:generic/gsl",
142
"pkg:generic/iml",
143
"pkg:generic/lcalc",
144
"pkg:generic/libbraiding",
145
"pkg:generic/libgd",
146
"pkg:generic/libhomfly",
147
"pkg:generic/linbox",
148
"pkg:generic/lrcalc",
149
"pkg:generic/m4ri",
150
"pkg:generic/m4rie",
151
"pkg:generic/maxima",
152
"pkg:generic/mpc",
153
"pkg:generic/mpfi",
154
"pkg:generic/mpfr",
155
"pkg:generic/nauty",
156
"pkg:generic/ntl",
157
"pkg:generic/palp",
158
"pkg:generic/pari",
159
"pkg:generic/pari-elldata",
160
"pkg:generic/pari-galdata",
161
"pkg:generic/pari-seadata",
162
"pkg:generic/planarity",
163
"pkg:generic/primecount",
164
"pkg:generic/primesieve",
165
"pkg:generic/qhull",
166
"pkg:generic/rw",
167
"pkg:generic/singular",
168
"pkg:generic/symmetrica",
169
"pkg:generic/sympow",
170
"virtual:compiler/fortran",
171
"virtual:interface/blas",
172
]
173
174
dependencies = [
175
"pkg:generic/sagemath-elliptic-curves",
176
"pkg:generic/sagemath-graphs",
177
"pkg:generic/sagemath-polytopes-db",
178
"pkg:generic/tachyon",
179
]
180
181
[external.optional-host-requires]
182
extra = [
183
"pkg:generic/bliss",
184
"pkg:generic/brial",
185
"pkg:generic/coxeter3",
186
"pkg:generic/eclib",
187
"pkg:generic/mcqd",
188
"pkg:generic/meataxe",
189
"pkg:generic/sirocco",
190
"pkg:generic/tdlib",
191
]
192
193
[external.optional-dependencies]
194
R = ["pkg:generic/r-lattice"]
195
extra = [
196
"pkg:generic/4ti2",
197
"pkg:generic/benzene",
198
"pkg:generic/buckygen",
199
"pkg:generic/csdp",
200
"pkg:generic/frobby",
201
"pkg:generic/kenzo",
202
"pkg:generic/latte-integrale",
203
"pkg:generic/lrslib",
204
"pkg:generic/plantri",
205
"pkg:generic/qepcad",
206
"pkg:generic/tides",
207
]
208
# Uncommented for now as most devs probably don't need to run it locally
209
# docs-pdf = [
210
# "pkg:generic/latexmk",
211
# "pkg:generic/lualatex",
212
# "pkg:fonts/freefonts",
213
# "pkg:generic/xindy",
214
# ]
215
216
[dependency-groups]
217
dev = ["conda-lock", "grayskull", "meson", "pygithub", "toml", "tqdm", "uv"]
218
docs = [
219
"furo",
220
"jupyter-sphinx",
221
"python-dateutil",
222
"sphinx",
223
"sphinx-copybutton",
224
"sphinx-inline-tabs",
225
]
226
lint = ["flake8-rst-docstrings", "pycodestyle", "relint", "ruff"]
227
test = ["coverage", "pytest", "pytest-xdist"]
228
229
[tool.ruff]
230
# https://docs.astral.sh/ruff/configuration
231
232
# Python 3.11 is the minimum supported version
233
target-version = "py311"
234
235
[tool.ruff.lint]
236
ignore = [
237
"E501", # Line too long - hard to avoid in doctests, and better handled by black.
238
]
239
select = [
240
"E", # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e
241
"F", # pyflakes - https://docs.astral.sh/ruff/rules/#pyflakes-f
242
"I", # isort - https://docs.astral.sh/ruff/rules/#isort-i
243
"PL", # pylint - https://docs.astral.sh/ruff/rules/#pylint-pl
244
]
245
246
[tool.ruff.lint.per-file-ignores]
247
"all.py" = [
248
"F401", # Unused import - these files are by definition collections of imports.
249
]
250
251
[tool.uv]
252
# Don't use build isolation for sage (it's incompatible with meson-python's editable install)
253
no-build-isolation-package = ["sagemath"]
254
255