Skip to content

Commit

Permalink
gh-36563: pkgs/sagemath-{objects,categories,environment,repl}: Move…
Browse files Browse the repository at this point in the history
… metadata from `setup.cfg` to `pyproject.toml`

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
- Part of #33577

<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #36563
Reported by: Matthias Köppe
Reviewer(s): François Bissey
  • Loading branch information
Release Manager committed Nov 5, 2023
2 parents 3ee8d4e + 3f236fe commit 9c4a571
Show file tree
Hide file tree
Showing 9 changed files with 198 additions and 177 deletions.
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.

0 comments on commit 9c4a571

Please sign in to comment.