applib/python/setup.py
changeset 0 2b3e5ec03512
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/applib/python/setup.py	Thu Apr 21 14:57:45 2011 +0100
@@ -0,0 +1,23 @@
+from distutils.core import setup, Extension
+from os import getenv
+
+INCDIR  = getenv('INCDIR')
+LIBDIR  = getenv('LIBDIR')
+VERSION = getenv('VERSION')
+
+if INCDIR  == None: raise ValueError('must set INCDIR')
+if LIBDIR  == None: raise ValueError('must set LIBDIR')
+if VERSION == None: raise ValueError('must set VERSION')
+
+setup(name="dtnapi", 
+      version=VERSION,
+      description="DTN API Python Bindings",
+      author="Michael Demmer",
+      author_email="demmer@cs.berkeley.edu",
+      url="http://www.dtnrg.org",
+      py_modules=["dtnapi"],
+      ext_modules=[Extension("_dtnapi", ["dtn_api_wrap_python.cc"],
+                             include_dirs=[INCDIR],
+			     library_dirs=[LIBDIR],
+                             libraries=["".join(['dtnapi-', VERSION])])]
+      )