forked from yuranevmer/srtmerge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
63 lines (51 loc) · 1.76 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
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup, find_packages
from srtmerge.cli import __version__, __author__
py_version = sys.version_info[:2]
if py_version < (2, 6):
raise Exception('This version of srtmerge needs Python 2.6 or later. ')
if sys.argv[-1] in ("submit", "publish"):
os.system("python setup.py bdist_egg sdist --format=zip upload")
sys.exit()
README = """srtmerge is a Python library used to merge two Srt files.
Usage
=====
::
from srtmerge import srtmerge
srtmerge([filepath1, filepath2, ...], out_filepath, offset=1000)
srtmerge filepath1 filepath2 out_filepath offset=1000
"""
requires = ['chardet']
if py_version < (2, 7):
requires.append('argparse')
setup(name='srtmerge',
version=__version__,
author=__author__,
author_email='[email protected]',
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
description="srtmerge (.srt) used to merge two Srt files",
long_description=README,
url="https://github.com/wistful/srtmerge",
license="LGPL",
install_requires=requires,
platforms=["Unix,"],
keywords="srtmerge, srt, subtitle",
test_suite='tests',
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Topic :: Text Processing",
"Topic :: Utilities"
],
entry_points={
'console_scripts': [
'srtmerge = srtmerge.cli:main'
]},
)