setup.py build issue: build_options.py not found

Hi List,

After building wxPython from source a number of times on my Mac, I’m having a problem that baffles me; hopefully someone can shed light:

Here are the steps I’m following:

  1. Download a fresh wxPython tarball

  2. Building and installing wx, gizmos, and stc

I am having issues running setup.py. Running the following command with fresh wxPython download:

python2.4 setup.py build_ext --inplace --debug WX_CONFIG=$BUILD_SHARED_DIR/bin/wx-config

Building python modules in /Users/kolohe/vterrain/wxPython/wxPython-src-2.8.3.0/wxPython

Traceback (most recent call last):
File “setup.py”, line 50, in ?
copy_file(‘build_options.py’, ‘wx/build’, update=1, verbose=1)

File “/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/distutils/file_util.py”, line 118, in copy_file
raise DistutilsFileError,
distutils.errors.DistutilsFileError: can’t copy ‘build_options.py’: doesn’t exist or not a regular file

I have built wxPython on my mac ser

Profuse apologies as my prior post was sent incomplete. This is the complete question.

After building wxPython from source successfully several times on my Mac, I’m
having a problem that baffles me; hopefully someone can shed light. Maybe there’s some detail I’ve missed?

Here are the steps I’m following:

  1. Download a fresh wxPython tarball

  2. Building and installing wx, gizmos, and stc from that tarball

  3. Running the following from inside the wxPython-src-2.8.3.0/wxPython directory:

    python2.4 setup.py build_ext --inplace --debug WX_CONFIG=$BUILD_SHARED_DIR/bin/wx-config

This yields:

Building python modules in /Users/kolohe/vterrain/wxPython/wxPython-src-2.8.3.0/wxPython

Traceback (most recent call last):
File “setup.py”, line 50, in ?
copy_file(‘build_options.py’, ‘wx/build’, update=1, verbose=1)

File “/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/distutils/file_util.py”, line 118, in copy_file
raise DistutilsFileError,
distutils.errors.DistutilsFileError: can’t copy ‘build_options.py’: doesn’t exist or not a regular file

Looking at the setup.py code:

line 37

for bo_name in [“build_options.py”, “build_options.pyc”]:
if os.path.exists(bo_name):
os.remove(bo_name)

this line, 50, fails

copy_file(‘build_options.py’, ‘wx/build’, update=1, verbose=1)

I don’t see any steps between these two that would explicitly indicated “build_options.py” would be recreated… is there something I’m missing out on here?

Thanks for your help in advance,

Nino

Nino Walker wrote:

## Building python modules in /Users/kolohe/vterrain/wxPython/wxPython-src-2.8.3.0/wxPython
Traceback (most recent call last):
  File "setup.py", line 50, in ?
    copy_file('build_options.py', 'wx/build', update=1, verbose=1)
  File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/distutils/file_util.py", line 118, in copy_file
    raise DistutilsFileError, \
distutils.errors.DistutilsFileError: can't copy 'build_options.py': doesn't exist or not a regular file

I have built wxPython on my mac ser

Make sure there isn't a build_options.py or .pyc somewhere on the PYTHONPATH. That can throw off the code in setup.py that is looking for the file.

···

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