Added setup.py for package build.

This commit is contained in:
Jon Grace-Cox
2017-09-11 17:20:34 -04:00
parent 420aadd934
commit 976e2cda79
2 changed files with 40 additions and 0 deletions

8
setup.cfg Normal file
View File

@@ -0,0 +1,8 @@
[sdist]
formats=zip
[wheel]
universal=1
[egg_info]
tag_build =

32
setup.py Normal file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/python
import sys
import re
from setuptools import setup
def get_version():
with open("anybadge.py", "r") as file_handle:
file_text = file_handle.read()
version_match = re.search(r'.* __version__ = [\'"]([^\'"]*)[\'"]', file_text)
if version_match:
print version_match.group(1)
return version_match.group(1)
raise RuntimeError("Unable to identify version string.")
setup(
name='anybadge',
description='Simple, flexible badge generator for project badges.',
version=get_version(),
author='Jon Grace-Cox',
author_email='jongracecox@gmail.com',
py_modules = ['anybadge'],
setup_requires=['setuptools', 'wheel'],
tests_require=[],
install_requires=[],
data_files=[],
options={
'bdist_wheel': {'universal': True}
},
platform=['any'],
url='https://github.com/jongracecox/anybadge'
)