forked from SiCKRAGE/SiCKRAGE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
84 lines (70 loc) · 2.44 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
import glob
import io
import os
import shutil
from setuptools import setup, Command
# Get the version number
with io.open(os.path.abspath(os.path.join(os.path.dirname(__file__), 'sickrage', 'version.txt'))) as f:
version = f.read()
def requires():
with io.open(os.path.abspath(os.path.join(os.path.dirname(__file__), 'requirements.txt'))) as f:
return f.read().splitlines()
class CleanCommand(Command):
"""Custom clean command to tidy up the project root."""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
shutil.rmtree(os.path.abspath(os.path.join(os.path.dirname(__file__), 'build')), ignore_errors=True)
shutil.rmtree(os.path.abspath(os.path.join(os.path.dirname(__file__), '*.pyc')), ignore_errors=True)
shutil.rmtree(os.path.abspath(os.path.join(os.path.dirname(__file__), '*.tgz')), ignore_errors=True)
shutil.rmtree(os.path.abspath(os.path.join(os.path.dirname(__file__), 'sickrage.egg-info')), ignore_errors=True)
[os.remove(f) for f in glob.glob("dist/sickrage-*")]
cmd_class = {'clean': CleanCommand}
# Check for Babel availability
try:
from babel.messages.frontend import compile_catalog, extract_messages, init_catalog, update_catalog
cmd_class.update(dict(
compile_catalog=compile_catalog,
extract_messages=extract_messages,
init_catalog=init_catalog,
update_catalog=update_catalog
))
except ImportError:
pass
setup(
name='sickrage',
version=version,
description='Automatic Video Library Manager for TV Shows',
author='echel0n',
author_email='[email protected]',
license='GPLv3',
url='https://git.sickrage.ca',
keywords=['sickrage', 'sickragetv', 'tv', 'torrent', 'nzb', 'video', 'echel0n'],
packages=['sickrage'],
install_requires=requires(),
include_package_data=True,
platforms='any',
zip_safe=False,
test_suite='tests',
cmdclass=cmd_class,
entry_points={
"console_scripts": [
"sickrage=sickrage:main"
]
},
message_extractors={
'sickrage/core/webserver': [
('**/views/**.mako', 'mako', {'input_encoding': 'utf-8'})
],
'sickrage': [
('**.py', 'python', None)
],
'dist': [
('**/js/*.min.js', 'ignore', None),
('**/js/*.js', 'javascript', {'input_encoding': 'utf-8'})
],
}
)