Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1574
News FAQ
Search Home


next up previous contents
Up: NOTE 259: appspython binding to AIPS++ Previous: Python specifics

Building appspython

appspython is part of the AIPS++ source tree and can be built as part of the AIPS++ build. Work is underway to build it separately as a Python egg.
To build it in AIPS++ the following has to be added to the local makedefs: When doing it this way, appspython is built with support for numarray. In order to build it with support for numpy as well, the following has to be added to the local makedefs:
PYTHONINCD += 'the path where numpy/arrayobject.h can be found'
PYTHONDEFS += -DAIPS_USENUMPY
If only numpy should be supported, the last line should be replaced by:
PYTHONDEFS := -DAIPS_USENUMPY
When building appspython, it is by default built as the shared library libappspython.so containing the various converters and associated AIPS++ code. It can be built as a static library by adding the appropriate LIBappspython line to the local makedefs. However, it is strongly advised to build it as a shared library because:

A package pyxx is built as a shared library _pyxx.so residing in directory $AIPSPATH/python$PYTHONVERSION/pyxx. All .py files are also put in this directory and compiled to .pyo and .pyc files.

On Mac OS-X Python libraries have to be built as bundles. For this the local makedefs need to set some make variables:

PYLDSOPTS  := -bundle
PYSFXSHAR  := so
SFXSHAR    := dylib
LDSOPTS    := -dynamiclib -single_module
PYTHONLIBS := -framework Python

next up previous contents
Up: NOTE 259: appspython binding to AIPS++ Previous: Python specifics   Contents
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-11-11