|
1 | 1 | #!/usr/bin/env python |
2 | 2 | # -*- coding: utf-8 -*- |
3 | 3 |
|
4 | | -import io |
| 4 | +import codecs |
5 | 5 | import os |
| 6 | +import re |
6 | 7 |
|
7 | 8 | from setuptools import setup |
8 | 9 |
|
9 | | -import liveproxy |
10 | | - |
11 | 10 | here = os.path.abspath(os.path.dirname(__file__)) |
12 | 11 |
|
13 | | -with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: |
14 | | - long_description = '\n' + f.read() |
| 12 | + |
| 13 | +def read(*parts): |
| 14 | + with codecs.open(os.path.join(here, *parts), 'r') as fp: |
| 15 | + return fp.read() |
| 16 | + |
| 17 | + |
| 18 | +def find_version(*file_paths): |
| 19 | + version_file = read(*file_paths) |
| 20 | + version_match = re.search( |
| 21 | + r'''^__version__ = ['"]([^'"]*)['"]''', |
| 22 | + version_file, |
| 23 | + re.M, |
| 24 | + ) |
| 25 | + if version_match: |
| 26 | + return version_match.group(1) |
| 27 | + |
| 28 | + raise RuntimeError('Unable to find version string.') |
| 29 | + |
| 30 | + |
| 31 | +long_description = read('README.md') |
15 | 32 |
|
16 | 33 | setup( |
17 | | - name=liveproxy.__title__, |
18 | | - version=liveproxy.__version__, |
19 | | - description=liveproxy.__summary__, |
| 34 | + name='liveproxy', |
| 35 | + version=find_version('liveproxy', '__init__.py'), |
| 36 | + description='LiveProxy is a local Proxyserver between Streamlink and an URL.', |
20 | 37 | long_description=long_description, |
21 | 38 | long_description_content_type='text/markdown', |
22 | | - license=liveproxy.__license__, |
23 | | - url=liveproxy.__uri__, |
| 39 | + license='BSD 2-Clause "Simplified" License', |
| 40 | + url='https://github.com/back-to/liveproxy', |
24 | 41 | project_urls={ |
25 | 42 | 'Documentation': 'https://liveproxy.github.io/', |
26 | 43 | 'Source': 'https://github.com/back-to/liveproxy/', |
27 | 44 | 'Tracker': 'https://github.com/back-to/liveproxy/issues', |
28 | 45 | }, |
29 | | - author=liveproxy.__author__, |
30 | | - author_email=liveproxy.__email__, |
| 46 | + author='back-to', |
| 47 | + author_email='backto@protonmail.ch', |
31 | 48 | packages=['liveproxy'], |
32 | 49 | entry_points={ |
33 | 50 | 'console_scripts': [ |
34 | 51 | 'liveproxy=liveproxy.main:main' |
35 | 52 | ], |
36 | 53 | }, |
37 | 54 | install_requires=[ |
38 | | - 'streamlink>=0.13.0, <1', |
| 55 | + 'streamlink>=0.14.0, <1', |
39 | 56 | ], |
40 | 57 | python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4', |
41 | 58 | classifiers=[ |
42 | | - 'Development Status :: 1 - Planning', |
| 59 | + 'Development Status :: 4 - Beta', |
43 | 60 | 'Environment :: Console', |
44 | 61 | 'Intended Audience :: End Users/Desktop', |
45 | 62 | 'License :: OSI Approved :: BSD License', |
|
0 commit comments