[go: up one dir, main page]

File: setup.py.in

package info (click to toggle)
libdumbnet 1.12-3.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 5,344 kB
  • sloc: sh: 16,158; ansic: 10,840; python: 222; makefile: 164
file content (39 lines) | stat: -rw-r--r-- 1,589 bytes parent folder | download | duplicates (12)
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
#!/usr/bin/env python

import glob, os, sys
from distutils.core import setup, Extension

dnet_srcs = [ '@srcdir@/dnet.c' ]
dnet_incdirs = [ '@top_srcdir@/include' ]
dnet_libdirs = []
dnet_libs = []
dnet_extargs = []
dnet_extobj = []

if sys.platform == 'win32':
    winpcap_dir = '../../WPdpack'
    dnet_srcs.extend(['../src/addr-util.c', '../src/addr.c', '../src/blob.c', '../src/ip-util.c', '../src/ip6.c', '../src/rand.c', '../src/err.c', '../src/strlcat.c', '../src/strlcpy.c', '../src/err.c', '../src/strlcat.c', '../src/strlcpy.c', '../src/strsep.c', '../src/arp-win32.c', '../src/eth-win32.c', '../src/fw-pktfilter.c', '../src/intf-win32.c', '../src/ip-win32.c', '../src/route-win32.c', '../src/tun-none.c'])
    dnet_incdirs.append(winpcap_dir + '/Include')
    dnet_libdirs.append(winpcap_dir + '/Lib')
    dnet_libs.extend([ 'advapi32', 'iphlpapi', 'ws2_32', 'packet' ])
else:
    # XXX - can't build on Cygwin+MinGW yet.
    #if sys.platform == 'cygwin':
    #    dnet_extargs.append('-mno-cygwin')
    dnet_extobj.extend(glob.glob('@top_builddir@/src/.libs/*.o'))

dnet = Extension('dnet',
                 dnet_srcs,
                 include_dirs=dnet_incdirs,
                 library_dirs=dnet_libdirs,
                 libraries=dnet_libs,
                 extra_compile_args=dnet_extargs,
                 extra_objects=dnet_extobj)

setup(name='dnet',
      version='@VERSION@',
      description='low-level networking library',
      author='Dug Song',
      author_email='dugsong@monkey.org',
      url='http://libdnet.sourceforge.net/',
      ext_modules = [ dnet ])