Remove scripting for documentation that was packaged with the main app. Documentation is now online.
This commit is contained in:
parent
3664a1ab73
commit
0977d3d5be
|
@ -11,10 +11,4 @@ if [ "$1" = "configure" ]; then
|
||||||
x-terminal-emulator.1.gz /usr/share/man/man1/terminator.1.gz
|
x-terminal-emulator.1.gz /usr/share/man/man1/terminator.1.gz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for dname in `find /usr/share/doc/terminator/html*/_static/fonts/ -type d` /usr/share/doc/terminator/apidoc/_static/fonts/; do
|
|
||||||
if [ -d ${dname} ]; then
|
|
||||||
gunzip -f ${dname}/*.gz
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
35
setup.py
35
setup.py
|
@ -18,7 +18,6 @@ from terminatorlib.version import APP_NAME, APP_VERSION
|
||||||
|
|
||||||
PO_DIR = 'po'
|
PO_DIR = 'po'
|
||||||
MO_DIR = os.path.join('build', 'mo')
|
MO_DIR = os.path.join('build', 'mo')
|
||||||
DOC_DIR = 'doc'
|
|
||||||
|
|
||||||
class TerminatorDist(Distribution):
|
class TerminatorDist(Distribution):
|
||||||
global_options = Distribution.global_options + [
|
global_options = Distribution.global_options + [
|
||||||
|
@ -28,8 +27,6 @@ class TerminatorDist(Distribution):
|
||||||
("without-icon-cache", None, "Don't attempt to run gtk-update-icon-cache")]
|
("without-icon-cache", None, "Don't attempt to run gtk-update-icon-cache")]
|
||||||
|
|
||||||
def __init__ (self, *args):
|
def __init__ (self, *args):
|
||||||
self.build_documentation = False
|
|
||||||
self.install_documentation = True
|
|
||||||
self.without_gettext = False
|
self.without_gettext = False
|
||||||
self.without_icon_cache = False
|
self.without_icon_cache = False
|
||||||
Distribution.__init__(self, *args)
|
Distribution.__init__(self, *args)
|
||||||
|
@ -74,16 +71,6 @@ class BuildData(build):
|
||||||
"/po/.intltool-merge-cache " + TOP_BUILDDIR + "/po " +
|
"/po/.intltool-merge-cache " + TOP_BUILDDIR + "/po " +
|
||||||
appdata_in + " " + appdata_data)
|
appdata_in + " " + appdata_data)
|
||||||
|
|
||||||
if self.distribution.build_documentation:
|
|
||||||
# Build the documentation
|
|
||||||
for doc_folder in (glob.glob (os.path.join (DOC_DIR, 'manual*')) + [os.path.join (DOC_DIR, 'apidoc')]):
|
|
||||||
if os.path.isfile(os.path.join(doc_folder, 'Makefile')):
|
|
||||||
old_cwd = os.getcwd()
|
|
||||||
os.chdir(doc_folder)
|
|
||||||
os.system("make clean")
|
|
||||||
os.system("make html")
|
|
||||||
os.chdir(old_cwd)
|
|
||||||
|
|
||||||
class Uninstall(Command):
|
class Uninstall(Command):
|
||||||
description = "Attempt an uninstall from an install --record file"
|
description = "Attempt an uninstall from an install --record file"
|
||||||
|
|
||||||
|
@ -145,7 +132,6 @@ class Uninstall(Command):
|
||||||
class InstallData(install_data):
|
class InstallData(install_data):
|
||||||
def run (self):
|
def run (self):
|
||||||
self.data_files.extend (self._find_mo_files ())
|
self.data_files.extend (self._find_mo_files ())
|
||||||
self.data_files.extend (self._find_doc_files ())
|
|
||||||
install_data.run (self)
|
install_data.run (self)
|
||||||
if not self.distribution.without_icon_cache:
|
if not self.distribution.without_icon_cache:
|
||||||
self._update_icon_cache ()
|
self._update_icon_cache ()
|
||||||
|
@ -169,27 +155,6 @@ class InstallData(install_data):
|
||||||
|
|
||||||
return data_files
|
return data_files
|
||||||
|
|
||||||
def _find_doc_files (self):
|
|
||||||
data_files = []
|
|
||||||
|
|
||||||
if self.distribution.install_documentation:
|
|
||||||
for doc_folder in (glob.glob (os.path.join (DOC_DIR, 'manual*')) + [os.path.join (DOC_DIR, 'apidoc')]):
|
|
||||||
# construct new path
|
|
||||||
src = os.path.join(doc_folder, '_build', 'html')
|
|
||||||
dest_sub = os.path.split(doc_folder[:])[1]
|
|
||||||
if dest_sub[:6] == 'manual':
|
|
||||||
dest_sub = 'html'+dest_sub[6:]
|
|
||||||
dest = os.path.join('share', 'doc', 'terminator', dest_sub)
|
|
||||||
if os.path.isdir(src):
|
|
||||||
for dirpath, dirnames, filenames in os.walk(src):
|
|
||||||
cut_elem_count = len(doc_folder.split(os.sep)) + 2
|
|
||||||
dest_sub = os.path.join(dirpath.split(os.sep)[cut_elem_count:])
|
|
||||||
full_dest_folder = os.path.join(dest, *dest_sub)
|
|
||||||
full_src_filenames = [os.path.join(dirpath, filename) for filename in filenames]
|
|
||||||
data_files.append((full_dest_folder, full_src_filenames))
|
|
||||||
|
|
||||||
return data_files
|
|
||||||
|
|
||||||
class Test(Command):
|
class Test(Command):
|
||||||
user_options = []
|
user_options = []
|
||||||
def initialize_options(self):
|
def initialize_options(self):
|
||||||
|
|
Loading…
Reference in New Issue