Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.2
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (26 sloc) 0.742 kb
#!/usr/bin/env python
from distutils.core import setup
import re
src = open('jsonpatch.py').read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", src))
docstrings = re.findall('"""(.*)"""', src)
PACKAGE = 'jsonpatch'
MODULES = (
'jsonpatch',
)
AUTHOR_EMAIL = metadata['author']
VERSION = metadata['version']
WEBSITE = metadata['website']
LICENSE = metadata['license']
DESCRIPTION = docstrings[0]
# Extract name and e-mail ("Firstname Lastname <mail@example.org>")
AUTHOR, EMAIL = re.match(r'(.*) <(.*)>', AUTHOR_EMAIL).groups()
setup(name=PACKAGE,
version=VERSION,
description=DESCRIPTION,
author=AUTHOR,
author_email=EMAIL,
license=LICENSE,
url=WEBSITE,
py_modules=MODULES,
)
Jump to Line
Something went wrong with that request. Please try again.