forked from jeanslack/Videomass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
152 lines (137 loc) · 5.71 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
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Name: setup.py
Porpose: script to setup Videomass.
Compatibility: Python3
Platform: all
Writer: Gianluca Pernigotto <[email protected]>
Copyright: (c) 2014-2022 Gianluca Pernigotto <[email protected]>
license: GPL3
Rev: Oct.22.2021
Code checker: flake8, pylint
########################################################
This file is part of Videomass.
Videomass 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.
Videomass 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 Videomass. If not, see <http://www.gnu.org/licenses/>.
"""
import sys
import platform
from setuptools import setup, find_packages
from videomass.vdms_sys.msg_info import current_release
from videomass.vdms_sys.msg_info import descriptions_release
def source_build():
"""
Source/Build distributions
"""
# Get info data
crel = current_release()
drel = descriptions_release()
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",
"youtube_dl>=2020.1.1",
"yt_dlp>=2021.9.2",
"requests>=2.21.0",
]
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",
"requests>=2.21.0",
]
setup_req = []
long_descript = drel[1]
long_description_ct = 'text'
excluded = ['']
# pathnames must be relative-path
if platform.system() == 'Windows':
data_f = [('share/pixmaps', ['videomass/art/icons/videomass.png'])]
elif platform.system() == 'Darwin':
data_f = [('share/pixmaps', ['videomass/art/icons/videomass.png']),
('share/man/man1', ['docs/man/man1/videomass.1.gz']),
]
else:
data_f = [('share/applications',
['videomass/art/io.github.jeanslack.videomass.desktop']),
('share/metainfo',
['io.github.jeanslack.videomass.appdata.xml']),
('share/pixmaps', ['videomass/art/icons/videomass.png']),
('share/icons/hicolor/48x48/apps',
['videomass/art/icons/hicolor/48x48/apps/videomass.png',
'videomass/art/icons/hicolor/48x48/apps/videomass.xpm']),
('share/icons/hicolor/256x256/apps',
['videomass/art/icons/hicolor/256x256/apps/videomass.png']
),
('share/icons/hicolor/scalable/apps',
['videomass/art/icons/hicolor/scalable/apps/'
'videomass.svg']),
('share/man/man1', ['docs/man/man1/videomass.1.gz']),
]
setup(name=crel[1],
version=crel[2],
description=drel[0],
long_description=long_descript,
long_description_content_type=long_description_ct,
author=crel[6][0],
author_email=crel[7],
url=crel[5],
license=drel[2],
platforms=["All"],
packages=find_packages(exclude=excluded),
data_files=data_f,
package_data={"videomass": ["art/icons/*", "locale/*"]
},
exclude_package_data={"videomass": ["art/videomass.icns",
"art/videomass.ico",
"locale/README",
"locale/videomass.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':
['videomass = videomass.gui_app:main']},
classifiers=[
'Environment :: X11 Applications :: GTK',
'Development Status :: 5 - Production/Stable',
'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',
'Natural Language :: Dutch',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Spanish',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
'Topic :: Multimedia :: Video',
'Topic :: Multimedia :: Video :: Conversion',
'Topic :: Multimedia :: Sound/Audio :: Conversion',
],
)
if __name__ == '__main__':
source_build()