[build-system]
# Minimum requirements for the build system to execute.
requires = [
    # 68.1.0 Promote pyproject.toml's [tool.setuptools] out of beta.
    # 68.1.1 Fix editable install finder handling of nested packages
    # 77.0.0 SPDX license expressions
    'setuptools >= 77.0.0',
    # version constraint for macOS Big Sur support (see https://github.com/sagemath/sage/issues/31050)
    'wheel >=0.36.2',
    'cypari2 >=2.2.1',
    # Exclude 1.12.0 because of https://github.com/sagemath/cysignals/issues/212, https://github.com/passagemath/passagemath/issues/445
    'cysignals >=1.11.2, != 1.12.0',
    # Exclude 1.12.4 because of https://github.com/passagemath/passagemath/issues/1318
    'cysignals <1.12.4; sys_platform == "win32"',
    # per https://github.com/scipy/scipy/blob/maintenance/1.13.x/pyproject.toml
    'cython >=3.0.8,<3.1.0',
    'gmpy2 ~=2.1.b999',
    'memory_allocator',
    # per https://github.com/scipy/scipy/blob/maintenance/1.13.x/pyproject.toml
    'numpy >=1.22.4',
    'pkgconfig',
    'jinja2',
]
build-backend = "setuptools.build_meta"

[project]
name = "passagemath-standard"
description = "passagemath: Standard Python Library"
dependencies = [
    'six >=1.15.0',
    # From build/pkgs/sagelib/dependencies
    'conway-polynomials >=0.8',
    'cypari2 >=2.1.1',
    # Exclude 1.12.0 because of https://github.com/sagemath/cysignals/issues/212, https://github.com/passagemath/passagemath/issues/445
    'cysignals >=1.11.2, != 1.12.0',
    # Exclude 1.12.4 because of https://github.com/passagemath/passagemath/issues/1318
    'cysignals <1.12.4; sys_platform == "win32"',
    'cython >=3.0, != 3.0.3, <4.0',
    'gmpy2 ~=2.1.b999',
    # According to https://pypi.org/project/importlib-metadata/,
    # 6.5 provides the features of Python 3.12 importlib.metadata
    'importlib_metadata >=6.5; python_version<"3.12"',
    # According to https://pypi.org/project/importlib-resources/,
    # version 5.7 provides the features of Python 3.12 importlib.resources
    'importlib_resources >= 5.12; python_version<"3.12"',
    'lrcalc ~=2.1',
    'memory_allocator',
    'numpy >=1.19',
    'pkgconfig',
    'passagemath-ppl',
    'passagemath-primesieve-primecount',
    'requests >=2.13.0',
    # According to https://github.com/python/typing_extensions/blob/main/CHANGELOG.md,
    # version 4.7.0 adds another Python 3.12 typing backport
    'typing_extensions >= 4.7.0; python_version<"3.13"',
    # From Makefile.in: SAGERUNTIME
    'ipython >=7.13.0',
    'pexpect >=4.8.0',
    # From Makefile.in: DOC_DEPENDENCIES
    'sphinx >=5.2, <9',
    'networkx >=2.4',
    # 1.8 is known good version.
    # Per https://docs.scipy.org/doc/scipy/dev/core-dev/index.html#version-numbering
    # and https://docs.scipy.org/doc/scipy/dev/core-dev/index.html#deprecations,
    # deprecations cannot be introduced in micro releases.
    # SciPy devs wait "at least 6 months", "in practice two (minor) releases"
    # from deprecation to removal of a feature.
    'scipy >=1.5',
    'sympy >=1.6, <2.0',
    # Issue #33642: Set lower bound for use of matplotlib color maps introduced in #33491,
    # and to suppress deprecation warnings (https://github.com/matplotlib/matplotlib/pull/21073)
    'matplotlib >=3.5.1',
    'pillow >=7.2.0',
    'mpmath >=1.1.0, <1.4',
    'ipykernel >=5.2.1',
    'jupyter-client',
    'ipywidgets >=7.5.1',
    'fpylll >=0.5.9',
    'ptyprocess > 0.5',
]
dynamic = ["version"]
# duplicated from m4/pyproject_toml_metadata.m4
license = {text = "GNU General Public License (GPL) v2 or later"}
authors = [{name = "The Sage Developers", email = "sage-support@googlegroups.com"}]
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 :: POSIX",
    "Operating System :: MacOS :: MacOS X",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Python :: Implementation :: CPython",
    "Topic :: Scientific/Engineering :: Mathematics",
]
urls = {Homepage = "https://www.sagemath.org"}
requires-python = ">=3.10, <3.14"

[project.optional-dependencies]
R = [
    'rpy2 >=3.3',
]
bliss = [
    'sagemath-bliss',
]
brial = [
    'sagemath-brial',
]
coxeter3 = [
    'sagemath-coxeter3',
]
mcqd = [
    'sagemath-mcqd',
]
meataxe = [
    'sagemath-meataxe',
]
sirocco = [
    'sagemath-sirocco',
]
tdlib    = [
    'sagemath-tdlib',
]

[project.readme]
file = "README.rst"
content-type = "text/x-rst"

[tool.conda-lock]
platforms = [
    'osx-64', 'linux-64', 'linux-aarch64', 'osx-arm64'
]

[tool.setuptools]
script-files = [
    # The sage script
    "bin/sage",
    # Other scripts that should be in the path also for OS packaging of sage:
    "bin/sage-eval",
    # Included because it is useful for doctesting/coverage testing user scripts too:
    "bin/sage-runtests",
    "bin/sage-fixdoctests",
    "bin/sage-coverage",
    # Helper scripts invoked by sage script
    # (they would actually belong to something like libexec)
    "bin/sage-cachegrind",
    "bin/sage-callgrind",
    "bin/sage-massif",
    "bin/sage-omega",
    "bin/sage-valgrind",
    "bin/sage-venv-config",
    "bin/sage-version.sh",
    "bin/sage-cleaner",
    # Only makes sense in sage-the-distribution. TODO: Move to another installation script.
    "bin/sage-list-packages",
    # Uncategorized scripts in alphabetical order
    "bin/math-readline",
    "bin/sage-env",
    # sage-env-config -- installed by sage_conf
    # sage-env-config.in -- not to be installed
    "bin/sage-grep",
    "bin/sage-grepdoc",
    "bin/sage-inline-fortran",
    "bin/sage-ipynb2rst",
    "bin/sage-ipython",
    "bin/sage-notebook",
    "bin/sage-num-threads.py",
    "bin/sage-preparse",
    "bin/sage-python",
    "bin/sage-run",
    "bin/sage-run-cython",
    "bin/sage-startuptime.py",
]
license-files = ["LICENSE.txt"]
include-package-data = false

[tool.setuptools.package-data]
"sage.libs.gap" = ["sage.gaprc"]
"sage.interfaces" = ["sage-maxima.lisp"]
"sage.doctest" = ["tests/*"]
"sage.repl.rich_output" = ["example*"]
sage = [
    "ext_data/*",
    "ext_data/kenzo/*",
    "ext_data/singular/*",
    "ext_data/singular/function_field/*",
    "ext_data/images/*",
    "ext_data/doctest/*",
    "ext_data/doctest/invalid/*",
    "ext_data/gap/*",
    "ext_data/gap/joyner/*",
    "ext_data/mwrank/*",
    "ext_data/notebook-ipython/*",
    "ext_data/nbconvert/*",
    "ext_data/graphs/*",
    "ext_data/pari/*",
    "ext_data/pari/dokchitser/*",
    "ext_data/pari/buzzard/*",
    "ext_data/pari/simon/*",
    "ext_data/magma/*",
    "ext_data/magma/latex/*",
    "ext_data/magma/sage/*",
    "ext_data/valgrind/*",
    "ext_data/threejs/*",
]

[tool.setuptools.dynamic]
version = {file = ["VERSION.txt"]}

[external]
# External dependencies in the format proposed by https://peps.python.org/pep-0725
# In the future, sage-the-distribution can read this information
build-requires = [
  "virtual:compiler/c",
  "virtual:compiler/cpp",
  "pkg:generic/pkg-config"
]

host-requires = [
  "virtual:interface/blas",
  "pkg:generic/boost",
  "pkg:generic/brial",
  "pkg:generic/cddlib",
  "pkg:generic/cliquer",
  "pkg:generic/ecl",
  "pkg:generic/eclib",
  "pkg:generic/ecm",
  "pkg:generic/fflas-ffpack",
  "pkg:generic/fplll",
  "pkg:generic/flint",
  "pkg:generic/libgd",
  "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/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/ppl",
  "pkg:generic/primesieve",
  "pkg:generic/primecount",
  "pkg:generic/qhull",
  "pkg:generic/rw",
  "pkg:generic/singular",
  "pkg:generic/symmetrica",
  "pkg:generic/sympow",
]

dependencies = [
  "pkg:generic/tachyon",
  "pkg:generic/sagemath-polytopes-db",
  "pkg:generic/sagemath-elliptic-curves",
]
