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
commit8d0e9574880781a298067428160a1d2701664284 (patch)
tree8486ef1081cc83b63aa674bd01d389cc6a6a17c6
parent2860a5609939c94dec74a7f2b0347e6c7c5a508f (diff)
downloadpython-setuptools-bitbucket-8d0e9574880781a298067428160a1d2701664284.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():