-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
60 lines (49 loc) · 1.7 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import os
import subprocess
from distutils.cmd import Command
from distutils.core import Extension, setup
os.putenv('LC_CTYPE', 'en_US.UTF-8')
pyflowtuple_version = '0.1'
cflags = ['-Wall', '-Wextra', '-Werror',
'-Wno-unused-parameter', '-Wno-incompatible-pointer-types',
'-Wno-cast-function-type', '-std=c99', '-D_FILE_OFFSET_BITS=64']
flowtuple = Extension('flowtuple',
libraries=['flowtuple'],
extra_compile_args=cflags + ['-DVERSION="%s"' % pyflowtuple_version],
language='C',
sources=[
'src/flowtuple.c',
'src/handle.c',
'src/header.c',
'src/trailer.c',
'src/interval.c',
'src/class.c',
'src/data.c',
],
depends=[
'src/handle.h',
'src/header.h',
'src/trailer.h',
'src/interval.h',
'src/class.h',
'src/data.h',
])
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
raise SystemExit(
subprocess.call(['nosetests', 'tests'])
)
setup(name='flowtuple',
description='libflowtuple bindings for Python 3',
author='Mark Weiman',
author_email='[email protected]',
url='https://merit.edu', # this needs to change
ext_modules=[flowtuple],
cmdclass={
'test': TestCommand,
})