setup.py
cde1ceab
 # -*- coding: utf-8 -*-
 
 from setuptools import setup, find_packages
 import sys
 
1a076952
 if sys.version_info < (3, 5):
     print('Miniver needs at least Python 3.5.')
     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
     spec = spec_from_file_location('version',
8dddbd2e
                                    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
 
 
 version, cmdclass = get_version_and_cmdclass('miniver')
 
56050ece
 with open('README.md') as readme_file:
     long_description = readme_file.read()
cde1ceab
 
 setup(
     name='miniver',
     description='minimal versioning tool',
56050ece
     long_description=long_description,
     long_description_content_type='text/markdown',
cde1ceab
     version=version,
     url='https://github.com/jbweston/miniver',
6b1cb171
     author='Joseph Weston and Christoph Groth',
953459dd
     author_email='joseph@weston.cloud',
cde1ceab
     license='CC0',
     classifiers=[
         'Development Status :: 4 - Beta',
         'License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication',
         'Topic :: Software Development :: Version Control :: Git',
         'Intended Audience :: Developers',
1a076952
         'Programming Language :: Python :: 3 :: Only',
cde1ceab
     ],
     packages=find_packages('.'),
     cmdclass=cmdclass,
10679ce5
     scripts=['bin/miniver']
cde1ceab
 )