aboutsummaryrefslogtreecommitdiffstats
path: root/ez_setup.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-22 10:25:38 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-22 10:25:38 -0500
commit57d6e0fc1ff66e5569296af5cf409cbbcf025148 (patch)
tree382a334f733ed139dd3b87fad66c2c53a5ef5f89 /ez_setup.py
parent2436fdf2b3b65073879366505925c0dc18132943 (diff)
downloadexternal_python_setuptools-57d6e0fc1ff66e5569296af5cf409cbbcf025148.tar.gz
external_python_setuptools-57d6e0fc1ff66e5569296af5cf409cbbcf025148.tar.bz2
external_python_setuptools-57d6e0fc1ff66e5569296af5cf409cbbcf025148.zip
Deprecated use_setuptools. Fixes #336.
Diffstat (limited to 'ez_setup.py')
-rw-r--r--ez_setup.py23
1 files changed, 10 insertions, 13 deletions
diff --git a/ez_setup.py b/ez_setup.py
index 90e3d820..45c92465 100644
--- a/ez_setup.py
+++ b/ez_setup.py
@@ -1,18 +1,9 @@
#!/usr/bin/env python
-"""Bootstrap setuptools installation.
-
-To use setuptools in your package's setup.py, include this
-file in the same directory and add this to the top of your setup.py::
-
- from ez_setup import use_setuptools
- use_setuptools()
-
-To require a specific version of setuptools, set a download
-mirror, or use an alternate download directory, simply supply
-the appropriate options to ``use_setuptools()``.
+"""
+Setuptools bootstrapping installer.
-This file can also be run as a script to install or upgrade setuptools.
+Run this script to install or upgrade setuptools.
"""
import os
@@ -25,6 +16,7 @@ import subprocess
import platform
import textwrap
import contextlib
+import warnings
from distutils import log
@@ -142,10 +134,15 @@ def use_setuptools(
version=DEFAULT_VERSION, download_base=DEFAULT_URL,
to_dir=os.curdir, download_delay=15):
"""
- Download, install, and import Setuptools.
+ *deprecated* Download, install, and import Setuptools.
Return None.
"""
+ warnings.warn(
+ "`use_setuptools` is deprecated. To enforce a specific "
+ "version of setuptools, use `pkg_resources.require`.",
+ DeprecationWarning,
+ )
to_dir = os.path.abspath(to_dir)
rep_modules = 'pkg_resources', 'setuptools'
imported = set(sys.modules).intersection(rep_modules)