trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2012

Re: [trinity-devel] python configure.py - howto set include paths? can't find tqt.h ...

From: Darrell Anderson <humanreadable@...>
Date: Wed, 21 Mar 2012 20:08:31 -0700 (PDT)
>   I am working to build sip4-tqt and I'm running into
> problems telling python
> configure.py where to find the include files. I patched
> sipgen/sip.h to #include
> <tqt/tqt.h> which allow it to find tqt.h, but then it
> failed to find the next
> include:
> 
> /usr/include/tqt/tqt.h:54:23: fatal error: ntqglobal.h: No
> such file or directory
> 
>   which is in
> 
> /opt/tqt3/include/ntqglobal.h
>


Here is the respective snippet I use from my sip4-tqt build script:

=============================================================
PYTHONVER=$(python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d.)
PYTHONLIB=$( python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()' )

# -h, --help            show this help message and exit
# -k, --static          build the SIP module as a static library
# -p PLATFORM, --platform=PLATFORM
#                       the platform/compiler configuration [default:
#                       linux-g++]
# -u, --debug           build with debugging symbols
#
# Query:
#   --show-platforms    show the list of supported platform/compiler
#                       configurations
#   --show-build-macros
#                       show the list of supported build macros
#
# Installation:
#   -b DIR, --bindir=DIR
#                       where the SIP code generator will be installed
#                       [default: /usr/bin]
#   -d DIR, --destdir=DIR
#                       where the SIP module will be installed [default:
#                       /usr/lib/python2.6/site-packages]
#   -e DIR, --incdir=DIR
#                       where the SIP header file will be installed [default:
#                       /usr/include/python2.6]
#   -v DIR, --sipdir=DIR
#                       where .sip files are normally installed [default:
#                       /usr/share/sip]

# python configure.py -h
# exit 1

echo "Configuring..."

python configure.py \
  -b "/usr/bin" \
  -d "$PYTHONLIB" \
  -e "/usr/include/python$PYTHONVER" \
  CFLAGS="$CPUOPT -I/usr/include/tqt -I${PREFIX}/include -I/usr/include" \
  CXXFLAGS="$CPUOPT -I/usr/include/tqt -I${PREFIX}/include -I/usr/include" \
=============================================================


Notice I keep the help parameters in the script for easier future reference. I have done likewise for the other python related build scripts.

In Slackware, sip is installed as a stock package. Therefore I have to name my final Trinity sip4-tqt package to sip in order to get the package tools to update the existing sip package rather than just install the package (because then I'd have two conflicting sip packages installed).

I am installing sip4-tqt, python-tqt, python-trinity, pytdeextensions, and libtqt-perl to /usr rather than /opt/trinity because most of the files get installed in python/perl subdirectories anyway. Further, the stock Slackware sip package is installed in /usr and any other stock package depending on that location needs to find the Trinity version in the same location.

Darrell