setup.py problem on LFS dists

Hello,

I'm trying to install wxPython on an LFS (LinuxFromScratch) box,
everything works up until 'python2.3 setup.py install'!

Here's a 'trace' of the commands that I ran, compiled the thing
three times already, trying to follow the intrustions in the
BUILD.txt and INSTALL.txt as closely as possible. Here is what
I've done, and the commands I've ran:

Note: everything works up until setup.py install

Ran configure:

···

--------------
$ ../configure --prefix=/usr/local/wx --with-gtk --disable-monolithic --enable-optimize --enable-geometry --enable-sound --with-sdl --enable-display --enable-rpath=/usr/local/wx/lib

Ran make:
---------
$ make
$ make -C contrib/src/gizmos && make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0" && make -C contrib/src/stc && make -C contrib/src/xrc && echo "......done.....now make install"

Make install:
-------------
$ make install
$ make -C contrib/src/gizmos install && make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0" install && make -C contrib/src/stc install && make -C contrib/src/xrc install && echo "......done.....now make install"

Here I added /usr/local/wx/lib to /etc/ld.so.conf
-------------------------------------------------
$ vim /etc/ld.so.conf
$ ldconfig

Ran ./setup.py first pass (ran without errors)
-------------------------
$ cd wxPython
$ ./setup.py build_ext --inplace --debug WX_CONFIG=/usr/local/wx/bin/wxgtk-2.5-config BUILD_GLCANVAS=0

Ran the 'demo' (and it worked!! could run all the demos)
--------------------------------------------------------
$ export PYTHONPATH=/usr/src/wxPythonSrc-2.5.1.5/wxPython
$ cd demo/
$ python2.3 demo.py

Then here running 'setup.py install DOES *NOT* WORK
---------------------------------------------------
$ python2.3 setup.py install BUILD_GLCANVAS=0

And here is the OUTPUT of this last command above:
--------------------------------------------------
$ python2.3 setup.py install BUILD_GLCANVAS=0
WX_CONFIG not specified and wxgtk-2.5-config not found on $PATH defaulting to "wx-config"
Preparing CORE...
Preparing OGL...
Preparing STC...
Preparing XRC...
Preparing GIZMOS...
running install
running build
running build_py
copying wx/__version__.py -> build/lib.linux-i686-2.3/wx
running build_ext
running build_scripts
running install_lib
copying build/lib.linux-i686-2.3/wx/__version__.py -> /usr/lib/python2.3/site-packages/wx
byte-compiling /usr/lib/python2.3/site-packages/wx/__version__.py to __version__.pyc
running install_headers
Traceback (most recent call last):
  File "setup.py", line 717, in ?
    cmdclass = { 'install_data': wx_smart_install_data,
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/core.py", line 149, in setup
    dist.run_commands()
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/dist.py", line 907, in run_commands
    self.run_command(cmd)
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/dist.py", line 927, in run_command
    cmd_obj.run()
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/command/install.py", line 505, in run
    self.run_command(cmd_name)
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/dist.py", line 927, in run_command
    cmd_obj.run()
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/config.py", line 411, in run
    if WXPREFIX.startswith(root):
TypeError: expected a character buffer object
$

Also ran the above command with:

WX_CONFIG=/usr/local/wx/bin/wxgtk-2.5-config

added, but still basicly the same output..

Any idea of how I can make this baby go?
Thanks,
  j.

Hello,

I'm trying to install wxPython on an LFS (LinuxFromScratch) box,
everything works up until 'python2.3 setup.py install'!

Here's a 'trace' of the commands that I ran, compiled the thing
three times already, trying to follow the intrustions in the
BUILD.txt and INSTALL.txt as closely as possible. Here is what
I've done, and the commands I've ran:

Note: everything works up until setup.py install

[...]

$ python2.3 setup.py install BUILD_GLCANVAS=0

And here is the OUTPUT of this last command above:
--------------------------------------------------
$ python2.3 setup.py install BUILD_GLCANVAS=0
WX_CONFIG not specified and wxgtk-2.5-config not found on $PATH defaulting to "wx-config"
Preparing CORE...
Preparing OGL...
Preparing STC...
Preparing XRC...
Preparing GIZMOS...
running install
running build
running build_py
copying wx/__version__.py -> build/lib.linux-i686-2.3/wx
running build_ext
running build_scripts
running install_lib
copying build/lib.linux-i686-2.3/wx/__version__.py -> /usr/lib/python2.3/site-packages/wx
byte-compiling /usr/lib/python2.3/site-packages/wx/__version__.py to __version__.pyc
running install_headers
Traceback (most recent call last):
  File "setup.py", line 717, in ?
    cmdclass = { 'install_data': wx_smart_install_data,
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/core.py", line 149, in setup
    dist.run_commands()
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/dist.py", line 907, in run_commands
    self.run_command(cmd)
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/dist.py", line 927, in run_command
    cmd_obj.run()
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/command/install.py", line 505, in run
    self.run_command(cmd_name)
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/dist.py", line 927, in run_command
    cmd_obj.run()
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/config.py", line 411, in run
    if WXPREFIX.startswith(root):
TypeError: expected a character buffer object
$

Add the line ' global WXBASENAME, WXRELEASE, WXPREFIX'
to config.py at line 650
See this excerpt of my new config.py:

     lflags = os.popen(WX_CONFIG + ' --libs', 'r').read()[:-1]
     lflags = lflags.split()

     global WXBASENAME, WXRELEASE, WXPREFIX
     WXBASENAME = os.popen(WX_CONFIG + ' --basename').read()[:-1]
     WXRELEASE = os.popen(WX_CONFIG + ' --release').read()[:-1]
     WXPREFIX = os.popen(WX_CONFIG + ' --prefix').read()[:-1]

Pim Buurman
X>support

···

On 7 Apr 2004, at 01:16, Jon wrote:

Hi, after adding that line to /usr/src/wxPythonSrc-.../wxPython/config.py
and making it look like the above.. I still get roughly the same error..
I notices there are other config.py's in other directories, do I need to
add that to all the config.py's?

Heres the error, with the extra 'global WXBASENAME, WXRELEASE, WXPREFIX'
above WXBASENAME = os.popen(WX_CONFIG + ' --basename').read()[:-1]

···

On Wed, Apr 07, 2004 at 10:28:37AM +0200, Pim Buurman wrote:

On 7 Apr 2004, at 01:16, Jon wrote:

>Hello,
>
>I'm trying to install wxPython on an LFS (LinuxFromScratch) box,
>everything works up until 'python2.3 setup.py install'!
>
>Here's a 'trace' of the commands that I ran, compiled the thing
>three times already, trying to follow the intrustions in the
>BUILD.txt and INSTALL.txt as closely as possible. Here is what
>I've done, and the commands I've ran:
>
>Note: everything works up until setup.py install
>
[...]
>$ python2.3 setup.py install BUILD_GLCANVAS=0
>
>And here is the OUTPUT of this last command above:
>--------------------------------------------------
>$ python2.3 setup.py install BUILD_GLCANVAS=0
>WX_CONFIG not specified and wxgtk-2.5-config not found on $PATH
>defaulting to "wx-config"
>Preparing CORE...
>Preparing OGL...
>Preparing STC...
>Preparing XRC...
>Preparing GIZMOS...
>running install
>running build
>running build_py
>copying wx/__version__.py -> build/lib.linux-i686-2.3/wx
>running build_ext
>running build_scripts
>running install_lib
>copying build/lib.linux-i686-2.3/wx/__version__.py ->
>/usr/lib/python2.3/site-packages/wx
>byte-compiling /usr/lib/python2.3/site-packages/wx/__version__.py to
>__version__.pyc
>running install_headers
>Traceback (most recent call last):
> File "setup.py", line 717, in ?
> cmdclass = { 'install_data': wx_smart_install_data,
> File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/core.py",
>line 149, in setup
> dist.run_commands()
> File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/dist.py",
>line 907, in run_commands
> self.run_command(cmd)
> File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/dist.py",
>line 927, in run_command
> cmd_obj.run()
> File
>"/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/command/install.py",
>line 505, in run
> self.run_command(cmd_name)
> File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/cmd.py", line
>333, in run_command
> self.distribution.run_command(command)
> File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/dist.py",
>line 927, in run_command
> cmd_obj.run()
> File "/home/src/wxPythonSrc-2.5.1.5/wxPython/config.py", line 411,
>in run
> if WXPREFIX.startswith(root):
>TypeError: expected a character buffer object
>$
>

Add the line ' global WXBASENAME, WXRELEASE, WXPREFIX'
to config.py at line 650
See this excerpt of my new config.py:

    lflags = os.popen(WX_CONFIG + ' --libs', 'r').read()[:-1]
    lflags = lflags.split()

    global WXBASENAME, WXRELEASE, WXPREFIX
    WXBASENAME = os.popen(WX_CONFIG + ' --basename').read()[:-1]
    WXRELEASE = os.popen(WX_CONFIG + ' --release').read()[:-1]
    WXPREFIX = os.popen(WX_CONFIG + ' --prefix').read()[:-1]

Pim Buurman
X>support

--------
byte-compiling /usr/lib/python2.3/site-packages/wx/build/config.py to config.pyc
byte-compiling /usr/lib/python2.3/site-packages/wx/__version__.py to __version__
.pyc
running install_headers
Traceback (most recent call last):
  File "setup.py", line 717, in ?
    cmdclass = { 'install_data': wx_smart_install_data,
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/core.py", line 149, in
setup
    dist.run_commands()
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/dist.py", line 907, in
run_commands
  self.run_command(cmd)
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/dist.py", line 927, in
    run_command
    cmd_obj.run()
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/command/install.py", li
ne 505, in run
     self.run_command(cmd_name)
   File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/cmd.py", line 333, in r
un_command
    self.distribution.run_command(command)
   File "/home/src/wxPythonSrc-2.5.1.5/wxPython/distutils/dist.py", line 927, in
      run_command
         cmd_obj.run()
   File "/home/src/wxPythonSrc-2.5.1.5/wxPython/config.py", line 411, in run
       if WXPREFIX.startswith(root):
TypeError: expected a character buffer object
$

Jon wrote:

    cmd_obj.run()
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/config.py", line 411, in run
    if WXPREFIX.startswith(root):
TypeError: expected a character buffer object
$

Also ran the above command with:

WX_CONFIG=/usr/local/wx/bin/wxgtk-2.5-config

added, but still basicly the same output..

Any idea of how I can make this baby go?

This is a known bug. Change line 411 of config.py to look like this

         if root is None or WXPREFIX.startswith(root):

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Jon wrote:

    cmd_obj.run()
  File "/home/src/wxPythonSrc-2.5.1.5/wxPython/config.py", line 411, in run
    if WXPREFIX.startswith(root):
TypeError: expected a character buffer object
$

Also ran the above command with:

WX_CONFIG=/usr/local/wx/bin/wxgtk-2.5-config

added, but still basicly the same output..

Any idea of how I can make this baby go?

This is a known bug. Change line 411 of config.py to look like this

         if root is None or WXPREFIX.startswith(root):

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!