Compile “gresources” and “gschemas” via setuptools
This commit is contained in:
parent
c5d7e75236
commit
e0d01f1f18
4 changed files with 37 additions and 9 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
21
setup.py
21
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.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue