diff --git a/changelog.d/3072.misc.rst b/changelog.d/3072.misc.rst new file mode 100644 index 00000000000..362c9c3068b --- /dev/null +++ b/changelog.d/3072.misc.rst @@ -0,0 +1 @@ +Remove lorem_ipsum from jaraco.text when vendored. diff --git a/pkg_resources/_vendor/jaraco/text/__init__.py b/pkg_resources/_vendor/jaraco/text/__init__.py index f39f2d93338..c466378ceba 100644 --- a/pkg_resources/_vendor/jaraco/text/__init__.py +++ b/pkg_resources/_vendor/jaraco/text/__init__.py @@ -224,7 +224,6 @@ def unwrap(s): return '\n'.join(cleaned) -lorem_ipsum: str = files(__name__).joinpath('Lorem ipsum.txt').read_text() class Splitter(object): diff --git a/setup.py b/setup.py index 0b85f8e716b..4cda3d38900 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,6 @@ 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() diff --git a/tools/vendored.py b/tools/vendored.py index a5f3b9f137e..57dc7723a15 100644 --- a/tools/vendored.py +++ b/tools/vendored.py @@ -37,6 +37,8 @@ def rewrite_jaraco_text(pkg_files, new_root): text = file.read_text() text = re.sub(r' (jaraco\.)', rf' {new_root}.\1', text) text = re.sub(r' (importlib_resources)', rf' {new_root}.\1', text) + # suppress loading of lorem_ipsum + text = re.sub(r'^lorem_ipsum.*\n$', '', text, flags=re.M) file.write_text(text)