setup.py
cde1ceab
 # -*- coding: utf-8 -*-
 
 from setuptools import setup, find_packages
 import sys
 
1a076952
 if sys.version_info < (3, 5):
9cce6560
     print("Miniver needs at least Python 3.5.")
1a076952
     sys.exit(1)
cde1ceab
 
3116e0a2
 
cde1ceab
 # Loads version.py module without importing the whole package.
 def get_version_and_cmdclass(package_name):
     import os
     from importlib.util import module_from_spec, spec_from_file_location
9cce6560
 
     spec = spec_from_file_location("version", os.path.join(package_name, "_version.py"))
cde1ceab
     module = module_from_spec(spec)
     spec.loader.exec_module(module)
8dddbd2e
     return module.__version__, module.cmdclass
cde1ceab
 
 
9cce6560
 version, cmdclass = get_version_and_cmdclass("miniver")
cde1ceab
 
9cce6560
 with open("README.md") as readme_file:
56050ece
     long_description = readme_file.read()
cde1ceab
 
 setup(
9cce6560
     name="miniver",
     description="minimal versioning tool",
56050ece
     long_description=long_description,
9cce6560
     long_description_content_type="text/markdown",
cde1ceab
     version=version,
9cce6560
     url="https://github.com/jbweston/miniver",
     author="Joseph Weston and Christoph Groth",
     author_email="joseph@weston.cloud",
     license="CC0",
cde1ceab
     classifiers=[
9cce6560
         "Development Status :: 4 - Beta",
         "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
         "Topic :: Software Development :: Version Control :: Git",
         "Intended Audience :: Developers",
         "Programming Language :: Python :: 3 :: Only",
         "Programming Language :: Python :: 3.5",
         "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
7838800f
         "Programming Language :: Python :: 3.8",
9cce6560
         "Operating System :: POSIX :: Linux",
         "Operating System :: MacOS :: MacOS X",
         "Operating System :: Microsoft :: Windows",
cde1ceab
     ],
9cce6560
     packages=find_packages("."),
cde1ceab
     cmdclass=cmdclass,
9cce6560
     scripts=["bin/miniver"],
cde1ceab
 )