diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2016-07-23 13:03:13 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-07-23 13:03:13 -0400 |
| commit | 145acd3ccfb7aac2b9658ce8ef4f5cb3fa265d94 (patch) | |
| tree | e7ab2a21c7ac8474a483710008978bcbf486fc5e /setup.py | |
| parent | 9a6c95285be5abd00e2ae69d5ab25782da112017 (diff) | |
| download | python-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-x | setup.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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) |
