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/sage-conf: Move metadata from setup.cfg to pyproject.toml #36561

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ build/pkgs/wheel/version_requirements.txt
/pkgs/*/venv*
/pkgs/*/.venv*

/pkgs/sage-conf/pyproject.toml
/pkgs/sage-conf_pypi/sage_root/config.log
kwankyu marked this conversation as resolved.
Show resolved Hide resolved
/pkgs/sage-conf_pypi/sage_root/config.status
/pkgs/sage-conf_pypi/sage_root/local/
Expand Down
1 change: 1 addition & 0 deletions build/pkgs/sage_conf/bootstrap
2 changes: 1 addition & 1 deletion build/pkgs/sage_conf/dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$(SAGE_ROOT)/pkgs/sage-conf/_sage_conf/_conf.py $(SAGE_ROOT)/pkgs/sage-conf/setup.cfg $(SAGE_ROOT)/pkgs/sage-conf/bin/sage-env-config | $(PYTHON_TOOLCHAIN) $(PYTHON)
$(SAGE_ROOT)/pkgs/sage-conf/_sage_conf/_conf.py $(SAGE_ROOT)/pkgs/sage-conf/pyproject.toml $(SAGE_ROOT)/pkgs/sage-conf/bin/sage-env-config | $(PYTHON_TOOLCHAIN) $(PYTHON)
2 changes: 2 additions & 0 deletions pkgs/sage-conf/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/_sage_conf/_conf.py
/setup.cfg
/pyproject.toml
/build
kwankyu marked this conversation as resolved.
Show resolved Hide resolved
/dist
/*.egg-info
Expand Down
3 changes: 0 additions & 3 deletions pkgs/sage-conf/pyproject.toml

This file was deleted.

45 changes: 45 additions & 0 deletions pkgs/sage-conf/pyproject.toml.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
include(`sage_spkg_versions_toml.m4')dnl' -*- conf-toml -*-
[build-system]
requires = [
SPKG_INSTALL_REQUIRES_setuptools
mkoeppe marked this conversation as resolved.
Show resolved Hide resolved
]
build-backend = "setuptools.build_meta"

[project]
name = "sage-conf"
description = "Sage: Open Source Mathematics Software: Configuration module for the SageMath library"
readme = "README.rst"
dnl Not including the standard metadata from pyproject_toml_metadata.m4
dnl because sage-conf is GPL v3+.
license = {text = "GNU General Public License (GPL) v3 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 :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Mathematics",
]
urls = {Homepage = "https://www.sagemath.org"}
requires-python = ">=3.9, <3.13"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get rid of the upper bound here? This package is relatively simple python that should not be tied to the version of python.

This allows more flexibility (e.g. to use a released sage-conf with a beta version of sagemath-standard when one is experimenting with an update of python).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. The version bound is set for uniformity.

dynamic = ["version"]

[project.scripts]
sage-config = "sage_conf:_main"

[tool.setuptools]
packages = ["_sage_conf"]
py-modules = ["sage_conf"]
script-files = ["bin/sage-env-config"]
include-package-data = false

[tool.setuptools.dynamic]
version = {file = ["VERSION.txt"]}
23 changes: 0 additions & 23 deletions pkgs/sage-conf/setup.cfg

This file was deleted.

1 change: 0 additions & 1 deletion pkgs/sage-conf_conda/setup.cfg

This file was deleted.

1 change: 0 additions & 1 deletion pkgs/sage-conf_pypi/setup.cfg

This file was deleted.

Loading