Skip to content

Commit 3626cc9

Browse files
committed
Moved the dependencies to a 'full' extra to avoid dangers with cyclic dependencies at build time.
1 parent f2be5d6 commit 3626cc9

2 files changed

Lines changed: 23 additions & 13 deletions

File tree

pyproject.toml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,6 @@ classifiers = [
2525
keywords = ["CPAN PyPI distutils eggs package management"]
2626
requires-python = ">=3.8"
2727
dependencies = [
28-
"packaging>=24",
29-
"ordered-set>=3.1.1",
30-
"more_itertools>=8.8",
31-
"jaraco.text>=3.7",
32-
"importlib_resources>=5.10.2",
33-
"importlib_metadata>=6",
34-
"tomli>=2.0.1",
35-
"wheel>=0.43.0",
36-
37-
# pkg_resources
38-
"platformdirs >= 2.6.2",
3928
]
4029

4130
[project.urls]
@@ -107,6 +96,19 @@ doc = [
10796
]
10897
ssl = []
10998
certs = []
99+
full = [
100+
"packaging>=24",
101+
"ordered-set>=3.1.1",
102+
"more_itertools>=8.8",
103+
"jaraco.text>=3.7",
104+
"importlib_resources>=5.10.2",
105+
"importlib_metadata>=6",
106+
"tomli>=2.0.1",
107+
"wheel>=0.43.0",
108+
109+
# pkg_resources
110+
"platformdirs >= 2.6.2",
111+
]
110112

111113
[project.entry-points."distutils.commands"]
112114
alias = "setuptools.command.alias:alias"

tools/vendored.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import functools
2+
import re
23
import sys
34
import subprocess
45

@@ -29,11 +30,18 @@ def metadata():
2930
return jaraco.packaging.metadata.load('.')
3031

3132

33+
def upgrade_full(dep):
34+
"""
35+
Remove 'extra == "full"' from any dependency.
36+
"""
37+
return re.sub('''(;| and) extra == ['"]full['"]''', '', dep)
38+
39+
3240
def load_deps():
3341
"""
34-
Read the dependencies from `.`.
42+
Read the dependencies from `.[full]`.
3543
"""
36-
return metadata().get_all('Requires-Dist')
44+
return list(map(upgrade_full, metadata().get_all('Requires-Dist')))
3745

3846

3947
def min_python():

0 commit comments

Comments
 (0)