summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-08-19 20:47:45 +0100
committerJason R. Coombs <jaraco@jaraco.com>2015-08-19 20:47:45 +0100
commitb0b9dae622b4bcebf96555753d1310319a90bbbe (patch)
tree09398b080362f503db5d8284569b3e3e463a9cb9
parente2124f4d4c74770ccc0b9fc5f0e17becda578063 (diff)
downloadpython-setuptools-git-b0b9dae622b4bcebf96555753d1310319a90bbbe.tar.gz
Allow disabling of the sys.path rewrite technique using an environment variable.
-rw-r--r--CHANGES.txt15
-rwxr-xr-xsetuptools/command/easy_install.py3
2 files changed, 17 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 10027a90..2ad565bc 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,21 @@ CHANGES
=======
----
+18.3
+----
+
+* Setuptools now allows disabling of the manipulation of the sys.path
+ during the processing of the easy-install.pth file. To do so, set
+ the environment variable ``SETUPTOOLS_SYS_PATH_TECHNIQUE`` to
+ anything but "rewrite" (consider "raw"). During any install operation
+ with manipulation disabled, setuptools packages will be appended to
+ sys.path naturally.
+
+ Future versions may change the default behavior to disable
+ manipulation. If so, the default behavior can be retained by setting
+ the variable to "rewrite".
+
+----
18.2
----
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 2b639c1b..7c0dfa99 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1612,7 +1612,8 @@ class RewritePthDistributions(PthDistributions):
""")
-PthDistributions = RewritePthDistributions
+if os.environ.get('SETUPTOOLS_SYS_PATH_TECHNIQUE', 'rewrite') == 'rewrite':
+ PthDistributions = RewritePthDistributions
def _first_line_re():