mirror of
https://github.com/jongracecox/anybadge.git
synced 2026-01-07 12:51:36 +01:00
Added setup.py for package build.
This commit is contained in:
8
setup.cfg
Normal file
8
setup.cfg
Normal file
@@ -0,0 +1,8 @@
|
||||
[sdist]
|
||||
formats=zip
|
||||
|
||||
[wheel]
|
||||
universal=1
|
||||
|
||||
[egg_info]
|
||||
tag_build =
|
||||
32
setup.py
Normal file
32
setup.py
Normal 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'
|
||||
)
|
||||
Reference in New Issue
Block a user