annotate bindings/python/setup.py @ 620:70fc1a504138

Okay, I think my python bindings have reached the border of useful, so in the svn they go. The bindings currently allow for adb create and open, status and the setting of the l2norm and power flags. Note that these are the direct c bindings, when it's done there will be OO dressing on top for standard entry. Also, even though I don't use numpy yet, the include file is brought in, so the module won't build if you don't have numpy in an importable place.
author map01bf
date Tue, 15 Sep 2009 17:40:02 +0000
parents
children 448b28a598e3
rev   line source
map01bf@620 1 #!/usr/bin/env python
map01bf@620 2 # encoding: utf-8
map01bf@620 3 """
map01bf@620 4 setup.py
map01bf@620 5
map01bf@620 6 distutil file for rubberband wrapper
map01bf@620 7
map01bf@620 8 If the dylib isn't loading correctly, make sure the path to it is in
map01bf@620 9 the $DYLD_LIBRARY_PATH enviromental variable.
map01bf@620 10 the include_dirs must point to the locations of the following h files:
map01bf@620 11 python.h
map01bf@620 12 arrayobject.h (numpy)
map01bf@620 13 audioDB.h
map01bf@620 14
map01bf@620 15 the directory where your system's numpy inclde files can be found is autogenerated, but I sort of made up the method.
map01bf@620 16 I'm sure there's a better way and this has only been tested on my system.
map01bf@620 17
map01bf@620 18 Created by Benjamin Fields on 2009-09-04.
map01bf@620 19 Copyright (c) 2009 Goldsmith University of London. All rights reserved.
map01bf@620 20
map01bf@620 21 """
map01bf@620 22
map01bf@620 23 from distutils.core import setup, Extension
map01bf@620 24 from numpy import __path__ as numpyBase
map01bf@620 25 from os.path import join
map01bf@620 26
map01bf@620 27 module1 = Extension('_pyadb',
map01bf@620 28 define_macros = [('MAJOR_VERSION', '0'),
map01bf@620 29 ('MINOR_VERSION', '1')],
map01bf@620 30 include_dirs = ['/opt/local/include', '../../', join(numpyBase[0],'core/include')],
map01bf@620 31 libraries = ['audiodb'],
map01bf@620 32 library_dirs = ['../../', '/opt/local/lib'],
map01bf@620 33 sources = ['pyadbmodule.c'])
map01bf@620 34
map01bf@620 35
map01bf@620 36 setup (name = 'pyadb',
map01bf@620 37 version = '0.1a',
map01bf@620 38 description = 'AudioDB is a vector based similiarity and matching tool.',
map01bf@620 39 maintainer = 'Benjamin Fields',
map01bf@620 40 maintainer_email = 'b.fields@gold.ac.uk',
map01bf@620 41 ext_modules = [module1])
map01bf@620 42