You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gallery-dl/setup.py

118 lines
3.3 KiB

10 years ago
#!/usr/bin/env python
# -*- coding: utf-8 -*-
10 years ago
from __future__ import unicode_literals, print_function
import sys
import os.path
if sys.hexversion < 0x3040000:
sys.exit("Python 3.4+ required")
10 years ago
try:
from setuptools import setup
has_setuptools = True
10 years ago
except ImportError:
from distutils.core import setup
has_setuptools = False
10 years ago
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
with open(path, encoding="utf-8") as file:
return file.read()
# get version without importing the package
exec(read("gallery_dl/version.py"))
DESCRIPTION = ("Command-line program to download image-galleries and "
"-collections from several image hosting sites")
LONG_DESCRIPTION = read("README.rst")
if "py2exe" in sys.argv:
try:
import py2exe
except ImportError:
sys.exit("Error importing 'py2exe'")
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,
"compressed": 1,
"optimize": 1,
"dist_dir": ".",
"packages": ["gallery_dl"],
"dll_excludes": ["w9xpopen.exe"],
}},
"zipfile": None,
}
elif has_setuptools:
params = {
"entry_points": {
"console_scripts": [
"gallery-dl = gallery_dl:main"
]
}
}
else:
params = {
"scripts": ["bin/gallery-dl"]
}
10 years ago
setup(
name="gallery_dl",
version=__version__,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
10 years ago
url="https://github.com/mikf/gallery-dl",
9 years ago
download_url="https://github.com/mikf/gallery-dl/releases/latest",
10 years ago
author="Mike Fährmann",
author_email="mike_faehrmann@web.de",
maintainer="Mike Fährmann",
maintainer_email="mike_faehrmann@web.de",
10 years ago
license="GPLv2",
python_requires=">=3.4",
10 years ago
install_requires=[
"requests >= 2.4.2",
10 years ago
],
10 years ago
packages=[
"gallery_dl",
"gallery_dl.extractor",
"gallery_dl.downloader",
"gallery_dl.postprocessor",
10 years ago
],
data_files = [
('etc/bash_completion.d', ['gallery-dl.bash-completion']),
('share/man/man1' , ['gallery-dl.1']),
],
keywords="image gallery downloader crawler scraper",
10 years ago
classifiers=[
"Development Status :: 5 - Production/Stable",
10 years ago
"Environment :: Console",
10 years ago
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Operating System :: Microsoft :: Windows",
10 years ago
"Operating System :: POSIX",
"Operating System :: MacOS",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
10 years ago
"Programming Language :: Python :: 3 :: Only",
"Topic :: Internet :: WWW/HTTP",
10 years ago
"Topic :: Multimedia :: Graphics",
"Topic :: Utilities",
10 years ago
],
test_suite="test",
**params
10 years ago
)