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

100 lines
3.0 KiB

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
10 years ago
import re
import sys
import os.path
import warnings
from setuptools import setup
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()
def check_file(fname):
path = os.path.join(os.path.dirname(__file__), fname)
if os.path.exists(path):
return True
warnings.warn(
"Not including file '{}' since it is not present. "
"Run 'make' to build all automatically generated files.".format(fname)
)
return False
# get version without importing the package
VERSION = re.search(
r'__version__\s*=\s*"([^"]+)"',
read("gallery_dl/version.py"),
).group(1)
FILES = [
(path, [f for f in files if check_file(f)])
for (path, files) in [
("share/bash-completion/completions", ["data/completion/gallery-dl"]),
("share/zsh/site-functions" , ["data/completion/_gallery-dl"]),
("share/man/man1" , ["data/man/gallery-dl.1"]),
("share/man/man5" , ["data/man/gallery-dl.conf.5"]),
]
]
10 years ago
setup(
name="gallery_dl",
version=VERSION,
description=("Command-line program to download image galleries and "
"collections from several image hosting sites"),
long_description=read("README.rst"),
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.11.0",
10 years ago
],
extras_require={
"video": [
"youtube-dl",
],
},
10 years ago
packages=[
"gallery_dl",
"gallery_dl.extractor",
"gallery_dl.downloader",
"gallery_dl.postprocessor",
10 years ago
],
entry_points={
"console_scripts": [
"gallery-dl = gallery_dl:main",
],
},
data_files=FILES,
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",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
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",
10 years ago
)