diff options
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") |