]> granicus.if.org Git - python/commitdiff
fixed the data_files inclusion behavior
authorTarek Ziadé <ziade.tarek@gmail.com>
Tue, 17 Feb 2009 23:06:51 +0000 (23:06 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Tue, 17 Feb 2009 23:06:51 +0000 (23:06 +0000)
Lib/distutils/command/sdist.py
Lib/distutils/tests/test_sdist.py
Misc/ACKS

index a1a0fb799d67ee8173d1f06175c022b2ded5165a..a9ce28a7ebac709342bf02082f60c6edba767cc9 100644 (file)
@@ -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)
 
index 82e5dc6db6a822d2a03938e31a18ab0b54cdf5df..9c579b40cbff120c14758e825ad611b91aa27e81 100644 (file)
@@ -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()
index a97679cb77fcefd8beecc96a1215d3d9a846427c..2438d1e3e9727c429881238667906c1567a035e3 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -611,6 +611,7 @@ Sam Rushing
 Mark Russell
 Nick Russo
 Hajime Saitou
+George Sakkis
 Rich Salz
 Kevin Samborn
 Ilya Sandler