File: setup.py

package info (click to toggle)
python-chameleon 2.16-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,700 kB
  • ctags: 1,471
  • sloc: python: 17,872; xml: 597; makefile: 75
file content (85 lines) | stat: -rw-r--r-- 2,299 bytes parent folder | download
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
__version__ = '2.16'

import os
import sys

from setuptools import setup, find_packages
from setuptools.command.test import test

here = os.path.abspath(os.path.dirname(__file__))
try:
    README = open(os.path.join(here, 'README.rst')).read()
    CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
except:  # doesn't work under tox/pip
    README = ''
    CHANGES = ''

install_requires = []

version = sys.version_info[:3]
if version < (2, 7, 0):
    install_requires.append("ordereddict")
    install_requires.append("unittest2")


class Benchmark(test):
    description = "Run benchmarks"
    user_options = []
    test_suite = None

    def initialize_options(self):
        """init options"""
        pass

    def finalize_options(self):
        """finalize options"""

        self.distribution.tests_require = [
            'zope.pagetemplate',
            'zope.component',
            'zope.i18n',
            'zope.testing']

    def run(self):
        test.run(self)
        self.with_project_on_sys_path(self.run_benchmark)

    def run_benchmark(self):
        from chameleon import benchmark
        print("running benchmark...")

        benchmark.start()

setup(
    name="Chameleon",
    version=__version__,
    description="Fast HTML/XML Template Compiler.",
    long_description="\n\n".join((README, CHANGES)),
    classifiers=[
       "Development Status :: 5 - Production/Stable",
       "Intended Audience :: Developers",
       "Programming Language :: Python",
       "Programming Language :: Python :: 2",
       "Programming Language :: Python :: 3",
       "Programming Language :: Python :: 2.6",
       "Programming Language :: Python :: 2.7",
       "Programming Language :: Python :: 3.1",
       "Programming Language :: Python :: 3.2",
       "Programming Language :: Python :: 3.3",
       "Programming Language :: Python :: 3.4",
      ],
    author="Malthe Borch",
    author_email="mborch@gmail.com",
    url="http://www.pagetemplates.org/",
    license='BSD-like (http://repoze.org/license.html)',
    packages=find_packages('src'),
    package_dir = {'': 'src'},
    include_package_data=True,
    install_requires=install_requires,
    zip_safe=False,
    test_suite="chameleon.tests",
    cmdclass={
        'benchmark': Benchmark,
        }
    )