2013-03-23 15:17:15 +01:00
|
|
|
import os
|
2023-03-13 18:52:04 +01:00
|
|
|
import platform
|
2019-08-25 00:40:39 +02:00
|
|
|
import sys
|
|
|
|
|
|
|
|
from setuptools import find_packages
|
2020-02-17 00:06:56 +01:00
|
|
|
|
2023-03-13 18:52:04 +01:00
|
|
|
if platform.system() == "Windows" and "build_exe" in sys.argv:
|
2020-02-17 00:06:56 +01:00
|
|
|
from cx_Freeze import setup, Executable
|
2023-03-13 18:52:04 +01:00
|
|
|
|
|
|
|
executable = (Executable("bin/svtplay-dl", base=None),)
|
2020-02-17 00:06:56 +01:00
|
|
|
else:
|
|
|
|
from setuptools import setup
|
|
|
|
|
2023-03-13 18:52:04 +01:00
|
|
|
executable = None
|
2013-03-23 15:17:15 +01:00
|
|
|
|
2021-04-30 11:24:06 +02:00
|
|
|
# This is needed for versioneer to be importable when building with PEP 517.
|
|
|
|
# See <https://github.com/warner/python-versioneer/issues/193> and links
|
|
|
|
# therein for more information.
|
|
|
|
sys.path.append(os.path.dirname(__file__))
|
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)
|
2016-01-07 20:15:08 +01:00
|
|
|
|
2018-05-24 23:50:55 +02:00
|
|
|
vi = sys.version_info
|
2023-12-12 21:11:35 +01:00
|
|
|
if vi < (3, 8):
|
|
|
|
raise RuntimeError("svtplay-dl requires Python 3.8 or greater")
|
2018-05-24 23:50:55 +02:00
|
|
|
|
2018-05-24 23:05:34 +02:00
|
|
|
about = {}
|
2020-05-03 11:35:03 +02:00
|
|
|
with open(os.path.join(srcdir, "svtplay_dl", "__version__.py")) as f:
|
2018-05-24 23:05:34 +02:00
|
|
|
exec(f.read(), about)
|
2018-03-12 21:55:03 +01:00
|
|
|
|
2020-09-20 17:29:28 +02:00
|
|
|
with open("README.md", encoding="utf-8") as f:
|
2020-09-18 00:24:33 +02:00
|
|
|
readme = f.read()
|
|
|
|
|
2018-05-24 23:05:34 +02:00
|
|
|
deps = []
|
2018-03-12 21:55:03 +01:00
|
|
|
deps.append("requests>=2.0.0")
|
|
|
|
deps.append("PySocks")
|
2019-03-23 01:00:44 +01:00
|
|
|
deps.append("cryptography")
|
2018-05-07 00:56:02 +02:00
|
|
|
deps.append("pyyaml")
|
2016-01-07 20:15:08 +01:00
|
|
|
|
2013-03-10 14:49:31 +01:00
|
|
|
setup(
|
2018-01-30 20:11:37 +01:00
|
|
|
name="svtplay-dl",
|
2018-07-10 21:32:54 +02:00
|
|
|
version=versioneer.get_version(),
|
2022-11-05 10:42:32 +01:00
|
|
|
cmdclass=versioneer.get_cmdclass(),
|
2019-08-25 00:27:31 +02:00
|
|
|
packages=find_packages("lib", exclude=["tests", "*.tests", "*.tests.*"]),
|
2016-01-07 20:15:08 +01:00
|
|
|
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",
|
2023-12-12 21:11:35 +01:00
|
|
|
python_requires=">=3.8",
|
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",
|
2020-09-14 23:05:30 +02:00
|
|
|
"Programming Language :: Python :: 3.8",
|
2021-02-28 22:03:50 +01:00
|
|
|
"Programming Language :: Python :: 3.9",
|
2023-12-12 21:11:35 +01:00
|
|
|
"Programming Language :: Python :: 3.10",
|
|
|
|
"Programming Language :: Python :: 3.11",
|
|
|
|
"Programming Language :: Python :: 3.12",
|
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
|
2020-03-28 01:04:19 +01:00
|
|
|
options={"build_exe": {"packages": ["cffi", "cryptography", "idna", "queue"], "includes": "_cffi_backend"}},
|
2023-03-13 18:52:04 +01:00
|
|
|
executables=executable,
|
2013-03-10 14:49:31 +01:00
|
|
|
)
|