Skip to content

Commit 57c77f0

Browse files
committed
Fix a few niggles releaed to "building" scons [skip appveyor]
Typo in SConsDoc.py caused Sphinx warn. Sphinx was also issuing this notice: Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`. so updated the conf file to reflect that evolution. Some tweaks to pyproject.toml to reflect some evolution as well. Build was issuing this: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated !! Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0). Plus, License in Classifiers is deprecated, as is license-files in the [tool.setuptools] section (which moves to the package section. Improved, I hope, the package-finder specification. Added optional dependencies section to match the external requirement-dev.txt and requirements-pkg.txt files. This is supposed to allow installing "in one go", like (currently untested): python -m pip install scons[dev] Signed-off-by: Mats Wichmann <mats@linux.com>
1 parent 7cf01e1 commit 57c77f0

3 files changed

Lines changed: 26 additions & 8 deletions

File tree

bin/SConsDoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
anywhere in the document by specifying the
7070
&f-FUNCTION; element or the &f-env-FUNCTION; element.
7171
Links to this definition may be interpolated by specifying
72-
the &f-link-FUNCTION: or &f-link-env-FUNCTION; element.
72+
the &f-link-FUNCTION; or &f-link-env-FUNCTION; element.
7373
</para>
7474
7575
<example>

doc/sphinx/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@
8282

8383
# The suffix(es) of source filenames.
8484
# You can specify multiple suffix as a list of string:
85-
#
86-
source_suffix = '.rst'
85+
source_suffix = {'.rst': 'restructuredtext'}
8786

8887
# The master toctree document.
8988
master_doc = 'index'

pyproject.toml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ requires = ["setuptools"]
66
name = "SCons"
77
description = "Open Source next-generation build tool."
88
requires-python = ">=3.7"
9-
license = { text = "MIT" }
9+
license = "MIT" # PEP 639 form (new - setuptools >= 77.0)
10+
# Should include docbook license, but this fails:
11+
# license = "MIT AND DocBook-stylesheet"
12+
license-files = [
13+
"LICENSE",
14+
"SCons/Tool/docbook/docbook-xsl-1.76.1/COPYING",
15+
]
1016
readme = { file = "README-package.rst", content-type = "text/x-rst" }
1117
authors = [{ name = "William Deegan", email = "bill@baddogconsulting.com" }]
1218
dynamic = ["version"]
@@ -25,7 +31,6 @@ classifiers = [
2531
"Programming Language :: Python :: 3.13",
2632
"Environment :: Console",
2733
"Intended Audience :: Developers",
28-
"License :: OSI Approved :: MIT License",
2934
"Operating System :: POSIX :: Linux",
3035
"Operating System :: Unix",
3136
"Operating System :: MacOS",
@@ -46,21 +51,35 @@ scons = "SCons.Script.Main:main"
4651
sconsign = "SCons.Utilities.sconsign:main"
4752
scons-configure-cache = "SCons.Utilities.ConfigureCache:main"
4853

54+
[project.optional-dependencies]
55+
dev = ["ninja", "psutil"]
56+
pkg = [
57+
"ninja",
58+
"psutil",
59+
"readme-renderer",
60+
"sphinx",
61+
"sphinx-book-theme",
62+
"rst2pdf",
63+
"build",
64+
"twine",
65+
"packaging",
66+
"lxml<5; sys_platform != 'win32' and python_version<3.13",
67+
]
68+
4969
[tool.setuptools]
5070
zip-safe = false
5171
include-package-data = true
52-
license-files = ["LICENSE"]
5372

5473
[tool.setuptools.dynamic]
5574
version = {attr = "SCons.__version__"}
5675

5776
[tool.setuptools.packages.find]
58-
exclude = ["template"]
77+
include = ["SCons*"]
5978
namespaces = false
6079

6180
[tool.setuptools.package-data]
6281
"*" = ["*.txt", "*.rst", "*.1"]
63-
"SCons.tool.docbook" = ["*.*"]
82+
"SCons.Tool.docbook" = ["*.*"]
6483

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

0 commit comments

Comments
 (0)