mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-06 15:50:58 +00:00
better rpm fix
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@635 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
9785b00699
commit
2f85e1e71f
1 changed files with 5 additions and 26 deletions
31
setup.py
31
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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue