#!/usr/bin/env python import os import sys from typing import Dict 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: Dict[str, str] = {} 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"]} )