diff options
author | cookedm <cookedm@localhost> | 2006-07-06 16:57:20 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2006-07-06 16:57:20 +0000 |
commit | 6782a92fd1a7625ee48f6b2946a7d7149ab28a77 (patch) | |
tree | 177a92f0673655b58b247e663477af06ac1192b6 /command/sdist.py | |
parent | 216f071ab060a6f08c22666aea33f7095f079d1e (diff) | |
download | numpy-6782a92fd1a7625ee48f6b2946a7d7149ab28a77.tar.gz |
Branch numpy.distutils to distutils-revamp
Diffstat (limited to 'command/sdist.py')
-rw-r--r-- | command/sdist.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/command/sdist.py b/command/sdist.py new file mode 100644 index 000000000..9134fed53 --- /dev/null +++ b/command/sdist.py @@ -0,0 +1,22 @@ +from distutils.command.sdist import sdist as old_sdist +from numpy.distutils.misc_util import get_data_files + +class sdist(old_sdist): + + def add_defaults (self): + old_sdist.add_defaults(self) + + dist = self.distribution + + if dist.has_data_files(): + for data in dist.data_files: + self.filelist.extend(get_data_files(data)) + + if dist.has_headers(): + headers = [] + for h in dist.headers: + if isinstance(h,str): headers.append(h) + else: headers.append(h[1]) + self.filelist.extend(headers) + + return |