diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-06-29 16:19:22 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-06-29 16:19:22 (GMT) |
commit | 0156f9177167fdb2397dc79e995efdc572d2f812 (patch) | |
tree | 751f6f8d7afa3a4b58b791feae8c107a3deb38e7 /Lib/distutils/tests | |
parent | b1445cb2589735689f04234625d0d0100a1035ab (diff) | |
download | cpython-0156f9177167fdb2397dc79e995efdc572d2f812.zip cpython-0156f9177167fdb2397dc79e995efdc572d2f812.tar.gz cpython-0156f9177167fdb2397dc79e995efdc572d2f812.tar.bz2 |
Merged revisions 73688 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r73688 | tarek.ziade | 2009-06-29 18:13:39 +0200 (Mon, 29 Jun 2009) | 1 line
Fixed 6365: wrong inplace location for build_ext if the extension had dots
........
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r-- | Lib/distutils/tests/test_build_ext.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index 4ea11a1..fe6009b 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -339,10 +339,9 @@ class BuildExtTestCase(TempdirManager, # inplace = 0, cmd.package = 'bar' cmd.package = 'bar' path = cmd.get_ext_fullpath('foo') - # checking that the last directory is bar + # checking that the last directory is the build_dir path = os.path.split(path)[0] - lastdir = os.path.split(path)[-1] - self.assertEquals(lastdir, cmd.package) + self.assertEquals(path, cmd.build_lib) # inplace = 1, cmd.package = 'bar' cmd.inplace = 1 @@ -358,6 +357,19 @@ class BuildExtTestCase(TempdirManager, lastdir = os.path.split(path)[-1] self.assertEquals(lastdir, cmd.package) + def test_build_ext_inplace(self): + etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + etree_ext = Extension('lxml.etree', [etree_c]) + dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + cmd = build_ext(dist) + cmd.inplace = 1 + cmd.distribution.package_dir = {'': 'src'} + cmd.distribution.packages = ['lxml', 'lxml.html'] + curdir = os.getcwd() + wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + path = cmd.get_ext_fullpath('lxml.etree') + self.assertEquals(wanted, path) + def test_suite(): src = _get_source_filename() if not os.path.exists(src): |