forked from ironport/aplib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
42 lines (35 loc) · 1.37 KB
/
setup.py
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
# $Header: //prod/main/ap/aplib/setup.py#4 $
# Copyright (c) 2008 IronPort Systems, Inc.
# All rights reserved.
# Unauthorized redistribution prohibited.
from distutils.core import setup
from Cython.Distutils import build_ext
from Cython.Distutils.extension import Extension
def CythonExtension(*args, **kwargs):
depends = kwargs.setdefault('depends', [])
# Doesn't truely apply to everything, but most of the modules import these.
depends.extend(['pyrex/python.pxi',
'pyrex/libc.pxd',
'pyrex/pyrex_helpers.pyx',
'include/pyrex_helpers.h',
]
)
include_dirs = kwargs.setdefault('include_dirs', [])
include_dirs.append('include')
pyrex_include_dirs = kwargs.setdefault('pyrex_include_dirs', [])
pyrex_include_dirs.append('pyrex')
return Extension(*args, **kwargs)
setup (
name='aplib',
version='1.0.0-000',
packages=['aplib', 'aplib/net'],
ext_modules=[
# Please keep this list alphabetized.
CythonExtension ('aplib.net._net', ['aplib/net/aplib.net._net.pyx']),
CythonExtension ('aplib.oserrors', ['aplib/aplib.oserrors.pyx']),
CythonExtension ('aplib.tsc_time', ['aplib/aplib.tsc_time.pyx'],
depends=['./include/rdtsc.h'],
),
],
cmdclass={'build_ext': build_ext},
)