From: Haw-Zan Goh (hgoh_at_andrew.cmu.edu)
Date: Mon Feb 27 2012 - 12:15:06 CST

Dear all,

   I would like to control vmd by using python (modules 'vmdnumpy' etc).
>From previous thread, I know I need to change the default Python
include and linkage paths in the 'configure' script. I want to install
vmd1.9.1 and I have python2.5.6 in /usr/local/lib/python2.5. The
problem is that I do not know which line should I change in the
configure script to make it work. The configure script is the
following:

 ###################
# OPTIONAL COMPONENT: Python support
###################
# location of Python library and include file.
# If left blank, standard system directories will be searched.
#$stock_python_include_dir=$ENV{"PYTHON_INCLUDE_DIR"} ||
"/usr/local/include";
#$stock_python_library_dir=$ENV{"PYTHON_LIBRARY_DIR"} || "/usr/local/lib";
$stock_python_include_dir=$ENV{"PYTHON_INCLUDE_DIR"} ||
"$vmd_library_dir/python/lib_$config_arch/include/python2.5";
$stock_python_library_dir=$ENV{"PYTHON_LIBRARY_DIR"} ||
"$vmd_library_dir/python/lib_$config_arch/lib/python2.5/config";

#$stock_numpy_include_dir=$ENV{"NUMPY_INCLUDE_DIR"} || "/usr/local/include";
#$stock_numpy_library_dir=$ENV{"NUMPY_LIBRARY_DIR"} || "/usr/local/lib";
$stock_numpy_include_dir=$ENV{"NUMPY_INCLUDE_DIR"} ||
"$vmd_library_dir/numpy/lib_$config_arch/include";
$stock_numpy_library_dir=$ENV{"NUMPY_LIBRARY_DIR"} ||
"$vmd_library_dir/python/lib_$config_arch/lib/python2.5/site-packages/numpy/core/include";

$python_defines = "-DVMDPYTHON";
$python_include = "-I$stock_python_include_dir
-I$stock_numpy_include_dir -I$stock_numpy_library_dir";
$python_library = "-L$stock_python_library_dir";
$python_libs = "-lpython2.5 -lpthread";
@python_h = ('PythonTextInterp.h',
                       'VMDTkinterMenu.h',
                       'py_commands.h',
                       'py_molecule.h');
@python_ccpp = ('PythonTextInterp.C',
                       'VMDTkinterMenu.C',
                       'py_animate.C',
                       'py_atomsel.C',
                       'py_atomselection.C',
                       'py_axes.C',
                       'py_color.C',
                       'py_commands.C',
                       'py_display.C',
                       'py_graphics.C',
                       'py_imd.C',
                       'py_label.C',
                       'py_material.C',
                       'py_menu.C',
                       'py_molecule.C',
                       'py_molrep.C',
                       'py_mouse.C',
                       'py_render.C',
                       'py_trans.C',
                       'py_vmd.C');

###################
# OPTIONAL COMPONENT: Numeric Python extension
# #################

# Numeric requires Python
if ( $config_numeric && !$config_python) {
  die "NUMPY option requires PYTHON!";
}
$numeric_defines = "-DVMDNUMPY";
$numeric_include = "";
$numeric_library = "";
$numeric_libs = "";
@numeric_h = "";
@numeric_ccpp = ('py_numeric.C');

So could anyone tell me which line in the configure script should I change
in order to make it work? Thanks you very much

Best,
Goh Haw Zan