I'm trying to package wxPython for MacPorts. Ideally it should allow
side-by-side installation of both wxPython 2.8(.12.0) and 2.9(.4.0)
for different versions of Python (2.4, 2.5, 2.6, 2.7).
While wxWidgets compiled with --prefix=/weird/path/2.8 and
--prefix=/weird/path/2.9 can happily co-exist, I'm facing two problems
when trying to install different versions of wxPython for different
versions of Python.
(1) When trying to install both wxPython 2.8 and 2.9, the following
files overlap:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx.pth
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wxversion.py
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wxversion.pyc
together with 1468 other files installed by wxPython 2.9.4.0, but all
others end up in
.../site-packages/wx-2.9.4-osx_cocoa/wx/
or have distinctive names like wxPython_common-2.9.4.0-py2.7.egg-info,
so only the three files seem to be problematic.
Is it even possible to install both versions of wxPython? I'm asking
because there are a number of python packages that simply don't work
with wxPython 2.9 yet (and wxPython 2.8 either requires GTK2/X11 or
doesn't even build on 64-bit Mac OS X) and it would be great if some
packages could depend on wxPython 2.8 and others on wxPython 2.9.
2.) When trying to install wxPython for different versions of Python
(say 2.6 and 2.7), the problem arises because wxPython installs files
to
/weird/path/2.9/include/wx-2.9/wx/wxPython/i_files/__init__.py
/weird/path/2.9/include/wx-2.9/wx/wxPython/i_files/_about.i
/weird/path/2.9/include/wx-2.9/wx/wxPython/i_files/_accel.i
/weird/path/2.9/include/wx-2.9/wx/wxPython/i_files/_app.i
...
While I'm not aware of any major problems that would *force* the user
to need both (like a python package that wouldn't work with Python
2.7), it would still be great if the packages for python 2.6 and 2.7
wouldn't conflict with each other.
What is the best way to install files to a different location? For
example, it would be sufficient to install files to
/weird/path/2.9/include/wx-2.9-python-2.7/
or to
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
rather than to
/weird/path/2.9/include/wx-2.9/
but I'm not sure how to best approach this problem. I would be
grateful for any hints.
I'm trying to package wxPython for MacPorts. Ideally it should allow
side-by-side installation of both wxPython 2.8(.12.0) and 2.9(.4.0)
for different versions of Python (2.4, 2.5, 2.6, 2.7).
While wxWidgets compiled with --prefix=/weird/path/2.8 and
--prefix=/weird/path/2.9 can happily co-exist, I'm facing two problems
when trying to install different versions of wxPython for different
versions of Python.
(1) When trying to install both wxPython 2.8 and 2.9, the following
files overlap:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx.pth
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wxversion.py
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wxversion.pyc
together with 1468 other files installed by wxPython 2.9.4.0, but all
others end up in
.../site-packages/wx-2.9.4-osx_cocoa/wx/
or have distinctive names like wxPython_common-2.9.4.0-py2.7.egg-info,
so only the three files seem to be problematic.
Is it even possible to install both versions of wxPython? I'm asking
because there are a number of python packages that simply don't work
with wxPython 2.9 yet (and wxPython 2.8 either requires GTK2/X11 or
doesn't even build on 64-bit Mac OS X) and it would be great if some
packages could depend on wxPython 2.8 and others on wxPython 2.9.
The intent with these files is to be version agnostic, and to be used to select which version is imported. The wxversion module allows the version to be selected programmatically, and wx.pth specifies the version that will be imported by default. To handle this what has been done in the past (for Debian/Ubuntu) is to have a separate package for these files, so the user could install the wxPython 2.8 *AND* 2.9 runtimes if they want both, and then install wxversion-2.8 *OR* wxversion-2.9 to specify which will be imported by default. I don't know if that fits the typical macports model very well or not, but it works.
2.) When trying to install wxPython for different versions of Python
(say 2.6 and 2.7), the problem arises because wxPython installs files
to
/weird/path/2.9/include/wx-2.9/wx/wxPython/i_files/__init__.py
/weird/path/2.9/include/wx-2.9/wx/wxPython/i_files/_about.i
/weird/path/2.9/include/wx-2.9/wx/wxPython/i_files/_accel.i
/weird/path/2.9/include/wx-2.9/wx/wxPython/i_files/_app.i
...
While I'm not aware of any major problems that would *force* the user
to need both (like a python package that wouldn't work with Python
2.7), it would still be great if the packages for python 2.6 and 2.7
wouldn't conflict with each other.
Those files will be identical for each version of wxPython, for all versions of Python, so they could be split into a separate -devel package or whatever is the naming convention for macports. They would only need to be installed for building 3rd party extension modules that need to integrate with the wxPython type system.