summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-07-23 13:03:13 -0400
committerJason R. Coombs <jaraco@jaraco.com>2016-07-23 13:03:13 -0400
commit145acd3ccfb7aac2b9658ce8ef4f5cb3fa265d94 (patch)
treee7ab2a21c7ac8474a483710008978bcbf486fc5e /setup.py
parent9a6c95285be5abd00e2ae69d5ab25782da112017 (diff)
downloadpython-setuptools-git-145acd3ccfb7aac2b9658ce8ef4f5cb3fa265d94.tar.gz
Only require the metadata when setup is invoked, not on import. Fixes #676.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 14b1b78d..880d3f81 100755
--- a/setup.py
+++ b/setup.py
@@ -11,10 +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)
+def require_metadata():
+ "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
@@ -171,4 +172,5 @@ setup_params = dict(
)
if __name__ == '__main__':
+ require_metadata()
dist = setuptools.setup(**setup_params)