diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-01-17 08:31:23 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-01-17 08:32:56 -0500 |
commit | 68332ad4b0ebbef8623b73557cd6c467b54fb098 (patch) | |
tree | 49b6a30de53905a008e9c7ad2eed8c233cbd0e9c /ez_setup.py | |
parent | 3ca4bc6f94aba3a11cc544e1f976dc7e8a7e0097 (diff) | |
download | python-setuptools-git-archive/bootstrap-pip-wrapper.tar.gz |
Drop ez_setup.py as a bootstrapping technique. Ref #581.archive/bootstrap-pip-wrapper
Diffstat (limited to 'ez_setup.py')
-rwxr-xr-x | ez_setup.py | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/ez_setup.py b/ez_setup.py index 39d299d2..a86d3000 100755 --- a/ez_setup.py +++ b/ez_setup.py @@ -1,65 +1,3 @@ #!/usr/bin/env python -""" -Setuptools bootstrapping installer, reliant on pip and providing -nominal compatibility with the prior interface. - -Maintained at https://github.com/pypa/setuptools/tree/bootstrap. - -Don't use this script. Instead, just invoke pip commands to install -or update setuptools. -""" - -import sys -import warnings - - -def use_setuptools(version=None, **kwargs): - """ - A minimally-compatible version of ez_setup.use_setuptools - """ - if kwargs: - msg = "ignoring arguments: {keys}".format(keys=list(kwargs.keys())) - warnings.warn(msg) - - requirement = _requirement(version) - _pip_install(requirement) - - # ensure that the package resolved satisfies the requirement - __import__('pkg_resources').require(requirement) - - -def download_setuptools(*args, **kwargs): - msg = ( - "download_setuptools is no longer supported; " - "use `pip download setuptools` instead." - ) - raise NotImplementedError(msg) - - -def _requirement(version): - req = 'setuptools' - if version: - req += '>=' + version - return req - - -def _pip_install(*args): - args = ('install', '--upgrade') + args - __import__('pip').main(list(args)) - - -def _check_sys_argv(): - if not sys.argv[1:]: - return - - msg = ( - "parameters to ez_setup are no longer supported; " - "invoke pip directly to customize setuptools install." - ) - raise NotImplementedError(msg) - - -if __name__ == '__main__': - _check_sys_argv() - raise SystemExit(_pip_install('setuptools')) +raise NotImplementedError("ez_setup is deprecated; use pip to bootstrap") |