diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2009-09-13 14:29:58 +0200 |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2009-09-13 14:29:58 +0200 |
| commit | ddd787ae1c7f77b4c8c52176ed1f228dc94ebbe6 (patch) | |
| tree | 181d10584b8683bc743ee25fc4c3c40a6e598c7d /setuptools | |
| parent | 1a8b650faf34b6205a8a26168ab7ef886833f85c (diff) | |
| parent | 3c6ebb2ab608930ea3d1e54476344a990526e64a (diff) | |
| download | python-setuptools-git-ddd787ae1c7f77b4c8c52176ed1f228dc94ebbe6.tar.gz | |
Merge upstream changes.
--HG--
branch : distribute
extra : rebase_source : d68cc866146d65e1951fe88f526f94a64f17b1da
Diffstat (limited to 'setuptools')
| -rwxr-xr-x | setuptools/command/easy_install.py | 2 | ||||
| -rw-r--r-- | setuptools/tests/test_easy_install.py | 20 |
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) + |
