Commits

tarek  committed 70526ce

Now install_site works properly with distribute distribution. fixes #44

  • Participants
  • Parent commits 48c7bb5
  • Branches 0.6-maintenance

Comments (0)

Files changed (3)

 0.6.2
 -----
 
+setuptools
+==========
+
+* Fixed invalid usage of requirement.parse, that broke develop -d.
+  closed http://bugs.python.org/setuptools/issue44.
+
 
 -----
 0.6.1
   This closes http://bitbucket.org/tarek/distribute/issue/16 and
   http://bitbucket.org/tarek/distribute/issue/18.
 
-* zip_ok is now True by default. This closes 
+* zip_ok is now False by default. This closes 
   http://bugs.python.org/setuptools/issue33.
 
 * Fixed invalid URL error catching. http://bugs.python.org/setuptools/issue20.

File setuptools/command/easy_install.py

             return  # already did it, or don't need to
 
         sitepy = os.path.join(self.install_dir, "site.py")
-        source = resource_string(Requirement.parse("setuptools"), "site.py")
+        source = resource_string(Requirement.parse("distribute"), "site.py")
         current = ""
 
         if os.path.exists(sitepy):

File setuptools/tests/test_easy_install.py

+"""Easy install Tests
+"""
+import os, shutil, tempfile, unittest
+from setuptools.command.easy_install import easy_install
+from setuptools.dist import Distribution
+
+class TestEasyInstallTest(unittest.TestCase):
+
+    def test_install_site_py(self):
+        dist = Distribution()
+        cmd = easy_install(dist)
+        cmd.sitepy_installed = False
+        cmd.install_dir = tempfile.mkdtemp()
+        try:
+            cmd.install_site_py()
+            sitepy = os.path.join(cmd.install_dir, 'site.py')
+            self.assert_(os.path.exists(sitepy))
+        finally:
+            shutil.rmtree(cmd.install_dir)
+