Building Phoenix with a non-standard Python location.

Hi,

I was wondering if anyone could help me. I am trying to build Phoenix
trunk for testing before the stable release. But I am using a
non-standard Python location, and I cannot get it to build with either
setup.py or build.py (both have the same problems). I've tested this,
and this problem occurs for Python 3.1, 3.2, 3.3, and 3.4. It looks
like WAF is the source of the problem. Below I have all the steps
required to reproduce the problem on a Linux system. Any hints would
be appreciated!

Cheers,

Edward

P. S. Here are the steps to reproduce. First get the latest Python
3.3 from source and put it somewhere strange:

$ wget http://www.python.org/ftp/python/3.3.5/Python-3.3.5.tar.xz
$ tar xvf Python-3.3.5.tar.xz
$ cd Python-3.3.5
$ ./configure --prefix=$HOME/tmp/phoenix_killing_python_with_junk_waf
$ make
$ make install

Then with the latest phoenix trunk:

$ ~/tmp/phoenix_killing_python_with_junk_waf/bin/python3.3 setup.py build
Extracting in /tmp/tmpjq3cyu
Now working in /tmp/tmpjq3cyu/setuptools-2.1
Building a Setuptools egg in /data/software/phoenix/trunk
warning: build_py: byte-compiling is disabled, skipping.

warning: install_lib: byte-compiling is disabled, skipping.

/data/software/phoenix/trunk/setuptools-2.1-py3.3.egg
running build
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly

[snip]

Running command: build_py
Checking for /data/software/phoenix/trunk/bin/waf-1.7.10...
"/home/edward/tmp/phoenix_killing_python_with_junk_waf/bin/python3.3"
/data/software/phoenix/trunk/bin/waf-1.7.10
--wx_config=/data/software/phoenix/trunk/build/wxbld/wx-config
--python="/home/edward/tmp/phoenix_killing_python_with_junk_waf/bin/python3.3"
--out=build/waf/3.3 configure build
Setting top to : /data/software/phoenix/trunk
Setting out to :
/data/software/phoenix/trunk/build/waf/3.3
Checking for 'gcc' (c compiler) : /usr/share/colorgcc/gcc
Checking for 'g++' (c++ compiler) : /usr/share/colorgcc/g++
Checking for program python :
/home/edward/tmp/phoenix_killing_python_with_junk_waf/bin/python3.3
Checking for python version : (3, 3, 5, 'final', 0)
Checking for library python3.3 in LIBDIR : not found
Checking for library python3.3 in python_LIBPL : not found
Checking for library python3.3 in $prefix/libs : not found
Checking for library python3.3m in LIBDIR : yes
Checking for program
/home/edward/tmp/phoenix_killing_python_with_junk_waf/bin/python3.3-config,python3.3-config,python-config-3.3,python3.3m-config
: /home/edward/tmp/phoenix_killing_python_with_junk_waf/bin/python3.3-config
Checking for header Python.h : :frowning:
Asking python-config for pyembed --cflags flags : yes
Asking python-config for pyembed --libs flags : yes
Asking python-config for pyembed --ldflags flags : yes
Getting pyembed flags from python-config : yes
Asking python-config for pyext --cflags flags : yes
Asking python-config for pyext --libs flags : yes
Asking python-config for pyext --ldflags flags : yes
Getting pyext flags from python-config : Could not build
python extensions
The configuration failed
(complete log in /data/software/phoenix/trunk/build/waf/3.3/config.log)
Command '"/home/edward/tmp/phoenix_killing_python_with_junk_waf/bin/python3.3"
/data/software/phoenix/trunk/bin/waf-1.7.10
--wx_config=/data/software/phoenix/trunk/build/wxbld/wx-config
--python="/home/edward/tmp/phoenix_killing_python_with_junk_waf/bin/python3.3"
--out=build/waf/3.3 configure build ' failed with exit code 1.
Finished command: build_py (0m1.392s)
Finished command: build (0m2.141s)
Command '/home/edward/tmp/phoenix_killing_python_with_junk_waf/bin/python3.3
-u build.py build' failed with exit code 1.

According to /data/software/phoenix/trunk/build/waf/3.3/config.log, I
see the following options used at all points:
-DPYTHONDIR="/usr/local/lib/python3.3/site-packages"
-DPYTHONARCHDIR="/usr/local/lib/python3.3/site-packages"