Skip to content

Commit 1a7acf0

Browse files
committed
Migrate setup.cfg logic to pyproject.toml
1 parent 9f75371 commit 1a7acf0

File tree

5 files changed

+71
-87
lines changed

5 files changed

+71
-87
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
1212
From Thaddeus Crews:
1313
- GetSConsVersion() to grab the latest SCons version without needing to
1414
access SCons internals.
15+
- Migrate setup.cfg logic to pyproject.toml; remove setup.cfg.
1516

1617
From Raymond Li:
1718
- Fix issue #3935: OSErrors are now no longer hidden during execution of

RELEASE.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ IMPROVEMENTS
6363
PACKAGING
6464
---------
6565

66-
- List changes in the way SCons is packaged and/or released
66+
- setup.cfg logic now handled via pyproject.toml; consequently, setup.cfg
67+
was removed.
6768

6869

6970
DOCUMENTATION

SConstruct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ wheel = env.Command(
205205
'$DISTDIR/SCons-${VERSION}-py3-none-any.whl',
206206
'$DISTDIR/SCons-${VERSION}.tar.gz',
207207
],
208-
source=['setup.cfg', 'setup.py', 'SCons/__init__.py'] + man_pages,
208+
source=['pyproject.toml', 'setup.py', 'SCons/__init__.py'] + man_pages,
209209
action='$PYTHON -m build --outdir $DISTDIR',
210210
)
211211
env.Alias("wheel", wheel[0])
@@ -215,7 +215,7 @@ env.Alias("tar-gz", wheel[1])
215215
# and it deletes its isolated env so we can't just zip that one up.
216216
zip_file = env.Command(
217217
target='$DISTDIR/SCons-${VERSION}.zip',
218-
source=['setup.cfg', 'setup.py', 'SCons/__init__.py'] + man_pages,
218+
source=['pyproject.toml', 'setup.py', 'SCons/__init__.py'] + man_pages,
219219
action='$PYTHON setup.py sdist --format=zip',
220220
)
221221
env.Alias("zip", zip_file)

pyproject.toml

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,75 @@
22
build-backend = "setuptools.build_meta"
33
requires = ["setuptools"]
44

5+
[project]
6+
name = "SCons"
7+
description = "Open Source next-generation build tool."
8+
requires-python = ">=3.6"
9+
license = { text = "MIT" }
10+
readme = { file = "README-package.rst", content-type = "text/x-rst" }
11+
authors = [{ name = "William Deegan", email = "[email protected]" }]
12+
dynamic = ["version"]
13+
classifiers = [
14+
"Development Status :: 5 - Production/Stable",
15+
"Topic :: Software Development :: Build Tools",
16+
"Programming Language :: Python",
17+
"Programming Language :: Python :: 3",
18+
"Programming Language :: Python :: 3 :: Only",
19+
"Programming Language :: Python :: 3.6",
20+
"Programming Language :: Python :: 3.7",
21+
"Programming Language :: Python :: 3.8",
22+
"Programming Language :: Python :: 3.9",
23+
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
27+
"Environment :: Console",
28+
"Intended Audience :: Developers",
29+
"License :: OSI Approved :: MIT License",
30+
"Operating System :: POSIX :: Linux",
31+
"Operating System :: Unix",
32+
"Operating System :: MacOS",
33+
"Operating System :: Microsoft :: Windows",
34+
]
35+
36+
[project.urls]
37+
Homepage = "https://www.scons.org/"
38+
Documentation = "https://scons.org/documentation.html"
39+
Twitter = "https://twitter.com/SConsProject"
40+
GitHub = "https://github.com/SCons/scons"
41+
Bug-Tracker = "https://github.com/SCons/scons/issues"
42+
Discord = "https://discord.gg/pejaFYrD9n"
43+
"Mailing lists" = "https://scons.org/lists.html"
44+
45+
[project.scripts]
46+
scons = "SCons.Script.Main:main"
47+
sconsign = "SCons.Utilities.sconsign:main"
48+
scons-configure-cache = "SCons.Utilities.ConfigureCache:main"
49+
50+
[tool.setuptools]
51+
zip-safe = false
52+
include-package-data = true
53+
license-files = ["LICENSE"]
54+
55+
[tool.setuptools.packages.find]
56+
exclude = ["template"]
57+
namespaces = false
58+
59+
[tool.setuptools.package-data]
60+
"*" = ["*.txt", "*.rst", "*.1"]
61+
"scons.tool.docbook" = ["*.*"]
62+
63+
[tool.distutils.sdist]
64+
dist-dir = "build/dist"
65+
66+
[tool.distutils.bdist_wheel]
67+
dist-dir = "build/dist"
68+
569
# for black and mypy, set the lowest Python version supported
670
[tool.black]
771
quiet = true
872
target-version = ['py36']
973
skip-string-normalization = true
1074

11-
[mypy]
12-
python_version = 3.6
13-
75+
[tool.mypy]
76+
python_version = "3.6"

setup.cfg

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)