summaryrefslogtreecommitdiffstats
path: root/python/setup.py.in
blob: 83ffdb0098f95879f6e5da8ea97bfd78edb57430 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/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",
    url="http://www.infradead.org/~tgr/libnl/",
    license="LGPL 2",
    platforms="linux2",
    long_description="Experimental python bindings for libnl",
    ext_modules=[netlink_capi, route_capi, genl_capi],
    package_dir={"": "@srcdir@"},
    packages=[
        "netlink",
        "netlink.genl",
        "netlink.route",
        "netlink.route.links",
        "netlink.route.qdisc",
    ],
)