summaryrefslogtreecommitdiff
path: root/setup.py
blob: c39dab3a503cca5b1c0e6eb7e2eb617e36e386a3 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import sys
import platform

from setuptools import setup, find_packages

version = '0.6.0'

#
# determine requirements
#
with open('requirements.txt') as reqs:
    requirements = [
        line for line in reqs.read().split('\n')
        if (line and not line.startswith('-'))
    ]

try:
    import json  # noqa
except:
    try:
        import simplejson  # noqa
    except:
        requirements.append("simplejson >= 2.1.1")

try:
    import argparse  # noqa
except:
    #
    # This was introduced in Python 2.7 - the argparse package contains
    # a backported replacement for 2.6
    #
    requirements.append('argparse')

try:
    from functools import singledispatch  # noqa
except:
    #
    # This was introduced in Python 3.4 - the singledispatch package contains
    # a backported replacement for 2.6 through 3.4
    #
    requirements.append('singledispatch')


tests_require = requirements + [
    'virtualenv',
    'gunicorn',
    'mock',
    'sqlalchemy'
]
if sys.version_info < (2, 7):
    tests_require += ['unittest2']

if sys.version_info < (3, 0):
    # These don't support Python3 yet - don't run their tests
    if platform.python_implementation() != 'PyPy':
        # Kajiki is not pypy-compatible
        tests_require += ['Kajiki']
    tests_require += ['Genshi']
else:
    # Genshi added Python3 support in 0.7
    tests_require += ['Genshi>=0.7']

if sys.version_info < (3, 0) or sys.version_info >= (3, 3):
    tests_require += ['Jinja2']

#
# call setup
#
setup(
    name='pecan',
    version=version,
    description="A WSGI object-dispatching web framework, designed to be "
                "lean and fast, with few dependancies.",
    long_description=None,
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: Console',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: BSD License',
        'Operating System :: MacOS :: MacOS X',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: Implementation :: PyPy',
        'Topic :: Internet :: WWW/HTTP :: WSGI',
        'Topic :: Software Development :: Libraries :: Application Frameworks'
    ],
    keywords='web framework wsgi object-dispatch http',
    author='Jonathan LaCour',
    author_email='info@pecanpy.org',
    url='http://github.com/stackforge/pecan',
    license='BSD',
    packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
    include_package_data=True,
    scripts=['bin/pecan'],
    zip_safe=False,
    install_requires=requirements,
    tests_require=tests_require,
    test_suite='pecan',
    entry_points="""
    [pecan.command]
    serve = pecan.commands:ServeCommand
    shell = pecan.commands:ShellCommand
    create = pecan.commands:CreateCommand
    [pecan.scaffold]
    base = pecan.scaffolds:BaseScaffold
    rest-api = pecan.scaffolds:RestAPIScaffold
    [console_scripts]
    pecan = pecan.commands:CommandRunner.handle_command_line
    gunicorn_pecan = pecan.commands.serve:gunicorn_run
    """
)