From 0977d3d5bec0364dfc1523803a97e8d1f365f1f1 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Thu, 27 Oct 2016 06:45:33 +0200 Subject: [PATCH] Remove scripting for documentation that was packaged with the main app. Documentation is now online. --- debian/terminator.postinst | 6 ------ setup.py | 35 ----------------------------------- 2 files changed, 41 deletions(-) diff --git a/debian/terminator.postinst b/debian/terminator.postinst index 0727a862..c30ae2b2 100755 --- a/debian/terminator.postinst +++ b/debian/terminator.postinst @@ -11,10 +11,4 @@ if [ "$1" = "configure" ]; then x-terminal-emulator.1.gz /usr/share/man/man1/terminator.1.gz 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# diff --git a/setup.py b/setup.py index 11e5f984..6e4b2161 100755 --- a/setup.py +++ b/setup.py @@ -18,7 +18,6 @@ from terminatorlib.version import APP_NAME, APP_VERSION PO_DIR = 'po' MO_DIR = os.path.join('build', 'mo') -DOC_DIR = 'doc' class TerminatorDist(Distribution): 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")] def __init__ (self, *args): - self.build_documentation = False - self.install_documentation = True self.without_gettext = False self.without_icon_cache = False Distribution.__init__(self, *args) @@ -74,16 +71,6 @@ class BuildData(build): "/po/.intltool-merge-cache " + TOP_BUILDDIR + "/po " + 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): description = "Attempt an uninstall from an install --record file" @@ -145,7 +132,6 @@ class Uninstall(Command): class InstallData(install_data): def run (self): self.data_files.extend (self._find_mo_files ()) - self.data_files.extend (self._find_doc_files ()) install_data.run (self) if not self.distribution.without_icon_cache: self._update_icon_cache () @@ -169,27 +155,6 @@ class InstallData(install_data): 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): user_options = [] def initialize_options(self):