diff --git a/README.textile b/README.textile index cd0d5b3..ac717ad 100644 --- a/README.textile +++ b/README.textile @@ -14,9 +14,17 @@ Dependencies: * "python-keyring":http://pypi.python.org/pypi/keyring (optional) * "python-setuptools":https://pypi.python.org/pypi/setuptools (building) + +h2. Building + +Build the application with _setuptools_: + +bc. $ python3 setup.py build + + h2. Running/Testing -For testing the application and running it without (system-wide) installation, donwload/clone the code and use _setuptools_ to install it for the current user: +For testing the application and running it without (system-wide) installation, donwload/clone the code, build it as described above and then use _setuptools_ to install it for the current user: bc. $ python3 setup.py develop --user @@ -28,11 +36,15 @@ or if _~/.local/bin/_ is on your PATH bc. $ mcg -h2. Building -Build the application with _setuptools_: +h2. Installing + +Install the application system-wide with _setuptools_: + +bc. # python3 setup.py install + +Note: _On Linux using the distribution’s package manager is the preferred way of installing applications system-wide._ -bc. $ python3 setup.py build h2. Packaging @@ -40,11 +52,6 @@ Create a distribution package with _setuptools_: bc. $ python3 setup.py sdist -h2. Installation - -Install the application system-wide with _setuptools_: - -bc. # python3 setup.py install h2. Screenshots diff --git a/data/de.coderkun.mcg.gresource b/data/de.coderkun.mcg.gresource deleted file mode 100644 index 70c590a..0000000 Binary files a/data/de.coderkun.mcg.gresource and /dev/null differ diff --git a/data/gschemas.compiled b/data/gschemas.compiled deleted file mode 100644 index 930d7e0..0000000 Binary files a/data/gschemas.compiled and /dev/null differ diff --git a/setup.py b/setup.py index 799e302..456c672 100644 --- a/setup.py +++ b/setup.py @@ -3,13 +3,34 @@ import os +import subprocess from setuptools import setup +from setuptools.command.build_py import build_py + + + + +class build_mcg(build_py): + def run(self): + build_py.run(self) + self._build_gresources() + self._build_gschemas() + + def _build_gresources(self): + print("compiling gresources") + subprocess.run(['glib-compile-resources', 'de.coderkun.mcg.gresource.xml'], cwd='data') + + + def _build_gschemas(self): + print("compiling gschemas") + subprocess.run(['glib-compile-schemas', 'data']) setup( + cmdclass = {'build_py': build_mcg}, name = "MPDCoverGrid", version = "0.6", description = "MPDCoverGrid is a client for the Music Player Daemon, focused on albums instead of single tracks.",