view bindings/python/setup.py @ 622:695651b8c1a3

added a query hook. Should compile a run, but I haven't exhaustively tested the various input parameters yet. As such, there may well be some ways to get to the api calls that bring the module down. Let me know if you find any. The actual query call is a bit of a mess, but will be more intuitive from the native python layer (to be written)... so the python bindings now have a complete path: >>import _pyadb >>aDB = _pyadb._pyadb_create("test.adb", 0,0,0) >>_pyadb._pyadb_status(aDB) >>_pyadb._pyadb_insertFromFile(aDB, "someFeats.mfcc12") ...(add some more data) >>result = _pyadb._pyadb_queryFromKey(aDB, "a Key in aDB", [options]) and then result has a nice dict of your results.
author map01bf
date Mon, 21 Sep 2009 17:42:52 +0000
parents 70fc1a504138
children 448b28a598e3
line wrap: on
line source
#!/usr/bin/env python
# encoding: utf-8
"""
setup.py

distutil file for rubberband wrapper

If the dylib isn't loading correctly, make sure the path to it is in 
the $DYLD_LIBRARY_PATH enviromental variable.
the include_dirs must point to the locations of the following h files:
	python.h
	arrayobject.h (numpy)
	audioDB.h
	
	the directory where your system's numpy inclde files can be found is autogenerated, but I sort of made up the method. 
	I'm sure there's a better way and this has only been tested on my system.
	
Created by Benjamin Fields on 2009-09-04.
Copyright (c) 2009 Goldsmith University of London. All rights reserved.

"""

from distutils.core import setup, Extension
from  numpy import __path__ as numpyBase
from os.path import join

module1 = Extension('_pyadb',
					define_macros = [('MAJOR_VERSION', '0'),
                                     ('MINOR_VERSION', '1')],
                    include_dirs = ['/opt/local/include', '../../', join(numpyBase[0],'core/include')],
                    libraries = ['audiodb'],
                    library_dirs = ['../../', '/opt/local/lib'],
                    sources = ['pyadbmodule.c'])
					

setup (name = 'pyadb',
       version = '0.1a',
       description = 'AudioDB is a vector based similiarity and matching tool.',
	   maintainer = 'Benjamin Fields',
	   maintainer_email = 'b.fields@gold.ac.uk',
       ext_modules = [module1])