-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.py
53 lines (42 loc) · 1.58 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
import re
import setuptools
import sys
from setuptools.command.test import test as TestCommand
import wirepy.lib.wireshark
import wirepy.platform
#TODO Not really used right now
def pip_to_requirements():
pattern = re.compile('(.*)([>=]=[.0-9]*).*')
with open('requirements.txt') as f:
for line in f:
m = pattern.match(line)
if m:
yield '%s (%s)' % m.groups()
else:
yield line.strip()
with open('README', 'r') as f:
description = f.read()
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import tox
errno = tox.cmdline(self.test_args)
sys.exit(errno)
setuptools.setup(name=wirepy.platform.__package_name__,
version=wirepy.platform.__package_name__,
description='A foreign function interface to Wireshark',
long_description=description,
author='Lukas Lueg',
author_email='lukas.lueg@gmail.com',
url='https://github.com/lukaslueg/wirepy',
zip_safe=False, # for cffi
requires=list(pip_to_requirements()),
setup_requires=['cffi>=0.6'],
tests_require=['tox', 'nose'],
packages=['wirepy', 'wirepy.lib', 'wirepy.tests'],
ext_package='wirepy',
ext_modules=[wirepy.lib.wireshark.iface.verifier.get_extension()],
cmdclass={'test': Tox})