Fix build #98
1 changed files with 6 additions and 3 deletions
9
setup.py
9
setup.py
|
|
@ -29,17 +29,19 @@ class build_mcg(build_py):
|
|||
|
||||
|
||||
def run(self, *args, **kwargs):
|
||||
super(self.__class__, self).run(*args, **kwargs)
|
||||
self._build_gresources()
|
||||
if not self.distribution.no_compile_schemas:
|
||||
self._build_gschemas()
|
||||
|
||||
# This will copy the package_data and data_files, so we need to do this
|
||||
# *after* we've compiled resources and schemas.
|
||||
super(self.__class__, self).run(*args, **kwargs)
|
||||
|
||||
|
||||
def _build_gresources(self):
|
||||
print("compiling gresources")
|
||||
subprocess.run(['glib-compile-resources', 'xyz.suruatoel.mcg.gresource.xml'], cwd='data')
|
||||
|
||||
|
||||
def _build_gschemas(self):
|
||||
print("compiling gschemas")
|
||||
subprocess.run(['glib-compile-schemas', 'data'])
|
||||
|
|
@ -92,7 +94,8 @@ setup(
|
|||
"data/icons/mcg.svg"
|
||||
]),
|
||||
(os.path.join('share', 'glib-2.0', 'schemas'), [
|
||||
"data/xyz.suruatoel.mcg.gschema.xml"
|
||||
"data/xyz.suruatoel.mcg.gschema.xml",
|
||||
"data/gschemas.compiled",
|
||||
]),
|
||||
(os.path.join('share', 'locale', 'en', 'LC_MESSAGES'), [
|
||||
'locale/en/LC_MESSAGES/mcg.mo'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue