cde1ceab |
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sys
# 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',
os.path.join(package_name, 'version.py'))
module = module_from_spec(spec)
spec.loader.exec_module(module)
return module.version, module.cmdclass
version, cmdclass = get_version_and_cmdclass('miniver')
setup(
name='miniver',
description='minimal versioning tool',
version=version,
url='https://github.com/jbweston/miniver',
author='Joseph Weston',
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',
'Programming Language :: Python',
],
packages=find_packages('.'),
cmdclass=cmdclass,
)
|