1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 10:42:34 +01:00
gallery-dl/setup.py

107 lines
2.9 KiB
Python
Raw Normal View History

2015-03-27 18:26:09 +01:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
2015-03-27 18:26:09 +01:00
2017-01-17 21:44:54 +01:00
import sys
2015-11-04 00:07:03 +01:00
import os.path
2017-01-17 21:44:54 +01:00
2015-03-27 18:26:09 +01:00
try:
from setuptools import setup
2017-01-17 21:44:54 +01:00
has_setuptools = True
2015-03-27 18:26:09 +01:00
except ImportError:
from distutils.core import setup
2017-01-17 21:44:54 +01:00
has_setuptools = False
2015-03-27 18:26:09 +01:00
2015-11-04 00:07:03 +01:00
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read()
2015-11-04 00:07:03 +01:00
2017-01-17 21:44:54 +01:00
# get version without importing the package
exec(read("gallery_dl/version.py"))
2017-01-17 21:44:54 +01:00
DESCRIPTION = ("Command-line program to download image galleries and "
2017-10-27 15:45:38 +02:00
"collections from pixiv, exhentai, danbooru and more")
2017-01-17 21:44:54 +01:00
LONG_DESCRIPTION = read("README.rst")
if "py2exe" in sys.argv:
try:
import py2exe
except ImportError:
print("Error importing 'py2exe'", file=sys.stderr)
exit(1)
2017-01-17 21:44:54 +01:00
params = {
"console": [{
"script": "./gallery_dl/__main__.py",
"dest_base": "gallery-dl",
"version": __version__,
"description": DESCRIPTION,
"comments": LONG_DESCRIPTION,
"product_name": "gallery-dl",
"product_version": __version__,
}],
"options": {"py2exe": {
"bundle_files": 0,
2017-01-17 21:44:54 +01:00
"compressed": 1,
2017-10-27 15:45:38 +02:00
"optimize": 1,
2017-01-17 21:44:54 +01:00
"dist_dir": ".",
"packages": ["gallery_dl"],
"dll_excludes": ["w9xpopen.exe"],
2017-01-17 21:44:54 +01:00
}},
"zipfile": None,
2017-01-17 21:44:54 +01:00
}
elif has_setuptools:
params = {
"entry_points": {
"console_scripts": [
"gallery-dl = gallery_dl:main"
]
}
}
else:
params = {
"scripts": ["bin/gallery-dl"]
}
2015-03-27 18:26:09 +01:00
setup(
name="gallery_dl",
version=__version__,
2017-01-17 21:44:54 +01:00
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
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",
maintainer="Mike Fährmann",
maintainer_email="mike_faehrmann@web.de",
2015-04-16 02:57:36 +02:00
license="GPLv2",
python_requires=">=3.3",
2015-04-16 02:57:36 +02:00
install_requires=[
2015-10-30 16:26:08 +01:00
"requests >= 2.4.2",
2015-04-16 02:57:36 +02:00
],
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
],
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",
2015-06-28 13:02:36 +02:00
"Programming Language :: Python :: 3.3",
"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",
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",
],
2017-01-17 21:44:54 +01:00
test_suite="test",
**params
2015-03-27 18:26:09 +01:00
)