-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
163 lines (149 loc) · 6.48 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Name: setup.py
Porpose: script to setup FFcuesplitter-gui.
Compatibility: Python3
Platform: all
Writer: Gianluca Pernigotto <[email protected]>
Copyright: 2023-2023 Gianluca Pernigotto <[email protected]>
license: GPL3
Rev: Aug.1.2023
Code checker: flake8, pylint
########################################################
This file is part of FFcuesplitter-gui.
FFcuesplitter-gui is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FFcuesplitter-gui is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FFcuesplitter-gui. If not, see <http://www.gnu.org/licenses/>.
"""
import sys
import platform
from setuptools import setup, find_packages
from ffcuesplitter_gui._sys.info import (__version__,
__author__,
__contact__,
# __maintainer__,
# __maintainer_contact__,
# __projecturl__,
__githuburl__,
# __appname__,
__packagename__,
__license__,
__description__,
__descriptionfull__,
# __copyleft__,
# __licensefull__
)
def source_build():
"""
Source/Build distributions
"""
if 'sdist' in sys.argv or 'bdist_wheel' in sys.argv:
inst_req = ["wxpython>=4.0.7; platform_system=='Windows' or "
"platform_system=='Darwin'",
"PyPubSub>=4.0.3",
"ffcuesplitter>=1.0.22",
]
setup_req = ["setuptools>=47.1.1",
"wheel>=0.34.2",
"twine>=3.1.1"
]
with open('README.md', 'r', encoding='utf8') as readme:
long_descript = readme.read()
long_description_ct = 'text/markdown'
else: # e.g. to make a Debian source package, include wxpython.
inst_req = ["wxpython>=4.0.7",
"PyPubSub>=4.0.3",
"ffcuesplitter>=1.0.22",
]
setup_req = []
long_descript = __descriptionfull__
long_description_ct = 'text'
excluded = ['']
# pathnames must be relative-path
if platform.system() == 'Windows':
data_f = [('share/pixmaps',
['ffcuesplitter_gui/art/icons/ffcuesplittergui.png'])]
elif platform.system() == 'Darwin':
data_f = [('share/pixmaps',
['ffcuesplitter_gui/art/icons/ffcuesplittergui.png']),
('share/man/man1',
['docs/man/man1/ffcuesplitter-gui.1.gz']),
]
else:
pkg = 'ffcuesplitter_gui'
png = 'ffcuesplittergui.png'
desktop = 'io.github.jeanslack.ffcuesplitter_gui.desktop'
metainfo = 'io.github.jeanslack.ffcuesplitter_gui.appdata.xml'
data_f = [
('share/applications', [f'{pkg}/art/{desktop}']),
('share/metainfo', [f'{metainfo}']),
('share/pixmaps', [f'{pkg}/art/icons/{png}']),
('share/icons/hicolor/48x48/apps',
[f'{pkg}/art/icons/hicolor/48x48/apps/{png}']),
('share/icons/hicolor/256x256/apps',
[f'{pkg}/art/icons/hicolor/256x256/apps/{png}']),
('share/icons/hicolor/scalable/apps',
[f'{pkg}/art/icons/hicolor/scalable/apps/ffcuesplittergui.svg']),
('share/man/man1', ['docs/man/man1/ffcuesplitter-gui.1.gz']),
]
setup(name=__packagename__,
version=__version__,
description=__description__,
long_description=long_descript,
long_description_content_type=long_description_ct,
author=__author__,
author_email=__contact__,
url=__githuburl__,
license=__license__,
platforms=["All"],
packages=find_packages(exclude=excluded),
data_files=data_f,
package_data={"ffcuesplitter_gui": ["art/icons/*", "locale/*"]
},
exclude_package_data={
"ffcuesplitter_gui": ["art/ffcuesplittergui.icns",
"art/ffcuesplittergui.ico",
"locale/README",
"locale/ffcuesplitter-gui.pot"]
},
include_package_data=True,
zip_safe=False,
python_requires=">=3.7.0, <4.0",
install_requires=inst_req,
setup_requires=setup_req,
entry_points={
'gui_scripts':
['ffcuesplitter-gui = ffcuesplitter_gui.gui_app:main']},
classifiers=[
'Environment :: X11 Applications :: GTK',
'Development Status :: 4 - Beta',
'Operating System :: MacOS',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Intended Audience :: End Users/Desktop',
('License :: OSI Approved :: GNU General Public License v3 '
'(GPLv3)'),
'Natural Language :: English',
'Natural Language :: Italian',
'Natural Language :: Russian',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Multimedia :: Sound/Audio',
'Topic :: Multimedia :: Sound/Audio :: Conversion',
'Topic :: Multimedia :: Sound/Audio :: CD Audio :: CD Ripping',
],
)
if __name__ == '__main__':
source_build()