Skip to content

Commit

Permalink
Ensure text file from vendored package is included.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jan 30, 2022
1 parent c745e17 commit a84e03d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Empty file.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
package_data = dict(
setuptools=['script (dev).tmpl', 'script.tmpl', 'site-patch.py'],
)
package_data.update({'pkg_resources._vendor.jaraco.text': ['*.txt']})

force_windows_specific_files = (
os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES", "1").lower()
Expand Down
3 changes: 3 additions & 0 deletions tools/vendored.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def rewrite_jaraco(pkg_files, new_root):
"""
Rewrite imports in jaraco.functools to redirect to vendored copies.
"""
# jaraco is a namespace package, but for data to be discovered,
# such as in jaraco.txt, it must be a regular package.
pkg_files.joinpath('__init__.py').write_text('')
for file in pkg_files.glob('*.py'):
text = file.read_text()
text = re.sub(r' (more_itertools)', rf' {new_root}.\1', text)
Expand Down

0 comments on commit a84e03d

Please sign in to comment.