Commit 77c0632d authored by brgerhar's avatar brgerhar
Browse files

Migrate to setup.cfg

parent 987aef01
......@@ -11,7 +11,7 @@ lint:
- pip install pylint
script:
# Install dependencies (pylint import-error):
- pip install -e .
- pip install .
- pylint --rcfile=pyproject.toml --output-format=text usz-lf-downloader.py test/
formatting:
......
[metadata]
name = usz-lf-downloader
version = attr: usz-lf-downloader.__version__
description = Download data packages from the LiqidFiles server at USZ
long_description = file: README.md
long_description_content_type = text/markdown
author = Gerhard Bräunlich, Christian Bolliger
author_email = gerhard.braeunlich@id.ethz.ch, christian.bolliger@id.ethz.ch
url = https://gitlab.ethz.ch/ID-SIS-RP-OPS/usz-lf-downloader
classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Operating System :: OS Independent
[options]
install_requires =
dataclasses ; python_version<'3.7'
PySocks
packages = find:
zip_safe = False
python_requires = >=3.6
scripts =
usz-lf-downloader.py
[options.packages.find]
exclude =
test
test.*
#!/usr/bin/env python
import re
import os
from datetime import datetime
from setuptools import find_packages, setup
# 0.0.0-dev.* version identifiers for development only (not public)
__version__ = os.environ.get(
"CI_COMMIT_TAG",
"0.0.0.dev" + os.environ.get("CI_JOB_ID", datetime.now().strftime("%Y%m%d")),
)
__repo__ = "https://gitlab.ethz.ch/ID-SIS-RP-OPS/usz-lf-downloader"
setup(
name="usz-lf-downloader",
version=__version__,
description="Download data packages from the LiqidFiles server at USZ",
long_description=re.compile("^.. start-badges.*^.. end-badges", re.M | re.S).sub(
"", open("README.md").read()
),
author="Gerhard Bräunlich",
author_email="gerhard.braeunlich@id.ethz.ch",
url=__repo__,
packages=find_packages(),
classifiers=[
# complete classifier list:
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
"Development Status :: 4 - Beta",
"Intended Audience :: System Administrators",
"Operating System :: Unix",
"Operating System :: POSIX",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Utilities",
],
project_urls={"Issue Tracker": __repo__ + "/issues"},
keywords=["BiomedIT"],
python_requires=">=3.6",
install_requires=["dataclasses ; python_version<'3.7'", "PySocks"],
scripts=["usz-lf-downloader.py"],
)
......@@ -31,6 +31,8 @@ from typing import Optional, Callable, Tuple
from dataclasses import dataclass, field, fields
__version__ = "1.0.0"
def check_https(s: str) -> str:
if not s.startswith("https://"):
......@@ -353,6 +355,7 @@ def cli():
logger = logging.getLogger()
logger.propagate = True
parser = argparse.ArgumentParser(prog="LiquidFiles downloader")
parser.add_argument("--version", action="version", version=__version__)
parser.add_argument("config", type=str, help="Location of the config file")
parser.add_argument(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment