2016-03-12 13:00:06 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
2017-01-15 19:47:21 +01:00
|
|
|
import os
|
2017-04-22 15:55:48 +02:00
|
|
|
import subprocess
|
2017-01-15 19:47:21 +01:00
|
|
|
|
2016-03-12 13:00:06 +01:00
|
|
|
from setuptools import setup
|
2017-04-22 15:55:48 +02:00
|
|
|
from setuptools.command.build_py import build_py
|
2017-04-27 11:18:42 +02:00
|
|
|
from setuptools.dist import Distribution
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MCGDistribution(Distribution):
|
|
|
|
global_options = Distribution.global_options + [
|
|
|
|
("no-compile-schemas", None, "Don't compile gsettings schemas")
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
|
self.no_compile_schemas = False
|
|
|
|
super(self.__class__, self).__init__(*args, **kwargs)
|
2017-04-22 15:55:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class build_mcg(build_py):
|
2017-04-27 11:18:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
def run(self, *args, **kwargs):
|
|
|
|
super(self.__class__, self).run(*args, **kwargs)
|
2017-04-22 15:55:48 +02:00
|
|
|
self._build_gresources()
|
2017-04-27 11:18:42 +02:00
|
|
|
if not self.distribution.no_compile_schemas:
|
|
|
|
self._build_gschemas()
|
|
|
|
|
2017-04-22 15:55:48 +02:00
|
|
|
|
|
|
|
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'])
|
2016-03-12 13:00:06 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setup(
|
2017-04-27 11:18:42 +02:00
|
|
|
distclass = MCGDistribution,
|
|
|
|
cmdclass = {
|
|
|
|
'build_py': build_mcg
|
|
|
|
},
|
2017-04-28 11:01:06 +02:00
|
|
|
name = "mcg",
|
2019-02-17 00:08:28 +01:00
|
|
|
version = '2.0.1',
|
2017-04-28 11:01:06 +02:00
|
|
|
description = "CoverGrid (mcg) is a client for the Music Player Daemon, focusing on albums instead of single tracks.",
|
2018-03-20 22:40:10 +01:00
|
|
|
url = "http://www.suruatoel.xyz/codes/mcg",
|
2016-03-12 13:00:06 +01:00
|
|
|
author = "coderkun",
|
2018-03-20 22:40:10 +01:00
|
|
|
author_email = "olli@suruatoel.xyz",
|
2016-03-12 13:00:06 +01:00
|
|
|
license = "GPL",
|
|
|
|
packages = [
|
2017-05-06 16:38:14 +02:00
|
|
|
'mcg',
|
|
|
|
'mcg/data'
|
2016-03-12 13:00:06 +01:00
|
|
|
],
|
2017-01-15 19:47:21 +01:00
|
|
|
package_dir = {
|
2017-05-06 16:38:14 +02:00
|
|
|
'mcg': 'mcg',
|
|
|
|
'mcg/data': 'data'
|
2017-01-15 19:47:21 +01:00
|
|
|
},
|
|
|
|
package_data = {
|
|
|
|
'mcg': [
|
|
|
|
'LICENSE',
|
|
|
|
'README.textile'
|
2017-05-06 16:38:14 +02:00
|
|
|
],
|
|
|
|
'mcg/data': [
|
|
|
|
'de.coderkun.mcg.gresource'
|
2017-01-15 19:47:21 +01:00
|
|
|
]
|
|
|
|
},
|
2016-03-12 13:00:06 +01:00
|
|
|
extras_require = {
|
|
|
|
'keyring support': ["python-keyring"]
|
|
|
|
},
|
|
|
|
entry_points = {
|
|
|
|
"gui_scripts": [
|
2017-01-15 19:47:21 +01:00
|
|
|
"mcg = mcg.mcg:main"
|
2016-03-12 13:00:06 +01:00
|
|
|
]
|
|
|
|
},
|
|
|
|
data_files = [
|
2017-01-15 19:47:21 +01:00
|
|
|
(os.path.join('share', 'applications'), [
|
2017-04-25 12:23:44 +02:00
|
|
|
"data/mcg.desktop"
|
2017-01-15 19:47:21 +01:00
|
|
|
]),
|
2017-04-25 12:22:22 +02:00
|
|
|
(os.path.join('share', 'icons'), [
|
|
|
|
"data/mcg.svg"
|
|
|
|
]),
|
2017-01-15 19:47:21 +01:00
|
|
|
(os.path.join('share', 'glib-2.0', 'schemas'), [
|
|
|
|
"data/de.coderkun.mcg.gschema.xml"
|
|
|
|
]),
|
2017-04-27 11:34:48 +02:00
|
|
|
(os.path.join('share', 'locale', 'en', 'LC_MESSAGES'), [
|
|
|
|
'locale/en/LC_MESSAGES/mcg.mo'
|
|
|
|
]),
|
|
|
|
(os.path.join('share', 'locale', 'de', 'LC_MESSAGES'), [
|
2017-04-22 15:03:55 +02:00
|
|
|
'locale/de/LC_MESSAGES/mcg.mo'
|
2017-01-15 19:47:21 +01:00
|
|
|
])
|
2016-03-12 13:00:06 +01:00
|
|
|
],
|
|
|
|
classifiers = [
|
|
|
|
"Development Status :: 3 - Alpha",
|
|
|
|
"Environment :: X11 Applications :: GTK"
|
|
|
|
"Intended Audience :: End Users/Desktop"
|
|
|
|
"License :: OSI Approved :: GNU General Public License (GPL)"
|
|
|
|
"Operating System :: OS Independent"
|
|
|
|
"Programming Language :: Python :: 3"
|
|
|
|
"Topic :: Desktop Environment :: Gnome"
|
|
|
|
"Topic :: Multimedia :: Sound/Audio"
|
|
|
|
"Topic :: Multimedia :: Sound/Audio :: Players"
|
|
|
|
]
|
|
|
|
)
|