Bug 804536 - Fix virtualenv population on Windows; r=glandium
authorGregory Szorc <gps@mozilla.com>
Tue, 23 Oct 2012 09:13:00 -0700
changeset 111251 a517f7ea5befe078cd0b75ec1949c37f7f19027b
parent 111250 43c585774a134e99b359ed9c31a9e978ed0f7df0
child 111252 d3de9d8e2b5ba7885ae533ce7d6ffc5695ee0617
child 111299 c622871d32e419489870db2e1d04f644bb1295d2
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersglandium
bugs804536
milestone19.0a1
Bug 804536 - Fix virtualenv population on Windows; r=glandium I'm pretty sure the previous code works on Python 2.7.3. This patch may break Python 3 compatibility. We'll cross that bridge when we come to it.
build/virtualenv/populate_virtualenv.py
--- a/build/virtualenv/populate_virtualenv.py
+++ b/build/virtualenv/populate_virtualenv.py
@@ -132,17 +132,17 @@ class VirtualenvManager(object):
             directory.
 
         Note that the Python interpreter running this function should be the
         one from the virtualenv. If it is the system Python or if the
         environment is not configured properly, packages could be installed
         into the wrong place. This is how virtualenv's work.
         """
         packages = []
-        fh = open(self.manifest_path, 'rUt')
+        fh = open(self.manifest_path, 'rU')
         for line in fh:
             packages.append(line.rstrip().split(':'))
         fh.close()
 
         def handle_package(package):
             python_lib = distutils.sysconfig.get_python_lib()
             if package[0] == 'setup.py':
                 assert len(package) >= 2