From 608dc99398cf0c91a9d2a542c18b8acb5b575886 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 17 Aug 2021 19:57:42 +0200 Subject: [PATCH] Setup files Signed-off-by: Yohann D'ANELLO --- .gitignore | 1 + MANIFEST.in | 2 ++ pscheck/__main__.py | 7 +++++++ pscheck/pscheck.py | 2 +- setup.cfg | 32 ++++++++++++++++++++++++++++++++ setup.py | 5 +++++ 6 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 MANIFEST.in create mode 100755 pscheck/__main__.py create mode 100644 setup.cfg create mode 100755 setup.py diff --git a/.gitignore b/.gitignore index 9b247de..652f405 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ __pycache__ +*.egg-info *.pyc *.txt diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..98e58f4 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +# Include source code and certificates +recursive-include pscheck *.py *.crt diff --git a/pscheck/__main__.py b/pscheck/__main__.py new file mode 100755 index 0000000..1ccd861 --- /dev/null +++ b/pscheck/__main__.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python + +from pscheck import pscheck + + +if __name__ == '__main__': + pscheck.main() diff --git a/pscheck/pscheck.py b/pscheck/pscheck.py index 8392846..768608c 100644 --- a/pscheck/pscheck.py +++ b/pscheck/pscheck.py @@ -181,4 +181,4 @@ def main(): args = parser.parse_args() qrcode = read_qrcode(args.file) - analyse_qrcode(qrcode, args.full, not args.dontcheck) + exit(analyse_qrcode(qrcode, args.full, not args.dontcheck)) diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..4116a2f --- /dev/null +++ b/setup.cfg @@ -0,0 +1,32 @@ +[metadata] +name = pscheck +long_description = file: README.rst +long_description_content_type = text/markdown +description = Vérificateur de pass sanitaire +maintainer = Ÿnérant +maintainer_email = ynerant@crans.org +url = https://git.ynerant.fr/ynerant/pass-sanitaire-check +keywords = green, certificate, france, europe, covid, coronavirus +classifiers = + Development Status :: 4 - Beta + Operating System :: OS Independent + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + +[options] +packages = find: +include_package_data = True +install_requires = + cbor2>=5.2.0 + cryptography>=3.3.2 +python_requires = >=3.6 + +[options.entry_points] +console_scripts = + pscheck = pscheck.pscheck:main + +[bdist_wheel] +; pure python +universal = 1 diff --git a/setup.py b/setup.py new file mode 100755 index 0000000..229b2eb --- /dev/null +++ b/setup.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python3 + +from setuptools import setup + +setup()