forked from MichaelYochpaz/iSubRip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
65 lines (51 loc) · 2.03 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
from os import PathLike
from pathlib import Path
from typing import Union
from setuptools import setup
def get_version(relative_path: Union[str, PathLike]) -> str:
current_path = Path(__file__).parent.absolute()
with open(current_path / relative_path, 'r') as fp:
file_data: str = fp.read()
for line in file_data.splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
raise RuntimeError("Unable to find version string.")
PACKAGE_NAME: str = "isubrip"
with open("README.md", "r") as file:
long_description = file.read()
setup(
name=PACKAGE_NAME,
version=get_version(Path(PACKAGE_NAME) / "__init__.py"),
author="Michael Yochpaz",
license="MIT",
license_files=('LICENSE',),
description="A Python package for scraping and downloading subtitles from iTunes movie pages.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/MichaelYochpaz/iSubRip",
project_urls={
"Bug Reports": "https://github.com/MichaelYochpaz/iSubRip/issues",
"Source": "https://github.com/MichaelYochpaz/iSubRip"
},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"Topic :: Utilities",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10"
],
keywords=["iTunes", "movies", "subtitles", "scrape", "scraper", "download", "m3u8"],
packages=["isubrip"],
install_requires=["aiohttp", "beautifulsoup4", "lxml", "m3u8", "mergedeep", "requests", "tomli"],
package_data={"isubrip": ["resources/*"]},
python_requires=">=3.7",
entry_points={
"console_scripts":
["isubrip = isubrip.__main__:main"]
},
)