Skip to content

Commit

Permalink
Merge pull request SCons#4541 from Repiteo/pyproject-migrate
Browse files Browse the repository at this point in the history
Migrate `setup.cfg` logic to `pyproject.toml`
  • Loading branch information
bdbaddog authored May 27, 2024
2 parents 1f68fad + 1a7acf0 commit bc98dfc
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 87 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
From Thaddeus Crews:
- GetSConsVersion() to grab the latest SCons version without needing to
access SCons internals.
- Migrate setup.cfg logic to pyproject.toml; remove setup.cfg.

From Raymond Li:
- Fix issue #3935: OSErrors are now no longer hidden during execution of
Expand Down
3 changes: 2 additions & 1 deletion RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ IMPROVEMENTS
PACKAGING
---------

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


DOCUMENTATION
Expand Down
4 changes: 2 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ wheel = env.Command(
'$DISTDIR/SCons-${VERSION}-py3-none-any.whl',
'$DISTDIR/SCons-${VERSION}.tar.gz',
],
source=['setup.cfg', 'setup.py', 'SCons/__init__.py'] + man_pages,
source=['pyproject.toml', 'setup.py', 'SCons/__init__.py'] + man_pages,
action='$PYTHON -m build --outdir $DISTDIR',
)
env.Alias("wheel", wheel[0])
Expand All @@ -215,7 +215,7 @@ env.Alias("tar-gz", wheel[1])
# and it deletes its isolated env so we can't just zip that one up.
zip_file = env.Command(
target='$DISTDIR/SCons-${VERSION}.zip',
source=['setup.cfg', 'setup.py', 'SCons/__init__.py'] + man_pages,
source=['pyproject.toml', 'setup.py', 'SCons/__init__.py'] + man_pages,
action='$PYTHON setup.py sdist --format=zip',
)
env.Alias("zip", zip_file)
Expand Down
69 changes: 66 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,75 @@
build-backend = "setuptools.build_meta"
requires = ["setuptools"]

[project]
name = "SCons"
description = "Open Source next-generation build tool."
requires-python = ">=3.6"
license = { text = "MIT" }
readme = { file = "README-package.rst", content-type = "text/x-rst" }
authors = [{ name = "William Deegan", email = "bill@baddogconsulting.com" }]
dynamic = ["version"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Topic :: Software Development :: Build Tools",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
]

[project.urls]
Homepage = "https://www.scons.org/"
Documentation = "https://scons.org/documentation.html"
Twitter = "https://twitter.com/SConsProject"
GitHub = "https://github.com/SCons/scons"
Bug-Tracker = "https://github.com/SCons/scons/issues"
Discord = "https://discord.gg/pejaFYrD9n"
"Mailing lists" = "https://scons.org/lists.html"

[project.scripts]
scons = "SCons.Script.Main:main"
sconsign = "SCons.Utilities.sconsign:main"
scons-configure-cache = "SCons.Utilities.ConfigureCache:main"

[tool.setuptools]
zip-safe = false
include-package-data = true
license-files = ["LICENSE"]

[tool.setuptools.packages.find]
exclude = ["template"]
namespaces = false

[tool.setuptools.package-data]
"*" = ["*.txt", "*.rst", "*.1"]
"scons.tool.docbook" = ["*.*"]

[tool.distutils.sdist]
dist-dir = "build/dist"

[tool.distutils.bdist_wheel]
dist-dir = "build/dist"

# for black and mypy, set the lowest Python version supported
[tool.black]
quiet = true
target-version = ['py36']
skip-string-normalization = true

[mypy]
python_version = 3.6

[tool.mypy]
python_version = "3.6"
81 changes: 0 additions & 81 deletions setup.cfg

This file was deleted.

0 comments on commit bc98dfc

Please sign in to comment.