source: branches/help/BINDINGS/PYTHON/setup.py

Last change on this file was 8848, checked in by epruesse, 12 years ago

Added Python bindings using SWIG

Build and clean targets are "bindings" and "bindings_clean"; they
are not added to all and clean yet. The "test.py" shows a bit of
the python usage of the interface. You need to have swig installed,
of course.

The bindings are not build from arb_prot.h like the perl bindings.
Rather, ARB.i defines the exported functions. This is to make the
interface smaller and have an avenue of keeping it stable in case
the library interface needs to be changed. It also cuts down on
compile time a lot.

The idea is to eventually build the perl bindings with SWIG as well.
I haven't figured out how to provide the BIO:: module with the
ARB module yet, though, which would be required for backwards
compatability with pre-existing amc scripts.

  • Property svn:executable set to *
File size: 697 bytes
Line 
1#!/usr/bin/env python
2"""
3setup.py file for ARB bindings
4"""
5
6from distutils.core import setup, Extension
7from os import environ
8
9ARB_module = Extension('_ARB',
10                       sources=['ARB.i'],
11                       swig_opts=['-c++'],
12                       include_dirs=['../../INCLUDE'],
13                       libraries=['ARBDB','CORE'],
14#                       extra_objects=['../ARB_oolayer.o'],
15                       library_dirs=['../../lib']
16                      )
17
18setup (name = 'ARB',
19       version = '0.1',
20       author      = "epruesse",
21       description = """Module to access ARB databases""",
22       ext_modules = [ARB_module],
23       py_modules = ["ARB"],
24       )
Note: See TracBrowser for help on using the repository browser.