2019-11-01 21:33:48 +01:00
|
|
|
#!/usr/bin/env python3
|
2016-10-08 11:37:47 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
2015-03-27 18:26:09 +01:00
|
|
|
|
2019-11-01 21:33:48 +01:00
|
|
|
import re
|
2017-01-17 21:44:54 +01:00
|
|
|
import sys
|
2015-11-04 00:07:03 +01:00
|
|
|
import os.path
|
2019-03-24 18:05:54 +01:00
|
|
|
import warnings
|
2019-11-01 21:33:48 +01:00
|
|
|
from setuptools import setup
|
2015-11-04 00:07:03 +01:00
|
|
|
|
2018-10-24 14:43:37 +02:00
|
|
|
if sys.hexversion < 0x3040000:
|
|
|
|
sys.exit("Python 3.4+ required")
|
2017-01-17 21:44:54 +01:00
|
|
|
|
2015-03-27 18:26:09 +01:00
|
|
|
|
2015-11-04 00:07:03 +01:00
|
|
|
def read(fname):
|
2018-10-24 14:43:37 +02:00
|
|
|
path = os.path.join(os.path.dirname(__file__), fname)
|
|
|
|
with open(path, encoding="utf-8") as file:
|
|
|
|
return file.read()
|
2015-11-04 00:07:03 +01:00
|
|
|
|
2019-03-24 18:05:54 +01:00
|
|
|
def check_file(fname):
|
2019-11-01 21:33:48 +01:00
|
|
|
path = os.path.join(os.path.dirname(__file__), fname)
|
|
|
|
if os.path.exists(path):
|
2019-03-24 18:05:54 +01:00
|
|
|
return True
|
|
|
|
warnings.warn(
|
|
|
|
"Not including file '{}' since it is not present. "
|
|
|
|
"Run 'make' to build all automatically generated files.".format(fname)
|
|
|
|
)
|
|
|
|
return False
|
|
|
|
|
2017-01-17 21:44:54 +01:00
|
|
|
|
2016-10-08 11:37:47 +02:00
|
|
|
# get version without importing the package
|
2019-11-01 21:33:48 +01:00
|
|
|
VERSION = re.search(
|
|
|
|
r'__version__\s*=\s*"([^"]+)"',
|
|
|
|
read("gallery_dl/version.py"),
|
|
|
|
).group(1)
|
2017-01-17 21:44:54 +01:00
|
|
|
|
2019-11-01 21:33:48 +01:00
|
|
|
FILES = [
|
2019-03-24 18:05:54 +01:00
|
|
|
(path, [f for f in files if check_file(f)])
|
|
|
|
for (path, files) in [
|
2019-11-09 00:00:40 +01:00
|
|
|
("share/bash-completion/completions", ["data/completion/gallery-dl"]),
|
|
|
|
("share/man/man1" , ["data/man/gallery-dl.1"]),
|
|
|
|
("share/man/man5" , ["data/man/gallery-dl.conf.5"]),
|
2019-03-24 18:05:54 +01:00
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2015-03-27 18:26:09 +01:00
|
|
|
setup(
|
|
|
|
name="gallery_dl",
|
2019-11-01 21:33:48 +01:00
|
|
|
version=VERSION,
|
|
|
|
description=("Command-line program to download image-galleries and "
|
|
|
|
"-collections from several image hosting sites"),
|
|
|
|
long_description=read("README.rst"),
|
2015-03-27 18:26:09 +01:00
|
|
|
url="https://github.com/mikf/gallery-dl",
|
2015-11-10 21:17:31 +01:00
|
|
|
download_url="https://github.com/mikf/gallery-dl/releases/latest",
|
2015-03-27 18:26:09 +01:00
|
|
|
author="Mike Fährmann",
|
|
|
|
author_email="mike_faehrmann@web.de",
|
2016-10-08 11:37:47 +02:00
|
|
|
maintainer="Mike Fährmann",
|
|
|
|
maintainer_email="mike_faehrmann@web.de",
|
2015-04-16 02:57:36 +02:00
|
|
|
license="GPLv2",
|
2018-07-17 21:15:25 +02:00
|
|
|
python_requires=">=3.4",
|
2015-04-16 02:57:36 +02:00
|
|
|
install_requires=[
|
2019-05-03 17:21:01 +02:00
|
|
|
"requests>=2.11.0",
|
2015-04-16 02:57:36 +02:00
|
|
|
],
|
2019-11-01 21:33:48 +01:00
|
|
|
extras_require={
|
|
|
|
"cloudflare": [
|
|
|
|
"pyOpenSSL>=19.0.0",
|
|
|
|
"cryptography>=2.8.0",
|
|
|
|
],
|
|
|
|
"video": [
|
|
|
|
"youtube-dl",
|
|
|
|
],
|
|
|
|
},
|
2015-03-27 18:26:09 +01:00
|
|
|
packages=[
|
|
|
|
"gallery_dl",
|
|
|
|
"gallery_dl.extractor",
|
|
|
|
"gallery_dl.downloader",
|
2018-06-08 22:21:35 +02:00
|
|
|
"gallery_dl.postprocessor",
|
2015-03-27 18:26:09 +01:00
|
|
|
],
|
2019-11-01 21:33:48 +01:00
|
|
|
entry_points={
|
|
|
|
"console_scripts": [
|
|
|
|
"gallery-dl = gallery_dl:main",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
data_files=FILES,
|
2016-11-12 21:51:23 +01:00
|
|
|
keywords="image gallery downloader crawler scraper",
|
2015-03-27 18:26:09 +01:00
|
|
|
classifiers=[
|
2017-10-27 15:45:38 +02:00
|
|
|
"Development Status :: 5 - Production/Stable",
|
2015-03-27 18:26:09 +01:00
|
|
|
"Environment :: Console",
|
2015-04-16 02:57:36 +02:00
|
|
|
"Intended Audience :: End Users/Desktop",
|
|
|
|
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
|
2015-12-03 02:31:23 +01:00
|
|
|
"Operating System :: Microsoft :: Windows",
|
2015-04-16 02:57:36 +02:00
|
|
|
"Operating System :: POSIX",
|
2018-10-24 14:43:37 +02:00
|
|
|
"Operating System :: MacOS",
|
2015-06-28 13:02:36 +02:00
|
|
|
"Programming Language :: Python :: 3.4",
|
2015-10-05 20:34:14 +02:00
|
|
|
"Programming Language :: Python :: 3.5",
|
2017-04-10 08:14:36 +02:00
|
|
|
"Programming Language :: Python :: 3.6",
|
2018-10-24 14:43:37 +02:00
|
|
|
"Programming Language :: Python :: 3.7",
|
2019-11-01 21:33:48 +01:00
|
|
|
"Programming Language :: Python :: 3.8",
|
2015-03-27 18:26:09 +01:00
|
|
|
"Programming Language :: Python :: 3 :: Only",
|
2015-10-05 20:34:14 +02:00
|
|
|
"Topic :: Internet :: WWW/HTTP",
|
2015-03-27 18:26:09 +01:00
|
|
|
"Topic :: Multimedia :: Graphics",
|
2018-10-24 14:43:37 +02:00
|
|
|
"Topic :: Utilities",
|
2015-03-27 18:26:09 +01:00
|
|
|
],
|
2017-01-17 21:44:54 +01:00
|
|
|
test_suite="test",
|
2015-03-27 18:26:09 +01:00
|
|
|
)
|