Added packaging build files
The committed files define the requirements and information related to clog when packaging the module into a library. setup.py instantiates the build script process used by pip in editor mode, with the support of setup.cfg. File uses traditional build approach using the setuptools library.
This commit is contained in:
parent
5da9e7990e
commit
cd2e477430
3
pyproject.toml
Normal file
3
pyproject.toml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[build-system]
|
||||||
|
requires = ["setuptools>=42.0", "wheel"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
30
setup.cfg
Normal file
30
setup.cfg
Normal file
|
|
@ -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
|
||||||
49
setup.py
Normal file
49
setup.py
Normal file
|
|
@ -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"]}
|
||||||
|
)
|
||||||
Loading…
Reference in New Issue
Block a user