~0x44/nova/bug838466

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
from distutils.core import setup
from distutils.extension import Extension
try:
    from Pyrex.Distutils import build_ext
    # pyrex is available
    setup(
        name = 'cfsupport',
        version = '0.4',
        description = "Enough CoreFoundation wrappers to deal with CFRunLoop",
        long_description = "Pythonic wrappers for pieces of Apple's CoreFoundation API's that are not otherwise wrapped by MacPython.\nPrimarily useful for dealing with CFRunLoop.",
        maintainer = 'Bob Ippolito',
        maintainer_email = 'bob@redivi.com',
        license = 'Python',
        platforms = ['Mac OSX'],
        keywords = ['CoreFoundation', 'CFRunLoop', 'Cocoa', 'GUI'],
        ext_modules=[
            Extension(
                'cfsupport',
                ['cfsupport.pyx'],
                extra_link_args=[
                    '-framework','CoreFoundation',
                    '-framework','CoreServices',
                ],
            ),
        ],
        cmdclass = {'build_ext': build_ext}
    )
except ImportError:
    # pyrex is not available, use existing .c
    setup(
        name = 'cfsupport',
        version = '0.4',
        description = "Enough CoreFoundation wrappers to deal with CFRunLoop",
        long_description = "Pythonic wrappers for pieces of Apple's CoreFoundation API's that are not otherwise wrapped by MacPython.\nPrimarily useful for dealing with CFRunLoop.",
        maintainer = 'Bob Ippolito',
        maintainer_email = 'bob@redivi.com',
        license = 'Python',
        platforms = ['Mac OSX'],
        keywords = ['CoreFoundation', 'CFRunLoop', 'Cocoa', 'GUI'],
        ext_modules=[
            Extension(
                'cfsupport',
                ['cfsupport.c'],
                extra_link_args=[
                    '-framework','CoreFoundation',
                    '-framework','CoreServices',
                ],
            ),
        ],
    )