1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-23 19:55:38 +01:00
svtplay-dl/setup.py

76 lines
2.3 KiB
Python
Raw Normal View History

2013-03-23 15:17:15 +01:00
import os
2019-08-25 00:40:39 +02:00
import sys
from setuptools import find_packages
2020-02-17 00:06:56 +01:00
if "build_exe" in sys.argv:
from cx_Freeze import setup, Executable
else:
from setuptools import setup
# fake Executable class to avoid cx_Freeze on non-Windows
# noinspection Mypy
class Executable:
# noinspection PyUnusedLocal
def __init__(self, script=None, base=None):
pass
2013-03-23 15:17:15 +01:00
2018-07-10 21:32:54 +02:00
import versioneer
2013-03-23 15:17:15 +01:00
srcdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "lib/")
sys.path.insert(0, srcdir)
vi = sys.version_info
2020-09-14 23:05:30 +02:00
if vi < (3, 5):
raise RuntimeError("svtplay-dl requires Python 3.5 or greater")
about = {}
with open(os.path.join(srcdir, "svtplay_dl", "__version__.py")) as f:
exec(f.read(), about)
2020-09-18 00:24:33 +02:00
with open("README.md", "r", "utf-8") as f:
readme = f.read()
deps = []
deps.append("requests>=2.0.0")
deps.append("PySocks")
deps.append("cryptography")
2018-05-07 00:56:02 +02:00
deps.append("pyyaml")
setup(
2018-01-30 20:11:37 +01:00
name="svtplay-dl",
2018-07-10 21:32:54 +02:00
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
2019-08-25 00:27:31 +02:00
packages=find_packages("lib", exclude=["tests", "*.tests", "*.tests.*"]),
install_requires=deps,
2019-08-25 00:27:31 +02:00
package_dir={"": "lib"},
scripts=["bin/svtplay-dl"],
2018-07-10 21:32:54 +02:00
author="Johan Andersson",
author_email="j@i19.se",
2018-01-30 20:11:37 +01:00
description="Command-line program to download videos from various video on demand sites",
2020-09-18 00:24:33 +02:00
long_description=readme,
long_description_content_type="text/markdown",
2018-07-10 21:32:54 +02:00
license="MIT",
url="https://svtplay-dl.se",
2020-09-18 00:24:33 +02:00
python_requires=">=3.5",
2019-08-25 00:27:31 +02:00
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
2020-09-14 23:05:30 +02:00
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
2019-08-25 00:27:31 +02:00
"Topic :: Internet :: WWW/HTTP",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video",
"Topic :: Utilities",
],
2020-02-17 00:06:56 +01:00
# cx_freeze info for Windows builds with Python embedded
options={"build_exe": {"packages": ["cffi", "cryptography", "idna", "queue"], "includes": "_cffi_backend"}},
2020-02-17 00:06:56 +01:00
executables=[Executable("bin/svtplay-dl", base=None)],
)