forked from busimus/cutelog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
73 lines (61 loc) · 2.51 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
# -*- coding: utf-8 -*-
from os.path import dirname, join
from setuptools import setup
from setuptools.command.install import install
VERSION = '1.1.6'
def build_qt_resources():
print('Compiling resources...')
from PyQt5 import pyrcc_main
pyrcc_main.processResourceFile(['cutelog/resources/resources.qrc'],
'cutelog/resources.py', False)
print('Resources compiled successfully')
class CustomInstall(install):
def run(self):
try:
build_qt_resources()
except Exception as e:
print('Could not compile the resources.py file due to an exception: "{}"\n'
'Aborting build.'.format(e))
raise
install.run(self)
setup(
name="cutelog",
version=VERSION,
description="GUI for Python's logging module",
packages=["cutelog"],
author="Alexander Bus",
author_email="[email protected]",
url="https://github.com/busimus/cutelog/",
requires=['PyQt5'],
python_requires=">=3.5",
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: X11 Applications :: Qt",
"Environment :: MacOS X :: Cocoa",
"Environment :: Win32 (MS Windows)",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Quality Assurance",
"Topic :: System :: Logging",
"Topic :: System :: Monitoring",
],
download_url="https://github.com/Busimus/cutelog/archive/{}.zip".format(VERSION),
entry_points={'console_scripts': 'cutelog=cutelog.__main__:main'},
include_package_data=True,
install_requires=['PyQt5;platform_system=="Darwin"', # it's better to use distro-supplied
'PyQt5;platform_system=="Windows"'], # PyQt package on Linux
keywords=["log", "logging", "gui", "qt"],
license="GPLv3",
long_description=open(join(dirname(__file__), "README.rst")).read(),
# package_data={"cutelog": ["styles/*", "ui/*"]}, # everything is in resources.py already
data_files=[('share/applications', ['share/cutelog.desktop']),
('share/pixmaps', ['share/cutelog.png'])],
zip_safe=False,
cmdclass=dict(install=CustomInstall)
)