forked from frescobaldi/frescobaldi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
121 lines (111 loc) · 3.81 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import os
import sys
from frescobaldi_app import appinfo
try:
from setuptools import setup
USE_SETUPTOOLS = True
except ImportError:
from distutils.core import setup
USE_SETUPTOOLS = False
def packagelist(directory):
"""Returns a sorted list with package names for all packages under the given directory."""
return list(sorted(root.replace(os.sep, '.')
for root, dirs, files in os.walk(directory)
if '__init__.py' in files))
scripts = ['frescobaldi']
packages = packagelist('frescobaldi_app')
package_data = {
'frescobaldi_app.css': ['*.png'],
'frescobaldi_app.fonts': ['templates/*.ly'],
'frescobaldi_app.help': ['*.png'],
'frescobaldi_app.hyphdicts': ['*.dic'],
'frescobaldi_app.icons': [
'*.ico',
'*.svg',
'*x*/*.png',
'Tango/index.theme',
'Tango/scalable/*.svg',
'TangoExt/index.theme',
'TangoExt/scalable/*.svg',
],
'frescobaldi_app.layoutcontrol': ['*.ly', '*.ily'],
'frescobaldi_app.i18n': ['*.mo'],
'frescobaldi_app.scorewiz': ['*.png'],
'frescobaldi_app.splashscreen': ['*.png'],
'frescobaldi_app.svgview': ['*.js', '*.html'],
'frescobaldi_app.symbols': ['*.svg'],
'frescobaldi_app.userguide': ['*.md', '*.png'],
}
options = {
'sdist': {
'force_manifest': 1,
}
}
if sys.platform.startswith('win'):
scripts.append('windows/frescobaldi-wininst.py')
options['bdist_wininst'] = {
'install_script': 'windows/frescobaldi-wininst.py',
'bitmap': 'windows/frescobaldi-wininst.bmp',
}
data_files = []
else:
data_files = [
('share/icons/hicolor/scalable/apps', ['frescobaldi_app/icons/org.frescobaldi.Frescobaldi.svg']),
('share/applications', ['linux/org.frescobaldi.Frescobaldi.desktop']),
('share/metainfo', ['linux/org.frescobaldi.Frescobaldi.metainfo.xml']),
('share/man/man1', ['frescobaldi.1']),
]
setup_extra_args = {}
if USE_SETUPTOOLS:
setup_extra_args['install_requires'] = ['python-ly', 'python-poppler-qt5']
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Environment :: X11 Applications :: Qt',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: GNU General Public License (GPL)',
# Natural Language :: Chinese (Hong Kong) is not yet accepted by pypi
#'Natural Language :: Chinese (Hong Kong)',
'Natural Language :: Chinese (Simplified)',
'Natural Language :: Chinese (Traditional)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: French',
'Natural Language :: Galician',
'Natural Language :: German',
'Natural Language :: Italian',
'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Russian',
'Natural Language :: Spanish',
'Natural Language :: Turkish',
'Natural Language :: Ukranian',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Multimedia :: Sound/Audio',
'Topic :: Multimedia :: Graphics',
'Topic :: Text Editors',
]
setup(
name = appinfo.name,
version = appinfo.version,
description = appinfo.description,
long_description = appinfo.long_description,
maintainer = appinfo.maintainer,
maintainer_email = appinfo.maintainer_email,
url = appinfo.url,
license = appinfo.license,
scripts = scripts,
packages = packages,
package_data = package_data,
data_files = data_files,
classifiers = classifiers,
options = options,
**setup_extra_args
)