summaryrefslogtreecommitdiff
path: root/setup.py
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 /setup.py
parent31913cac242e783b75b2722ff95bb5cce3e36b18 (diff)
downloadpython-setuptools-git-80a2ff9e3055e216a5238e81a6933f6a342b17fb.tar.gz
Add safeguard against improper installs when using a clean repository checkout. Fixes #659.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py5
1 files changed, 5 insertions, 0 deletions
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