Skip to content

Commit

Permalink
Update vendoring routine for pkg_resources to simply install the depe…
Browse files Browse the repository at this point in the history
…ndencies to the _vendor folder.
  • Loading branch information
jaraco committed Jul 3, 2024
1 parent bd5cf00 commit 9234fc3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 24 deletions.
13 changes: 0 additions & 13 deletions pkg_resources/_vendor/vendored.txt

This file was deleted.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ dependencies = [
"importlib_metadata>=6",
"tomli>=2.0.1",
"wheel>=0.43.0",

# pkg_resources
"platformdirs >= 2.6.2",
]

[project.urls]
Expand Down
25 changes: 14 additions & 11 deletions tools/vendored.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def remove_all(paths):


def update_vendored():
# update_pkg_resources()
update_pkg_resources()
update_setuptools()


Expand Down Expand Up @@ -195,17 +195,20 @@ def install(vendor):


def update_pkg_resources():
deps = [
'packaging >= 24',
'platformdirs >= 2.6.2',
'jaraco.text >= 3.7',
]
# workaround for https://github.com/pypa/pip/issues/12770
deps += [
'importlib_resources >= 5.10.2',
'zipp >= 3.7',
'backports.tarfile',
]
vendor = Path('pkg_resources/_vendor')
install(vendor)
rewrite_packaging(vendor / 'packaging', 'pkg_resources.extern')
repair_namespace(vendor / 'jaraco')
repair_namespace(vendor / 'backports')
rewrite_jaraco_text(vendor / 'jaraco/text', 'pkg_resources.extern')
rewrite_jaraco_functools(vendor / 'jaraco/functools', 'pkg_resources.extern')
rewrite_jaraco_context(vendor / 'jaraco', 'pkg_resources.extern')
rewrite_importlib_resources(vendor / 'importlib_resources', 'pkg_resources.extern')
rewrite_more_itertools(vendor / "more_itertools")
rewrite_platformdirs(vendor / "platformdirs")
clean(vendor)
install_deps(deps, vendor)


def load_deps():
Expand Down

0 comments on commit 9234fc3

Please sign in to comment.