Merge pull request #493 from mattrose/rm_icon_cache

remove gtk-update-icon-cache from setup.py
This commit is contained in:
Matt Rose 2021-08-24 14:57:16 -04:00 committed by GitHub
commit b20d11e2ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 13 deletions

View File

@ -30,12 +30,10 @@ class TerminatorDist(Distribution):
global_options = Distribution.global_options + [ global_options = Distribution.global_options + [
("build-documentation", None, "Build the documentation"), ("build-documentation", None, "Build the documentation"),
("install-documentation", None, "Install the documentation"), ("install-documentation", None, "Install the documentation"),
("without-gettext", None, "Don't build/install gettext .mo files"), ("without-gettext", None, "Don't build/install gettext .mo files")]
("without-icon-cache", None, "Don't attempt to run gtk-update-icon-cache")]
def __init__ (self, *args): def __init__ (self, *args):
self.without_gettext = False self.without_gettext = False
self.without_icon_cache = False
Distribution.__init__(self, *args) Distribution.__init__(self, *args)
@ -154,16 +152,6 @@ class InstallData(install_data):
self.data_files.extend (self._find_css_files ()) self.data_files.extend (self._find_css_files ())
self.data_files.extend (self._find_mo_files ()) self.data_files.extend (self._find_mo_files ())
install_data.run (self) install_data.run (self)
if not self.distribution.without_icon_cache:
self._update_icon_cache ()
# We should do this on uninstall too
def _update_icon_cache(self):
info("running gtk-update-icon-cache")
try:
subprocess.call(["gtk-update-icon-cache", "-q", "-f", "-t", os.path.join(self.install_dir, "share/icons/hicolor")])
except Exception as e:
warn("updating the GTK icon cache failed: %s" % str(e))
def _find_mo_files (self): def _find_mo_files (self):
data_files = [] data_files = []