diff options
-rw-r--r-- | distribute.egg-info/entry_points.txt | 2 | ||||
-rw-r--r-- | setuptools/command/build_ext.py | 2 | ||||
-rwxr-xr-x | setuptools/command/develop.py | 6 | ||||
-rw-r--r-- | setuptools/tests/test_build_ext.py | 20 | ||||
-rw-r--r-- | tests/test_distribute_setup.py | 1 |
5 files changed, 26 insertions, 5 deletions
diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index e5887454..7d44c6be 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -31,7 +31,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.1 = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index b837375b..4a94572c 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -82,6 +82,8 @@ class build_ext(_build_ext): def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self,fullname) + if fullname not in self.ext_map: + return filename ext = self.ext_map[fullname] if isinstance(ext,Library): fn, ext = os.path.splitext(filename) diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index f128b803..32888056 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -46,7 +46,7 @@ class develop(easy_install): "Please rename %r to %r before using 'develop'" % (ei.egg_info, ei.broken_egg_info) ) - self.args = [ei.egg_name] + self.args = [ei.egg_name] easy_install.finalize_options(self) # pick up setup-dir .egg files only: no .egg-info self.package_index.scan(glob.glob('*.egg')) @@ -62,7 +62,7 @@ class develop(easy_install): "--egg-path must be a relative path from the install" " directory to "+target ) - + # Make a distribution for the package's source self.dist = Distribution( target, @@ -129,7 +129,7 @@ class develop(easy_install): # create wrapper scripts in the script dir, pointing to dist.scripts # new-style... - self.install_wrapper_scripts(dist) + self.install_wrapper_scripts(dist) # ...and old-style for script_name in self.distribution.scripts or []: diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py new file mode 100644 index 00000000..a520ced9 --- /dev/null +++ b/setuptools/tests/test_build_ext.py @@ -0,0 +1,20 @@ +"""build_ext tests +""" +import os, shutil, tempfile, unittest +from distutils.command.build_ext import build_ext as distutils_build_ext +from setuptools.command.build_ext import build_ext +from setuptools.dist import Distribution + +class TestBuildExtTest(unittest.TestCase): + + def test_get_ext_filename(self): + # setuptools needs to give back the same + # result than distutils, even if the fullname + # is not in ext_map + dist = Distribution() + cmd = build_ext(dist) + cmd.ext_map['foo/bar'] = '' + res = cmd.get_ext_filename('foo') + wanted = distutils_build_ext.get_ext_filename(cmd, 'foo') + assert res == wanted + diff --git a/tests/test_distribute_setup.py b/tests/test_distribute_setup.py index 6c004bd7..76f8f8fa 100644 --- a/tests/test_distribute_setup.py +++ b/tests/test_distribute_setup.py @@ -45,7 +45,6 @@ class TestSetup(unittest.TestCase): self.assert_(setuptools.__file__.startswith(egg)) def test_do_download(self): - tmpdir = tempfile.mkdtemp() _do_download(to_dir=tmpdir) import setuptools |