Skip to content

Commit

Permalink
Add some meta data
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Jan 26, 2014
1 parent 96107d2 commit abfe7b3
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Alex Gaynor
Corbin Simpson
David Reid
HawkOwl
Hynek Schlawack
Matt Haggard
Paul Hummer
Russel Haering
Expand Down
18 changes: 17 additions & 1 deletion klein/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
from klein.app import Klein, run, route, resource

__all__ = ['Klein', 'run', 'route', 'resource']

__version__ = "0.3.0"

__author__ = "The Klein contributors (see AUTHORS)"
__license__ = "MIT"
__copyright__ = "Copyright 2014 {0}".format(__author__)

__all__ = [
Klein,
__author__,
__copyright__,
__license__,
__version__,
resource,
route,
run,
]
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[wheel]
# we're pure-python
universal = 1
32 changes: 30 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
import codecs
import os
import re

from setuptools import setup


def read(*parts):
"""
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
"""
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, *parts), 'r', 'utf-8') as f:
return f.read()


def find_version(*file_paths):
"""
Build a path from *file_paths* and search for a ``__version__``
string inside.
"""
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")


setup(
classifiers=[
'Environment :: Web Environment',
Expand All @@ -15,6 +43,7 @@
'Topic :: Software Development :: Libraries :: Python Modules'
],
description="werkzeug + twisted.web",
long_description=read('README.rst'),
install_requires=[
"Twisted>=12.1",
"werkzeug"
Expand All @@ -24,8 +53,7 @@
name="klein",
packages=["klein"],
url="/~https://github.com/twisted/klein",
version="0.2.3",
version=find_version('klein', '__init__.py'),
maintainer='David Reid',
maintainer_email='dreid@dreid.org',
long_description=open('README.rst').read()
)

0 comments on commit abfe7b3

Please sign in to comment.