summaryrefslogtreecommitdiffstats
path: root/python/setup.py.in
blob: 346c770f0c63a51263092200b57666b850e0c5fe (plain)
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
#!/usr/bin/env python

from distutils.core import setup, Extension

opts = ['-O', '-nodefaultctor']
include = ['@top_builddir@/include', '@top_srcdir@/include']
library_dirs = ['@top_builddir@/lib/.libs']

netlink_capi = Extension('netlink/_capi',
                         sources = ['@srcdir@/netlink/capi.i'],
			 include_dirs = include,
			 swig_opts = opts,
			 library_dirs = library_dirs,
			 libraries = ['nl-3'],
			)

route_capi = Extension('netlink/route/_capi',
                         sources = ['@srcdir@/netlink/route/capi.i'],
			 include_dirs = include,
			 swig_opts = opts,
			 library_dirs = library_dirs,
			 libraries = ['nl-3', 'nl-route-3'],
			)

genl_capi = Extension('netlink/genl/_capi',
			 sources = ['@srcdir@/netlink/genl/capi.i'],
			 include_dirs = include,
			 swig_opts = opts,
			 library_dirs = library_dirs,
			 libraries = ['nl-3', 'nl-genl-3'],
			)

setup(name = 'netlink',
      version = '1.0',
      description = 'Python wrapper for netlink protocols',
      author = 'Thomas Graf',
      author_email = 'tgraf@suug.ch',
      ext_modules = [netlink_capi, route_capi, genl_capi],
      package_dir = {'': '@srcdir@'},
      packages = ['netlink', 'netlink.genl', 'netlink.route',
		  'netlink.route.links', 'netlink.route.qdisc'],
     )