-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
91 lines (79 loc) · 2.63 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
#!/usr/bin/env python3
# _*_ coding: utf-8 _*_
###
# Project : SubLime
# FileName : setup.py
# -----------------------------------------------------------------------------
# Author : sham
# E-Mail : mauricesham@gmail.com
# -----------------------------------------------------------------------------
# Creation date : 28/08/2013
##
import re
import os
from codecs import open
from setuptools import setup
from setuptools import find_packages
here = os.path.abspath(os.path.dirname(__file__))
# Get the long description from the relevant file
with open(os.path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
long_description = f.read()
# Finds version of the application in the __init__ file of package.
version = "UNKNOWN"
source_dir = "Sources"
package_file = os.path.join(here, source_dir, "sublime", '__init__.py')
with open(package_file, encoding='utf-8') as f:
version_file = f.read()
# The version line must have the form
# __version__ = 'ver'
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
version = version_match.group(1)
else:
raise RuntimeError("Unable to find version string.")
setup(
name="SubLime",
version=version,
description="SubLime is a command-line program for searching "
"and downloading the right subtitles for movies.",
long_description=long_description,
author="sham",
author_email="mauricesham@gmail.com",
url="https://github.com/shamsan/sublime",
keywords=["substitles", "video"],
package_dir={'': source_dir},
packages=find_packages(source_dir),
entry_points={
'console_scripts': [
'sublime = sublime:main',
],
},
license="License :: OSI Approved :: BSD License",
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Natural Language :: English",
"Natural Language :: French",
"Topic :: Home Automation",
"Topic :: Utilities",
],
install_requires=[
"babelfish==0.5.4",
"enzyme==0.4.1",
"guessit==0.7",
"stevedore==1.3.0"
],
data_files=[
('Config', ['Config/logging.conf']),
],
test_suite='nose.collector',
tests_require=['nose>=1.3.0'],
)
# EOF