summaryrefslogtreecommitdiff
path: root/setuptools
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools')
-rwxr-xr-xsetuptools/command/easy_install.py2
-rw-r--r--setuptools/tests/test_easy_install.py20
2 files changed, 21 insertions, 1 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 9e1f8711..195139c7 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1097,7 +1097,7 @@ Please make the appropriate changes for your system and try again.""" % (
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):
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
new file mode 100644
index 00000000..583c072b
--- /dev/null
+++ b/setuptools/tests/test_easy_install.py
@@ -0,0 +1,20 @@
+"""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)
+