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.
49 lines
1.4 KiB
Python
49 lines
1.4 KiB
Python
#!/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"]}
|
|
) |