summaryrefslogtreecommitdiff
path: root/setup.py
blob: 0fd974742f6730123b69f0093246070a36ca476a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
"""Distutils setup file"""
try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

# Metadata
PACKAGE_NAME = "simplegeneric"
PACKAGE_VERSION = "0.8.1"

def get_description():
    # Get our long description from the documentation
    f = open('README.txt')
    lines = []
    for line in f:
        if not line.strip():
            break     # skip to first blank line
    for line in f:
        if line.startswith('.. contents::'):
            break     # read to table of contents
        lines.append(line)
    f.close()
    return ''.join(lines)

setup(
    name=PACKAGE_NAME,
    version=PACKAGE_VERSION,
    description= "Simple generic functions (similar to Python's own len(), "
        "pickle.dump(), etc.)",
    long_description = get_description(),
    url = "http://cheeseshop.python.org/pypi/simplegeneric",
    author="Phillip J. Eby",
    author_email="peak@eby-sarna.com",
    license="ZPL 2.1",
    test_suite = 'simplegeneric.test_suite',
    py_modules = ['simplegeneric'],
    classifiers = [
        line.strip() for line in open('classifiers.txt') if line.strip()
    ],
)