[tor-commits] [flashproxy/master] Prevent setup.py scripts from downloading dependencies.

dcf at torproject.org dcf at torproject.org
Sat Sep 20 03:55:47 UTC 2014


commit f9bf878eced66fe8d85f28133095affdc48633be
Author: David Fifield <david at bamsoftware.com>
Date:   Fri Sep 19 20:53:36 2014 -0700

    Prevent setup.py scripts from downloading dependencies.
    
    You can't just tell setuptools not to download things, so instead set
    the http_proxy and https_proxy environment variables to point to a
    local port.
    
    https://trac.torproject.org/projects/tor/ticket/10847
---
 ChangeLog           |    3 +++
 setup-client-exe.py |    5 +++++
 setup-common.py     |    6 ++++++
 3 files changed, 14 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index b778a38..27be914 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+  o Prevented setup.py scripts from automatically downloading
+    dependencies. Fixes bug 10847.
+
 Changes in version 1.7
   o Made the badge color reflect what's going on when it encounters a
     network error and tries to reconnect. Fixes bug 11400.
diff --git a/setup-client-exe.py b/setup-client-exe.py
index 62b9c87..2e0506f 100755
--- a/setup-client-exe.py
+++ b/setup-client-exe.py
@@ -4,6 +4,11 @@ from distutils.core import setup
 import os
 import py2exe
 
+# Prevent setuptools from trying to download dependencies.
+# https://trac.torproject.org/projects/tor/ticket/10847
+os.environ["http_proxy"] = "127.0.0.1:9"
+os.environ["https_proxy"] = "127.0.0.1:9"
+
 build_path = os.path.join(os.environ["PY2EXE_TMPDIR"], "build")
 dist_path = os.path.join(os.environ["PY2EXE_TMPDIR"], "dist")
 
diff --git a/setup-common.py b/setup-common.py
index ffe7c33..2780226 100755
--- a/setup-common.py
+++ b/setup-common.py
@@ -20,9 +20,15 @@ To build/install a self-contained binary distribution of flashproxy-client
 #
 # See discussion on #6810 for more details.
 
+import os
 import subprocess
 import sys
 
+# Prevent setuptools from trying to download dependencies.
+# https://trac.torproject.org/projects/tor/ticket/10847
+os.environ["http_proxy"] = "127.0.0.1:9"
+os.environ["https_proxy"] = "127.0.0.1:9"
+
 from setuptools import setup, find_packages
 
 p = subprocess.Popen(["sh", "version.sh"], stdout=subprocess.PIPE)



More information about the tor-commits mailing list