From 2f85e1e71f08c3b47c9d4a5a080cb8d86c5906d4 Mon Sep 17 00:00:00 2001 From: calvin Date: Wed, 27 Nov 2002 00:46:03 +0000 Subject: [PATCH] better rpm fix git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@635 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- setup.py | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/setup.py b/setup.py index 98d46db2..049079c9 100755 --- a/setup.py +++ b/setup.py @@ -89,35 +89,14 @@ class MyInstall (install): print " %s: %s" % (opt_name, val) -class MyInstallData(install_data): +class MyInstallData (install_data): """My own data installer to handle .man pages""" - def run (self): - self.mkpath(self.install_dir) - for f in self.data_files: - if type(f) == StringType: - # it's a simple file, so copy it - if self.warn_dir: - self.warn("setup script did not provide a directory for " - "'%s' -- installing right in '%s'" % - (f, self.install_dir)) - self._install_file(f, self.install_dir) - else: - # it's a tuple with path to install to and a list of files - dir = f[0] - if not os.path.isabs(dir): - dir = os.path.join(self.install_dir, dir) - elif self.root: - dir = change_root(self.root, dir) - self.mkpath(dir) - for data in f[1]: - self._install_file(data, dir) - - def _install_file(self, filename, dirname): - (out, _) = self.copy_file(filename, dirname) + def copy_file (self, filename, dirname): + (out, _) = install_data.copy_file(self, filename, dirname) # match for man pages if re.search(r'/man/man\d/.+\.\d$', out): - out = out+".gz" - self.outfiles.append(out) + return (out+".gz", _) + return (out, _) class MyDistribution (Distribution):