minimal fileset

This commit is contained in:
Andreas Balogh
2021-02-15 23:07:10 +01:00
parent c211a66b47
commit be2d91aff8
5 changed files with 0 additions and 160 deletions

View File

View File

@@ -1,43 +0,0 @@
#!python3
# Created Jul 24, 2020
# @author: andreas
""" Module: Main Template """
from argparse import ArgumentParser
import logging
import sys
import os
LOG = logging.getLogger(__name__)
def cli(argv=None):
# command line interface
if argv is None:
argv = sys.argv
LOG.info("%s %s", os.path.basename(argv[0]), " ".join(argv[1:]))
parser = ArgumentParser(description="Module Template")
parser.add_argument("--action", help="mock action verb")
parser.add_argument("--database", help="database connection")
parser.add_argument("--config_file", help="json filepath, not used by mock")
args = parser.parse_args(argv[1:])
argd = vars(args)
# arguments
for k, v in argd.items():
print(k, v)
# enviroment
for k, v in os.environ.items():
print(k, v)
# feature
LOG.info("Hello world!")
LOG.info("done")
return 0
if __name__ == "__main__":
logging.Formatter.default_time_format = '%H:%M:%S'
logging.Formatter.default_msec_format = '%s.%03d'
logging.basicConfig(level=logging.INFO,
format='%(asctime)s [%(process)i] %(levelname).4s %(module)s.%(funcName)s: %(message)s')
sys.exit(cli())

View File

@@ -1,43 +0,0 @@
#!python3
# Created Jul 24, 2020
# @author: andreas
""" Module: Main Template """
from argparse import ArgumentParser
import logging
import sys
import os
LOG = logging.getLogger(__name__)
def cli(argv=None):
# command line interface
if argv is None:
argv = sys.argv
LOG.info("%s %s", os.path.basename(argv[0]), " ".join(argv[1:]))
parser = ArgumentParser(description="Module Template")
parser.add_argument("--action", help="mock action verb")
parser.add_argument("--database", help="database connection")
parser.add_argument("--config_file", help="json filepath, not used by mock")
args = parser.parse_args(argv[1:])
argd = vars(args)
# arguments
for k, v in argd.items():
print(k, v)
# enviroment
for k, v in os.environ.items():
print(k, v)
# feature
LOG.info("Hello world!")
LOG.info("done")
return 0
if __name__ == "__main__":
logging.Formatter.default_time_format = '%H:%M:%S'
logging.Formatter.default_msec_format = '%s.%03d'
logging.basicConfig(level=logging.INFO,
format='%(asctime)s [%(process)i] %(levelname).4s %(module)s.%(funcName)s: %(message)s')
sys.exit(cli())

View File

@@ -1,74 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from pathlib import Path
from setuptools import setup
def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
version = Path(package, "__version__.py").read_text()
return re.search("__version__ = ['\"]([^'\"]+)['\"]", version).group(1)
def get_long_description():
"""
Return the README.
"""
long_description = ""
with open("README.md", encoding="utf8") as f:
long_description += f.read()
long_description += "\n\n"
with open("CHANGELOG.md", encoding="utf8") as f:
long_description += f.read()
return long_description
def get_packages(package):
"""
Return root package and all sub-packages.
"""
return [str(path.parent) for path in Path(package).glob("**/__init__.py")]
setup(
name="zcm",
python_requires=">=3.6",
version=get_version("zcm"),
url="https://github.com/baloan/zcm",
project_urls={
"Changelog": "https://github.com/baloan/zcm/CHANGELOG.md",
"Documentation": "https://...",
"Source": "https://github.com/baloan/zcm",
},
license="MIT",
description="ZODB context manager",
author="Andreas Balogh",
author_email="baloand@gmail.com",
zip_safe=False,
install_requires=[
"ZODB",
],
extras_require={
},
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Topic :: Internet :: WWW/HTTP",
"Framework :: AsyncIO",
"Framework :: Trio",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3 :: Only",
],
)