Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkgs/sagemath-{objects,categories,environment,repl}: Move metadata from setup.cfg to pyproject.toml #36563

Merged
merged 5 commits into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions m4/pyproject_toml_metadata.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
dnl Standard metadata of SageMath distribution packages
dnl
license = {text = "GNU General Public License (GPL) v2 or later"}
authors = [{name = "The Sage Developers", email = "[email protected]"}]
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.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Mathematics",
]
urls = {Homepage = "https://www.sagemath.org"}
requires-python = ">=3.9, <3.12"
24 changes: 24 additions & 0 deletions pkgs/sagemath-categories/pyproject.toml.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,27 @@ requires = [
SPKG_INSTALL_REQUIRES_cysignals
]
build-backend = "setuptools.build_meta"

[project]
name = "sagemath-categories"
description = "Sage: Open Source Mathematics Software: Sage categories and basic rings"
dependencies = [
SPKG_INSTALL_REQUIRES_sagemath_objects
]
dynamic = ["version"]
include(`pyproject_toml_metadata.m4')dnl'

[project.optional-dependencies]
test = [
SPKG_INSTALL_REQUIRES_sagemath_repl
]

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

[tool.setuptools]
include-package-data = false

[tool.setuptools.dynamic]
version = {file = ["VERSION.txt"]}
16 changes: 0 additions & 16 deletions pkgs/sagemath-categories/setup.cfg.m4

This file was deleted.

54 changes: 54 additions & 0 deletions pkgs/sagemath-environment/pyproject.toml.m4
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,57 @@ requires = [
SPKG_INSTALL_REQUIRES_wheel
]
build-backend = "setuptools.build_meta"

[project]
name = "sagemath-environment"
description = "Sage: Open Source Mathematics Software: System and software environment"
dependencies = []
dynamic = ["version"]
include(`pyproject_toml_metadata.m4')dnl'

[project.optional-dependencies]
conf = [SPKG_INSTALL_REQUIRES_sage_conf] # sage.env can optionally use sage_conf
docbuild = [SPKG_INSTALL_REQUIRES_sage_docbuild] # For "sage --docbuild"
sage = [SPKG_INSTALL_REQUIRES_sagelib] # For "sage", "sage -t", ...
cython = [SPKG_INSTALL_REQUIRES_cython] # For "sage --cython"
pytest = [SPKG_INSTALL_REQUIRES_pytest] # For "sage --pytest"
rst2ipynb = [SPKG_INSTALL_REQUIRES_rst2ipynb] # For "sage --rst2ipynb"
tox = [SPKG_INSTALL_REQUIRES_tox] # For "sage --tox"
sws2rst = [SPKG_INSTALL_REQUIRES_sage_sws2rst] # For "sage --sws2rst"

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

[tool.setuptools]
py-modules = [
"sage.all__sagemath_environment",
"sage.env",
"sage.version",
"sage.misc.all__sagemath_environment",
"sage.misc.package",
"sage.misc.package_dir",
"sage.misc.temporary_file",
"sage.misc.viewer",
]
packages = ["sage.features"]
script-files = [
# The sage script
"bin/sage",
# Auxiliary scripts for setting up the environment
"bin/sage-env",
"bin/sage-num-threads.py",
"bin/sage-venv-config",
"bin/sage-version.sh",
# Auxiliary script for invoking Python in the Sage environment
"bin/sage-python",
# Not included:
# - bin/sage-env-config -- installed by sage_conf
# - bin/sage-env-config.in -- not to be installed
# - bin/sage-run, bin/sage-runtests, ... -- installed by sagemath-repl
# - bin/sage-ipython -- uses sage.repl, so installed by sagemath-repl
]
include-package-data = false

[tool.setuptools.dynamic]
version = {file = ["VERSION.txt"]}
66 changes: 0 additions & 66 deletions pkgs/sagemath-environment/setup.cfg.m4

This file was deleted.

34 changes: 34 additions & 0 deletions pkgs/sagemath-objects/pyproject.toml.m4
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,37 @@ requires = [
SPKG_INSTALL_REQUIRES_cysignals
]
build-backend = "setuptools.build_meta"

[project]
name = "sagemath-objects"
description = "Sage: Open Source Mathematics Software: Sage objects, elements, parents, categories, coercion, metaclasses"
dependencies = [
SPKG_INSTALL_REQUIRES_gmpy2
SPKG_INSTALL_REQUIRES_cysignals
]
dynamic = ["version"]
include(`pyproject_toml_metadata.m4')dnl'

[project.optional-dependencies]
# Currently we do not use the sage doctester to test sagemath-objects,
# so we do not list sagemath-repl here.
test = []

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

[tool.setuptools]
include-package-data = false

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

[tool.setuptools.package-data]
"sage.cpython" = [
"pyx_visit.h",
"string_impl.h",
"cython_metaclass.h",
"python_debug.h",
]
"sage.rings" = ["integer_fake.h"]
31 changes: 0 additions & 31 deletions pkgs/sagemath-objects/setup.cfg.m4

This file was deleted.

66 changes: 66 additions & 0 deletions pkgs/sagemath-repl/pyproject.toml.m4
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,69 @@ requires = [
SPKG_INSTALL_REQUIRES_wheel
]
build-backend = "setuptools.build_meta"

[project]
name = "sagemath-repl"
description = "Sage: Open Source Mathematics Software: IPython kernel, Sage preparser, doctester"
dependencies = [
SPKG_INSTALL_REQUIRES_sagemath_objects
SPKG_INSTALL_REQUIRES_sagemath_environment
SPKG_INSTALL_REQUIRES_ipython
SPKG_INSTALL_REQUIRES_ipywidgets
]
dynamic = ["version"]
include(`pyproject_toml_metadata.m4')dnl'

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

[tool.setuptools]
py-modules = [
"sage.all__sagemath_repl",
"sage.misc.all__sagemath_repl",
"sage.misc.banner",
"sage.misc.sagedoc",
"sage.misc.sage_input",
"sage.misc.sage_eval",
]
packages = [
"sage.doctest",
"sage.repl",
"sage.repl.display",
"sage.repl.ipython_kernel",
"sage.repl.rich_output",
]
script-files = [
# 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-cleaner",
# Uncategorized scripts in alphabetical order
"bin/sage-inline-fortran",
"bin/sage-ipynb2rst",
"bin/sage-ipython",
"bin/sage-notebook",
"bin/sage-preparse",
"bin/sage-run",
"bin/sage-run-cython",
"bin/sage-startuptime.py",
]
include-package-data = false

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

[tool.setuptools.package-data]
"sage.doctest" = ["tests/*"]
"sage.repl.rich_output" = ["example*"]
64 changes: 0 additions & 64 deletions pkgs/sagemath-repl/setup.cfg.m4

This file was deleted.

Loading