1import os
2import sys
3import setuptools
4from distutils.core import setup
5
6
7if sys.version_info[:2] < (2, 7):
8    required = ['ordereddict']
9else:
10    required = []
11
12long_desc = '''\
13enum --- support for enumerations
14========================================
15
16An enumeration is a set of symbolic names (members) bound to unique, constant
17values.  Within an enumeration, the members can be compared by identity, and
18the enumeration itself can be iterated over.
19
20    from enum import Enum
21
22    class Fruit(Enum):
23        apple = 1
24        banana = 2
25        orange = 3
26
27    list(Fruit)
28    # [<Fruit.apple: 1>, <Fruit.banana: 2>, <Fruit.orange: 3>]
29
30    len(Fruit)
31    # 3
32
33    Fruit.banana
34    # <Fruit.banana: 2>
35
36    Fruit['banana']
37    # <Fruit.banana: 2>
38
39    Fruit(2)
40    # <Fruit.banana: 2>
41
42    Fruit.banana is Fruit['banana'] is Fruit(2)
43    # True
44
45    Fruit.banana.name
46    # 'banana'
47
48    Fruit.banana.value
49    # 2
50
51Repository and Issue Tracker at https://bitbucket.org/stoneleaf/enum34.
52'''
53
54py2_only = ()
55py3_only = ()
56make = [
57        'rst2pdf enum/doc/enum.rst --output=enum/doc/enum.pdf',
58        ]
59
60
61data = dict(
62        name='enum34',
63        version='1.1.6',
64        url='https://bitbucket.org/stoneleaf/enum34',
65        packages=['enum'],
66        package_data={
67            'enum' : [
68                'LICENSE',
69                'README',
70                'doc/enum.rst',
71                'doc/enum.pdf',
72                'test.py',
73                ]
74            },
75        license='BSD License',
76        description='Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4',
77        long_description=long_desc,
78        provides=['enum'],
79        install_requires=required,
80        author='Ethan Furman',
81        author_email='ethan@stoneleaf.us',
82        classifiers=[
83            'Development Status :: 5 - Production/Stable',
84            'Intended Audience :: Developers',
85            'License :: OSI Approved :: BSD License',
86            'Programming Language :: Python',
87            'Topic :: Software Development',
88            'Programming Language :: Python :: 2.4',
89            'Programming Language :: Python :: 2.5',
90            'Programming Language :: Python :: 2.6',
91            'Programming Language :: Python :: 2.7',
92            'Programming Language :: Python :: 3.3',
93            'Programming Language :: Python :: 3.4',
94            'Programming Language :: Python :: 3.5',
95            ],
96        )
97
98if __name__ == '__main__':
99    setup(**data)
100