2009-06-05 22:59:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
from distutils.core import setup, Extension
|
|
|
|
|
2009-06-10 14:11:28 +00:00
|
|
|
import os
|
|
|
|
modname='libburn-1'
|
|
|
|
|
|
|
|
libs = ['burn']
|
|
|
|
includes = ['/usr/include/libburn']
|
|
|
|
|
|
|
|
if os.system('pkg-config --exists '+modname+' 2> /dev/null') == 0:
|
|
|
|
pkgcfg = os.popen('pkg-config --cflags-only-I '+modname)
|
|
|
|
includes = pkgcfg.readline().strip()
|
|
|
|
includes = includes[2:].split(' -I')
|
|
|
|
pkgcfg.close()
|
|
|
|
|
|
|
|
pkgcfg = os.popen('pkg-config --libs-only-l '+modname)
|
|
|
|
libs = pkgcfg.readline().strip()
|
|
|
|
libs = libs[2:].split(' -l')
|
|
|
|
pkgcfg.close()
|
|
|
|
|
2009-06-05 22:59:51 +00:00
|
|
|
setup(name = "python-libburn",
|
|
|
|
version = "0.0.1",
|
|
|
|
description = "Python bindings to libburn",
|
|
|
|
ext_modules = [Extension("pyburn",
|
|
|
|
["pyburn.cpp"],
|
2009-06-10 14:11:28 +00:00
|
|
|
libraries=libs,
|
|
|
|
include_dirs=includes,
|
2009-06-05 22:59:51 +00:00
|
|
|
)]
|
|
|
|
)
|
|
|
|
|