This repository has been archived by the owner on Jan 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
57 lines (48 loc) · 1.63 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
# $Id: setup.py 47 2010-08-25 19:07:28Z aweil $
import sys, os
from distutils.core import setup, Extension
import distutils.ccompiler
import distutils.errors
PACKAGE_NAME = 'pcapy'
# You might want to change these to reflect your specific configuration
include_dirs = []
library_dirs = []
libraries = []
if sys.platform =='win32':
# WinPcap include files
include_dirs.append(r'c:\devel\oss\wpdpack\Include')
# WinPcap library files
library_dirs.append(r'c:\devel\oss\wpdpack\Lib')
libraries = ['wpcap', 'packet', 'ws2_32']
else:
libraries = ['pcap']
# end of user configurable parameters
macros = []
sources = ['pcapdumper.c',
'bpfobj.c',
'pcapy.c',
'pcapobj.c',
'pcap_pkthdr.c',
]
if sys.platform == 'win32':
sources.append(os.path.join('win32', 'dllmain.cc'))
macros.append(('WIN32', '1'))
setup(name = PACKAGE_NAME,
version = "0.10.9-dev",
url = "http://oss.coresecurity.com/projects/pcapy.html",
author = "Maximiliano Caceres",
author_email = "[email protected]",
maintainer = "Core Security Technologies",
maintainer_email = "[email protected]",
description = "Python pcap extension",
ext_modules = [Extension(
name = PACKAGE_NAME,
sources = sources,
define_macros = macros,
include_dirs = include_dirs,
library_dirs = library_dirs,
libraries = libraries)],
scripts = ['tests/pcapytests.py', 'tests/96pings.pcap'],
data_files = [(os.path.join('share', 'doc', PACKAGE_NAME),
['README', 'LICENSE', 'pcapy.html'])],
)