summaryrefslogtreecommitdiff
path: root/bootstrap.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-04-25 18:05:55 -0400
committerJason R. Coombs <jaraco@jaraco.com>2021-04-25 18:05:55 -0400
commitb720937d0af9e8382c8b9e00b2c0d5715b7cfbe5 (patch)
treec29ce9e7423c4f89e79634991941e5bdf9d07a15 /bootstrap.py
parent8b494633df0f6770946092498aed76fd30be99b1 (diff)
parentb5fa6ad11e1344648b470ff0d847a7d940b4c99d (diff)
downloadpython-setuptools-git-feature/distutils-docs.tar.gz
Merge branch 'main' into feature/distutils-docsfeature/distutils-docs
Diffstat (limited to 'bootstrap.py')
-rw-r--r--bootstrap.py56
1 files changed, 3 insertions, 53 deletions
diff --git a/bootstrap.py b/bootstrap.py
index 118671f6..229b9965 100644
--- a/bootstrap.py
+++ b/bootstrap.py
@@ -1,57 +1,7 @@
-"""
-If setuptools is not already installed in the environment, it's not possible
-to invoke setuptools' own commands. This routine will bootstrap this local
-environment by creating a minimal egg-info directory and then invoking the
-egg-info command to flesh out the egg-info directory.
-"""
+import warnings
-import os
-import sys
-import textwrap
-import subprocess
-import io
+msg = "bootstrap.py is no longer needed. Use a PEP-517-compatible builder instead."
-minimal_egg_info = textwrap.dedent("""
- [distutils.commands]
- egg_info = setuptools.command.egg_info:egg_info
- [distutils.setup_keywords]
- include_package_data = setuptools.dist:assert_bool
- install_requires = setuptools.dist:check_requirements
- extras_require = setuptools.dist:check_extras
- 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
- """)
-
-
-def ensure_egg_info():
- if os.path.exists('setuptools.egg-info'):
- return
- print("adding minimal entry_points")
- add_minimal_info()
- run_egg_info()
-
-
-def add_minimal_info():
- """
- Build a minimal egg-info, enough to invoke egg_info
- """
-
- os.mkdir('setuptools.egg-info')
- with io.open('setuptools.egg-info/entry_points.txt', 'w') as ep:
- ep.write(minimal_egg_info)
-
-
-def run_egg_info():
- cmd = [sys.executable, 'setup.py', 'egg_info']
- print("Regenerating egg_info")
- subprocess.check_call(cmd)
-
-
-__name__ == '__main__' and ensure_egg_info()
+__name__ == '__main__' and warnings.warn(msg)