From d09dd5ff998887536e3e898ec7c007053d96e0aa Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 11:29:30 -0500 Subject: Include PKG-INFO in minimal egg-info so that metadata doesn't need to be generated twice during bootstrap. --- bootstrap.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bootstrap.py') diff --git a/bootstrap.py b/bootstrap.py index 8c7d7fc3..077bf690 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -25,6 +25,7 @@ minimal_egg_info = textwrap.dedent(""" entry_points = setuptools.dist:check_entry_points [egg_info.writers] + PKG-INFO = setuptools.command.egg_info:write_pkg_info dependency_links.txt = setuptools.command.egg_info:overwrite_arg entry_points.txt = setuptools.command.egg_info:write_entries requires.txt = setuptools.command.egg_info:write_requirements @@ -52,8 +53,6 @@ def run_egg_info(): cmd = [sys.executable, 'setup.py', 'egg_info'] print("Regenerating egg_info") subprocess.check_call(cmd) - print("...and again.") - subprocess.check_call(cmd) def main(): -- cgit v1.2.1 From 7f6394863dc096b9f31e71a5843acbd836ff8d6c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 11:43:44 -0500 Subject: Only run 'egg_info' when bootstrapping was required. --- bootstrap.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'bootstrap.py') diff --git a/bootstrap.py b/bootstrap.py index 077bf690..8fa9e4b5 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -36,10 +36,11 @@ def ensure_egg_info(): if os.path.exists('setuptools.egg-info'): return print("adding minimal entry_points") - build_egg_info() + add_minimal_info() + run_egg_info() -def build_egg_info(): +def add_minimal_info(): """ Build a minimal egg-info, enough to invoke egg_info """ @@ -55,9 +56,4 @@ def run_egg_info(): subprocess.check_call(cmd) -def main(): - ensure_egg_info() - run_egg_info() - - -__name__ == '__main__' and main() +__name__ == '__main__' and ensure_egg_info() -- cgit v1.2.1