lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | #!/usr/bin/env python |
| 2 | |
| 3 | from distutils.core import setup, Extension |
| 4 | |
| 5 | opts = ['-O', '-nodefaultctor'] |
| 6 | include = ['@top_builddir@/include', '@top_srcdir@/include'] |
| 7 | library_dirs = ['@top_builddir@/lib/.libs'] |
| 8 | |
| 9 | netlink_capi = Extension('netlink/_capi', |
| 10 | sources = ['@srcdir@/netlink/capi.i'], |
| 11 | include_dirs = include, |
| 12 | swig_opts = opts, |
| 13 | library_dirs = library_dirs, |
| 14 | libraries = ['nl-3'], |
| 15 | ) |
| 16 | |
| 17 | route_capi = Extension('netlink/route/_capi', |
| 18 | sources = ['@srcdir@/netlink/route/capi.i'], |
| 19 | include_dirs = include, |
| 20 | swig_opts = opts, |
| 21 | library_dirs = library_dirs, |
| 22 | libraries = ['nl-3', 'nl-route-3'], |
| 23 | ) |
| 24 | |
| 25 | genl_capi = Extension('netlink/genl/_capi', |
| 26 | sources = ['@srcdir@/netlink/genl/capi.i'], |
| 27 | include_dirs = include, |
| 28 | swig_opts = opts, |
| 29 | library_dirs = library_dirs, |
| 30 | libraries = ['nl-3', 'nl-genl-3'], |
| 31 | ) |
| 32 | |
| 33 | setup(name = 'netlink', |
| 34 | version = '1.0', |
| 35 | description = 'Python wrapper for netlink protocols', |
| 36 | author = 'Thomas Graf', |
| 37 | author_email = 'tgraf@suug.ch', |
| 38 | ext_modules = [netlink_capi, route_capi, genl_capi], |
| 39 | package_dir = {'': '@srcdir@'}, |
| 40 | packages = ['netlink', 'netlink.genl', 'netlink.route', |
| 41 | 'netlink.route.links', 'netlink.route.qdisc'], |
| 42 | ) |