root/branch/BTSniff/setup.py @ 5396

Revision 5396, 1.6 kB (checked in by qsy, 4 years ago)

PM updated with new namespace

Line 
1"""
2Taken from PythonInfo Wiki Distutils Tutorial, with thanks to DonnIngle
3
4"""
5
6from distutils.core import setup, Extension
7import sys, os
8
9PARENT_PKG = 'umit.bluetooth'
10BTLIBRARIES = ['bluetooth']
11SNIFFMODDIR = 'csniff'
12INCLUDE_DIRS = [SNIFFMODDIR]
13
14mods = []
15if sys.platform == 'linux2':
16        # print 'linux'
17        mod = Extension(PARENT_PKG + '.btsniff',
18                        libraries = BTLIBRARIES,
19                        include_dirs = INCLUDE_DIRS,
20                sources = [SNIFFMODDIR + os.sep + 'basesniffmodule.c', 
21                                   SNIFFMODDIR + os.sep + 'bthandler.c',
22                                   SNIFFMODDIR + os.sep + 'layers.c'])
23       
24        mod2 = Extension(PARENT_PKG + '.btsniff_fileio',
25                        libraries = BTLIBRARIES,
26                        include_dirs = INCLUDE_DIRS,
27                sources = [ SNIFFMODDIR  + os.sep + 'sniffio.c'])
28
29        mod3 = Extension(PARENT_PKG + '._crack',
30                        libraries = BTLIBRARIES,
31                        include_dirs = INCLUDE_DIRS,
32                sources = [ SNIFFMODDIR + os.sep + 'sniffcrack.c'])
33       
34        mod4 = Extension(PARENT_PKG + '.btlayers',
35                                         libraries = BTLIBRARIES,
36                                         include_dirs = INCLUDE_DIRS,
37                                         sources = [SNIFFMODDIR + os.sep + 'layers.c'])
38        testmod = Extension(PARENT_PKG + '.harness', 
39                                            libraries = BTLIBRARIES,
40                                            include_dirs = INCLUDE_DIRS,
41                                            sources = [SNIFFMODDIR + os.sep + 'harness.c',
42                                                                   SNIFFMODDIR + os.sep + 'layers.c'])
43       
44        mods = [
45                    mod4, 
46                    mod3,
47                    mod2,
48                    mod,
49                    testmod
50                    ]
51
52setup( name = 'UmitBluetoothSniffer',
53        version = '0.1',
54        description = 'Umit Bluetooth Sniffer: part of the Umit Bluetooth Attack Framework',
55        author = 'Quek Shu Yang',
56        author_email = 'quekshuy@gmail.com',
57        url = 'http://trac.umitproject.org/wiki/BluetoothSniffing',
58        ext_modules = mods,
59        packages = ['umit', 'umit.bluetooth'] 
60        )
Note: See TracBrowser for help on using the browser.