forked from nicotine-plus/nicotine-plus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
109 lines (98 loc) · 4.79 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
#!/usr/bin/env python3
# COPYRIGHT (C) 2020-2022 Nicotine+ Contributors
# COPYRIGHT (C) 2016-2017 Michael Labouebe <gfarmerfr@free.fr>
# COPYRIGHT (C) 2009-2010 quinox <quinox@users.sf.net>
# COPYRIGHT (C) 2009 hedonist <ak@sensi.org>
# COPYRIGHT (C) 2006-2009 daelstorm <daelstorm@gmail.com>
# COPYRIGHT (C) 2008-2009 eLvErDe <gandalf@le-vert.net>
#
# GNU GENERAL PUBLIC LICENSE
# Version 3, 29 June 2007
#
# This program 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.
#
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
"""
To install Nicotine+ on a GNU/Linux distribution, run:
pip3 install .
"""
import glob
from setuptools import find_packages
from setuptools import setup
from setuptools.command.build_py import build_py
from pynicotine.config import config
from pynicotine.i18n import LOCALE_PATH
from pynicotine.i18n import build_translations
class BuildPyCommand(build_py):
def run(self):
build_translations()
build_py.run(self)
if __name__ == "__main__":
setup(
name="nicotine-plus",
version=config.version,
license="GPLv3+",
description="Graphical client for the Soulseek peer-to-peer network",
long_description="""Nicotine+ is a graphical client for the Soulseek peer-to-peer
network.
Nicotine+ aims to be a pleasant, free and open source (FOSS)
alternative to the official Soulseek client, providing additional
functionality while keeping current with the Soulseek protocol.""",
author=config.author,
author_email="nicotine-team@lists.launchpad.net",
url=config.website_url,
platforms="any",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: X11 Applications :: GTK",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Communications :: Chat",
"Topic :: Communications :: File Sharing",
"Topic :: Internet",
"Topic :: System :: Networking"
],
packages=find_packages(include=["pynicotine", "pynicotine.*"]),
package_data={"": ["*.bin", "*.ui", "PLUGININFO"] + glob.glob(LOCALE_PATH + "/**/*.mo", recursive=True)},
scripts=["nicotine"],
data_files=[
("share/applications", ["data/%s.desktop" % config.application_id]),
("share/metainfo", ["data/%s.appdata.xml" % config.application_id]),
("share/man/man1", ["data/nicotine.1"]),
("share/icons/hicolor/16x16/apps",
["pynicotine/gtkgui/icons/hicolor/16x16/apps/%s.png" % config.application_id]),
("share/icons/hicolor/24x24/apps",
["pynicotine/gtkgui/icons/hicolor/24x24/apps/%s.png" % config.application_id]),
("share/icons/hicolor/32x32/apps",
["pynicotine/gtkgui/icons/hicolor/32x32/apps/%s.png" % config.application_id]),
("share/icons/hicolor/48x48/apps",
["pynicotine/gtkgui/icons/hicolor/48x48/apps/%s.png" % config.application_id]),
("share/icons/hicolor/64x64/apps",
["pynicotine/gtkgui/icons/hicolor/64x64/apps/%s.png" % config.application_id]),
("share/icons/hicolor/128x128/apps",
["pynicotine/gtkgui/icons/hicolor/128x128/apps/%s.png" % config.application_id]),
("share/icons/hicolor/256x256/apps",
["pynicotine/gtkgui/icons/hicolor/256x256/apps/%s.png" % config.application_id]),
("share/icons/hicolor/scalable/apps",
["pynicotine/gtkgui/icons/hicolor/scalable/apps/%s.svg" % config.application_id]),
("share/icons/hicolor/symbolic/apps",
["pynicotine/gtkgui/icons/hicolor/symbolic/apps/%s-symbolic.svg" % config.application_id]),
("share/icons/hicolor/scalable/intl", glob.glob("pynicotine/gtkgui/icons/hicolor/scalable/intl/*.svg")),
("share/icons/hicolor/scalable/status", glob.glob("pynicotine/gtkgui/icons/hicolor/scalable/status/*.svg"))
],
python_requires=">=3.6",
install_requires=["PyGObject>=3.22"],
extras_require={"test": ["flake8", "pylint"]},
cmdclass={"build_py": BuildPyCommand}
)