diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-17 23:06:51 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-17 23:06:51 (GMT) |
commit | 0e5001eff9a44bdabe2d2b25903e144a3dcbc77f (patch) | |
tree | aeee2751c9711e4da9386cdeb82509bbc90617ff /Lib | |
parent | 17a837e4dba610d87409c3ed532d30aa68502108 (diff) | |
download | cpython-0e5001eff9a44bdabe2d2b25903e144a3dcbc77f.zip cpython-0e5001eff9a44bdabe2d2b25903e144a3dcbc77f.tar.gz cpython-0e5001eff9a44bdabe2d2b25903e144a3dcbc77f.tar.bz2 |
fixed the data_files inclusion behavior
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/command/sdist.py | 2 | ||||
-rw-r--r-- | Lib/distutils/tests/test_sdist.py | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py index a1a0fb7..a9ce28a 100644 --- a/Lib/distutils/command/sdist.py +++ b/Lib/distutils/command/sdist.py @@ -319,7 +319,7 @@ class sdist (Command): else: # a (dirname, filenames) tuple dirname, filenames = item for f in filenames: - f = convert_path(os.path.join(dirname, f)) + f = convert_path(f) if os.path.isfile(f): self.filelist.append(f) diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.py index 82e5dc6..9c579b4 100644 --- a/Lib/distutils/tests/test_sdist.py +++ b/Lib/distutils/tests/test_sdist.py @@ -23,6 +23,7 @@ setup(name='fake') MANIFEST = """\ README +inroot.txt setup.py data%(sep)sdata.dt scripts%(sep)sscript.py @@ -171,10 +172,13 @@ class sdistTestCase(support.LoggingSilencer, PyPIRCCommandTestCase): self.write_file((data_dir, 'data.dt'), '#') some_dir = join(self.tmp_dir, 'some') os.mkdir(some_dir) + self.write_file((self.tmp_dir, 'inroot.txt'), '#') self.write_file((some_dir, 'file.txt'), '#') self.write_file((some_dir, 'other_file.txt'), '#') - dist.data_files = [('data', ['data.dt', 'notexisting']), + dist.data_files = [('data', ['data/data.dt', + 'inroot.txt', + 'notexisting']), 'some/file.txt', 'some/other_file.txt'] @@ -202,7 +206,7 @@ class sdistTestCase(support.LoggingSilencer, PyPIRCCommandTestCase): zip_file.close() # making sure everything was added - self.assertEquals(len(content), 10) + self.assertEquals(len(content), 11) # checking the MANIFEST manifest = open(join(self.tmp_dir, 'MANIFEST')).read() |