summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/tools/third_party/enum/setup.py
blob: f54071e7f0c4c3eb9d3b68e11caa1ea72120c1a6 (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
import os
import sys
import setuptools
from distutils.core import setup


if sys.version_info[:2] < (2, 7):
    required = ['ordereddict']
else:
    required = []

# Don't shadow builtin enum package if we are being installed on a
# recent Python.  This causes conflicts since at least 3.6:
# https://bitbucket.org/stoneleaf/enum34/issues/19/enum34-isnt-compatible-with-python-36
if sys.version_info[:2] < (3, 4):
    packages = ['enum']
else:
    packages = []

long_desc = '''\
enum --- support for enumerations
========================================

An enumeration is a set of symbolic names (members) bound to unique, constant
values.  Within an enumeration, the members can be compared by identity, and
the enumeration itself can be iterated over.

    from enum import Enum

    class Fruit(Enum):
        apple = 1
        banana = 2
        orange = 3

    list(Fruit)
    # [<Fruit.apple: 1>, <Fruit.banana: 2>, <Fruit.orange: 3>]

    len(Fruit)
    # 3

    Fruit.banana
    # <Fruit.banana: 2>

    Fruit['banana']
    # <Fruit.banana: 2>

    Fruit(2)
    # <Fruit.banana: 2>

    Fruit.banana is Fruit['banana'] is Fruit(2)
    # True

    Fruit.banana.name
    # 'banana'

    Fruit.banana.value
    # 2

Repository and Issue Tracker at https://bitbucket.org/stoneleaf/enum34.
'''

py2_only = ()
py3_only = ()
make = [
        # 'rst2pdf enum/doc/enum.rst --output=enum/doc/enum.pdf',
        ]


data = dict(
        name='enum34',
        version='1.1.10',
        url='https://bitbucket.org/stoneleaf/enum34',
        packages=packages,
        package_data={
            'enum' : [
                'LICENSE',
                'README',
                'doc/enum.rst',
                'doc/enum.pdf',
                'test.py',
                ]
            },
        license='BSD License',
        description='Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4',
        long_description=long_desc,
        provides=['enum'],
        install_requires=required,
        author='Ethan Furman',
        author_email='ethan@stoneleaf.us',
        classifiers=[
            'Development Status :: 5 - Production/Stable',
            'Intended Audience :: Developers',
            'License :: OSI Approved :: BSD License',
            'Programming Language :: Python',
            'Topic :: Software Development',
            'Programming Language :: Python :: 2.4',
            'Programming Language :: Python :: 2.5',
            'Programming Language :: Python :: 2.6',
            'Programming Language :: Python :: 2.7',
            'Programming Language :: Python :: 3.3',
            ],
        )

if __name__ == '__main__':
    setup(**data)