Home | History | Annotate | Download | only in src
      1 # Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 from distutils.core import setup, Extension
      6 
      7 # C extension modules.
      8 DEPS=['Makefile', 'setup.py', 'pyiftun.version']
      9 PYIFTUN_SRC = [
     10     'pyiftun.c',
     11     'wrapper_linux_if.c',
     12     'wrapper_linux_if_tun.c',
     13     'wrapper_sys_ioctl.c',
     14 ]
     15 PYIFTUN_DEPS = DEPS + PYIFTUN_SRC
     16 
     17 CFLAGS=['-O2', '-Wall', '-Werror']
     18 
     19 ext_mods = []
     20 ext_mods.append(Extension('pyiftun',
     21     sources = PYIFTUN_SRC,
     22     extra_compile_args=CFLAGS,
     23     extra_link_args = ['-Wl,--version-script=pyiftun.version'],
     24     depends = DEPS + PYIFTUN_SRC,
     25 ))
     26 
     27 # Python modules.
     28 py_mods = [
     29     'lansim.host',
     30     'lansim.simulator',
     31     'lansim.tools',
     32     'lansim.tuntap',
     33 ]
     34 
     35 setup(name = 'lansim',
     36     version = '1',
     37     description = 'A LAN simulator in Python',
     38     maintainer = 'Alex Deymo',
     39     maintainer_email = 'deymo (at] chromium.org',
     40     # Pure python modules from lansim_py:
     41     package_dir = { 'lansim': 'py' },
     42     py_modules = py_mods,
     43     # Compiled modules on the package:
     44     ext_package = 'lansim',
     45     ext_modules = ext_mods,
     46 )
     47