Skip to content

Commit

Permalink
Moved the dependencies to a 'full' extra to avoid dangers with cyclic…
Browse files Browse the repository at this point in the history
… dependencies at build time.
  • Loading branch information
jaraco committed Jul 3, 2024
1 parent f2be5d6 commit 3626cc9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
24 changes: 13 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@ classifiers = [
keywords = ["CPAN PyPI distutils eggs package management"]
requires-python = ">=3.8"
dependencies = [
"packaging>=24",
"ordered-set>=3.1.1",
"more_itertools>=8.8",
"jaraco.text>=3.7",
"importlib_resources>=5.10.2",
"importlib_metadata>=6",
"tomli>=2.0.1",
"wheel>=0.43.0",

# pkg_resources
"platformdirs >= 2.6.2",
]

[project.urls]
Expand Down Expand Up @@ -107,6 +96,19 @@ doc = [
]
ssl = []
certs = []
full = [
"packaging>=24",
"ordered-set>=3.1.1",
"more_itertools>=8.8",
"jaraco.text>=3.7",
"importlib_resources>=5.10.2",
"importlib_metadata>=6",
"tomli>=2.0.1",
"wheel>=0.43.0",

# pkg_resources
"platformdirs >= 2.6.2",
]

[project.entry-points."distutils.commands"]
alias = "setuptools.command.alias:alias"
Expand Down
12 changes: 10 additions & 2 deletions tools/vendored.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import functools
import re
import sys
import subprocess

Expand Down Expand Up @@ -29,11 +30,18 @@ def metadata():
return jaraco.packaging.metadata.load('.')


def upgrade_full(dep):
"""
Remove 'extra == "full"' from any dependency.
"""
return re.sub('''(;| and) extra == ['"]full['"]''', '', dep)


def load_deps():
"""
Read the dependencies from `.`.
Read the dependencies from `.[full]`.
"""
return metadata().get_all('Requires-Dist')
return list(map(upgrade_full, metadata().get_all('Requires-Dist')))


def min_python():
Expand Down

0 comments on commit 3626cc9

Please sign in to comment.