Skip to content

Commit 843cfad

Browse files
committed
Tweak the project/package dependencies [skip appveyor]
Signed-off-by: Mats Wichmann <mats@linux.com>
1 parent fc23b55 commit 843cfad

File tree

4 files changed

+32
-9
lines changed

4 files changed

+32
-9
lines changed

pyproject.toml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,32 @@ scons = "SCons.Script.Main:main"
5252
sconsign = "SCons.Utilities.sconsign:main"
5353
scons-configure-cache = "SCons.Utilities.ConfigureCache:main"
5454

55-
[project.optional-dependencies]
55+
# Extra deps for development.
56+
[dependency-groups]
5657
dev = [
5758
"ninja",
5859
"psutil",
5960
"lxml",
6061
]
62+
# there's no official syntax for "include @dev" yet, so repeat:
6163
pkg = [
6264
"ninja",
6365
"psutil",
66+
"lxml",
6467
"readme-renderer",
6568
"sphinx",
6669
"sphinx-book-theme",
6770
"rst2pdf",
6871
"build",
6972
"twine",
7073
"packaging",
74+
# pdf doc build suggests this for better results, excluded for now:
75+
# "matplotlib",
7176
]
7277

78+
# Features users can opt into. Currently none.
79+
# [project.optional-dependencies]
80+
7381
[tool.setuptools]
7482
zip-safe = false
7583
include-package-data = true
@@ -127,7 +135,9 @@ quote-style = "preserve" # Equivalent to black's "skip-string-normalization"
127135
]
128136

129137
[tool.mypy]
130-
python_version = "3.8"
138+
# version should be oldest supported by SCons, but mypy has moved on.
139+
# can't *run* mypy with 3.9, but can still check against it, for now.
140+
python_version = "3.9"
131141
exclude = [
132142
"^bench/",
133143
"^bin/",
@@ -139,3 +149,5 @@ exclude = [
139149
"^timings/",
140150
"^SCons/Tool/docbook/docbook-xsl-1.76.1/",
141151
]
152+
153+
# TODO: need a matching section for pyright? (doesn't read [tool.mypy]

requirements-dev.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# Dependencies for development - mainly for running tests
2+
#
3+
# You can alternativey use: pip install scons[dev]
4+
# to pick up the dependencies from pyproject.toml
25

36
-r requirements.txt
47

5-
# for now keep pinning "known working" lxml,
6-
# it's been a troublesome component in the past.
7-
# Skip lxml for win32 as no tests which require it currently pass on win32
8-
lxml<5; python_version < '3.13' and sys_platform != 'win32'
9-
lxml>=5.0.0; python_version >= '3.13'
8+
# pin lxml if it breaks on a new release, which has happened many times.
9+
# we used to skip lxml on win32 as no tests which require it currently
10+
# pass on Windows anyway, and as we don't build docs on Windows either.
11+
# Add the exclusion back if it's found to cause trouble.
12+
# lxml and sys.platform != 'win32'
13+
lxml
1014

1115
ninja
1216

requirements-pkg.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Dependencies for packaging, and distribution, including the docs build
1+
# Dependencies for packaging and distribution, including the docs build
2+
#
3+
# You can alternatively use: pip install scons[pkg]
4+
# to pick up the dependencies from pyproject.toml
25

36
-r requirements-dev.txt
47

@@ -7,10 +10,12 @@
710
# See: https://github.com/pypa/readme_renderer
811
readme-renderer
912

10-
# sphinx pinned because it has broken several times on new releases
13+
# pin sphinx if it breaks on a new release, which has happened many times.
1114
sphinx
1215
sphinx-book-theme
1316
rst2pdf
17+
# pdf doc build suggests this for better results, excluded for now:
18+
# "matplotlib",
1419

1520
build
1621
twine

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
# No dependencies for running SCons
2+
#
3+
# This file isn't really needed as any required deps covered by pyproject.toml

0 commit comments

Comments
 (0)