mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-03 12:24:46 +00:00
fix for rpm build
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@634 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
6dd95917ea
commit
9785b00699
4 changed files with 37 additions and 10 deletions
|
|
@ -1,5 +1,5 @@
|
|||
include README FAQ INSTALL LICENSE TODO draft-gilman-news-url-00.txt
|
||||
include norobots-rfc.html guruguru.bmp WONTDO
|
||||
include norobots-rfc.html guruguru.bmp WONTDO MANIFEST.in
|
||||
include linkcheckerrc linkchecker linkchecker.bat linkchecker.1 create.sql
|
||||
include lc.cgi lc.fcgi lc.sz_fcgi
|
||||
include Makefile
|
||||
|
|
@ -10,8 +10,8 @@ include test/*.py test/*.txt
|
|||
include test/output/test_* test/html/*.html
|
||||
include rpm_build_script
|
||||
include lconline/*.html
|
||||
include linkcheck/parser/htmllex.l
|
||||
include linkcheck/parser/htmlparse.y
|
||||
include linkcheck/parser/Makefile linkcheck/parser/htmllex.l
|
||||
include linkcheck/parser/htmlparse.y linkcheck/parser/htmlparse.h
|
||||
include linkcheck/parser/htmlsax.h
|
||||
recursive-include share *.mo
|
||||
recursive-include po *.po *.py Makefile
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
python2 setup.py config -lcrypto
|
||||
python2 setup.py build
|
||||
|
|
@ -9,6 +9,3 @@ doc_files = INSTALL
|
|||
test/
|
||||
provides = linkchecker
|
||||
group = Web/Utilities
|
||||
build_script = rpm_build_script
|
||||
install_script = rpm_install_script
|
||||
python = python2
|
||||
|
|
|
|||
35
setup.py
35
setup.py
|
|
@ -89,6 +89,37 @@ class MyInstall (install):
|
|||
print " %s: %s" % (opt_name, val)
|
||||
|
||||
|
||||
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)
|
||||
# match for man pages
|
||||
if re.search(r'/man/man\d/.+\.\d$', out):
|
||||
out = out+".gz"
|
||||
self.outfiles.append(out)
|
||||
|
||||
|
||||
class MyDistribution (Distribution):
|
||||
def __init__ (self, attrs=None):
|
||||
Distribution.__init__(self, attrs=attrs)
|
||||
|
|
@ -156,7 +187,9 @@ o a command line interface
|
|||
o a (Fast)CGI web interface (requires HTTP server)
|
||||
""",
|
||||
distclass = MyDistribution,
|
||||
cmdclass = {'install': MyInstall},
|
||||
cmdclass = {'install': MyInstall,
|
||||
'install_data': MyInstallData,
|
||||
},
|
||||
packages = ['', 'linkcheck', 'linkcheck.log',
|
||||
'linkcheck.parser', 'linkcheck.DNS'],
|
||||
ext_modules = [Extension('linkcheck.parser.htmlsax',
|
||||
|
|
|
|||
Loading…
Reference in a new issue