~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
cvs/emstar/fusd/python/setup.py


  1 #! /usr/bin/python
  2 
  3 from distutils.core import setup, Extension
  4 import commands, os
  5 
  6 
  7 # fusd's build process puts the library in a directory that depends upon the
  8 # host system's 'uname' output
  9 cpu_name = commands.getoutput("uname -m")
 10 os_name = commands.getoutput("uname -s | tr '[A-Z]' '[a-z]'")
 11 archdir = "../obj.%s-%s" % (cpu_name, os_name)
 12 
 13 # if we are building in fusd/python/, get the include file and library from
 14 # the local tree. If not, hope that they've been installed into /usr/include
 15 # and /usr/lib or somewhere else on the compiler's search path.
 16 
 17 library_dirs = []
 18 if os.path.isdir(archdir):
 19     library_dirs = [archdir]
 20 include_dirs = []
 21 if os.path.isdir("../include"):
 22     include_dirs = ["../include"]
 23 
 24 setup(name="fusd",
 25       version="1",
 26       description="interface to FUSD (linux user-space device drivers)",
 27 
 28       py_modules = ['fusd'],
 29       ext_modules=[ Extension("_fusd", ["fusdmodule.c"],
 30                               include_dirs=include_dirs,
 31                               libraries=["fusd"],
 32                               library_dirs=library_dirs,
 33                               )
 34                     ],
 35       )

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.