summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-07-20 11:10:01 -0400
committerJason R. Coombs <jaraco@jaraco.com>2016-07-20 11:10:01 -0400
commit80a2ff9e3055e216a5238e81a6933f6a342b17fb (patch)
tree2d55a7b91a747a1c0f5c27628297b3687d1e8c9f
parent31913cac242e783b75b2722ff95bb5cce3e36b18 (diff)
downloadpython-setuptools-git-80a2ff9e3055e216a5238e81a6933f6a342b17fb.tar.gz
Add safeguard against improper installs when using a clean repository checkout. Fixes #659.
-rw-r--r--CHANGES.rst6
-rwxr-xr-xsetup.py5
2 files changed, 11 insertions, 0 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 925c05be..aa1d1b83 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -2,6 +2,12 @@
CHANGES
=======
+v24.1.0
+-------
+
+* #659: ``setup.py`` now will fail fast and with a helpful
+ error message when the necessary metadata is missing.
+
v24.0.3
-------
diff --git a/setup.py b/setup.py
index 1d742add..69c55417 100755
--- a/setup.py
+++ b/setup.py
@@ -11,6 +11,11 @@ import textwrap
# Allow to run setup.py from another directory.
os.chdir(os.path.dirname(os.path.abspath(__file__)))
+# Prevent improper installs without necessary metadata. See #659
+if not os.path.exists('setuptools.egg-info'):
+ msg = "Cannot build setuptools without metadata. Run bootstrap.py"
+ raise RuntimeError(msg)
+
src_root = None
from distutils.util import convert_path