diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2b90214 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=42.0", "wheel"] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..4ab8aff --- /dev/null +++ b/setup.cfg @@ -0,0 +1,30 @@ +[metadata] +name = clog +description = logging as simple as putting on a shoe. +author = Ethan Smith-Coss +license = GNU GPLv3+ +license_file = LICENCE.txt +platforms = unix, linux, osx, cygwin, win32 +classifiers = + Development Status :: 3 - Alpha + Environment :: Other Environment + Intended Audience :: Developers + License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) + Natural Language :: English + Operating System :: OS Independent + 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.10 + Programming Language :: Python :: 3 :: Only + Topic :: System :: Logging + Topic :: Software Development :: Libraries + Topic :: Utilities + +[options] +python_requires = >=3.6, <4 +package_dir = + =clog +zip_safe = no \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..814e3e8 --- /dev/null +++ b/setup.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python +import os +import sys +from setuptools import setup + +CURRENT_PYVERSION = sys.version_info[:2] +REQUIRED_PYVERSION = (3, 6) + +if CURRENT_PYVERSION < REQUIRED_PYVERSION: + sys.stderr.write( +""" +================================== +Whoops, unsupported Python version +================================== +It's seems as though your foot size does not meet the minimum required +shoe size for clog. Your foot size must at least be {}.{}, otherwise the +shoe will just fall off - and nobody wants to smell you stinky feet! + +Your current foot size is {}.{} which you are trying to put the shoe on. +If you wish to resolve this, consider growing your feet from the +official Python website to the minimum required version. + +...just make sure there aren't any snakes in your shoes afterwards. +""".format( + *(REQUIRED_PYVERSION + CURRENT_PYVERSION) + ) + ) + sys.exit(1) + + +info = {} +here = os.path.abspath(os.path.dirname(__file__)) +with open(os.path.join(here, "clog", "__version__.py"), "r", encoding="utf-8") as f: + exec(f.read(), info) + +with open("README.md", 'r', encoding="utf-8") as f: + readme = f.read() + + +if __name__ == "__main__": + setup( + version=info['__version__'], + long_description=readme, + long_description_content_type="text/markdown", + url=info['__url__'], + include_package_data=True, + author_email=info['__author_email__'], + package_data={"": ["LICENCE.txt"]} + ) \ No newline at end of file