New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #19190 (new defect)

Opened 3 years ago

Last modified 3 years ago

py25-wxpython and py26-wxpython conflict

Reported by: ram@… Owned by: jwa@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc: mww@…, jameskyle@…, mlk@…
Port: py25-wxpython, py26-wxpython

Description

py25-wxpython and py26-wxpython conflict when you try to install them at the same time:

$ port install py25-wxpython
--->  Fetching py25-wxpython
--->  Attempting to fetch wxPython-src-2.8.9.1.tar.bz2 from http://downloads.sourceforge.net/wxpython
--->  Verifying checksum(s) for py25-wxpython
--->  Extracting py25-wxpython
--->  Configuring py25-wxpython
--->  Building py25-wxpython
--->  Staging py25-wxpython into destroot
--->  Installing py25-wxpython @2.8.9.1_0
--->  Activating py25-wxpython @2.8.9.1_0
Error: Target org.macports.activate returned: Image error: /opt/local/include/wx-2.8/wx/wxPython/i_files/__init__.py is being used by the active py26-wxpython port.  Please deactivate this port first, or use 'port -f activate py25-wxpython' to force the activation.
Error: Status 1 encountered during processing.
$

Change History

  Changed 3 years ago by mlk@…

  • cc mlk@… added

Cc Me!

  Changed 3 years ago by anonymous

  • milestone Port Bugs deleted

Milestone Port Bugs deleted

  Changed 3 years ago by mlk@…

wxPython (any version) writes files into ${prefix}/include/wx-X.Y/wx/wxPython, so one cannot have both the py25 and py26 versions installed at the same time right now. I modified the "post-destroot" to check for a prior install, and remove those files if found; this works for me (I have both the py25 and py26 versions installed), but might not be ideal because if the port that owns these head files is removed, the header files will also be removed even though they should stay around. Also, this change won't work if multiple versions of wxWidgets are installed. Maybe there is a way for files to be "double owned" in the MacPorts database if they are identical, and then be removed once all owners are removed? Here is my change to the Portfile:

post-destroot {
    xinstall -d -m 755 ${destroot}${prefix}/share/doc/
    file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${name}
    file copy ${worksrcpath}/samples \
    ${destroot}${prefix}/share/doc/${name}/examples

    # check to see if there is already a wxPython installed in
    # ${prefix}/include/wx-X.Y/wx/wxPython
    # if so, delete the corresponding destroot files, so that
    # there is no conflict during 'install'

    set wx_include_dir [glob ${prefix}/include/wx-*/wx/]
    system "echo ${wx_include_dir}"
    if {[file exists ${wx_include_dir}/wxPython/wxPython.h]} {
        system "rm -rf ${destroot}${wx_include_dir}/wxPython"
    }
}

follow-up: ↓ 5   Changed 3 years ago by jameskyle@…

Would it be preferable for the wxpython ports to compile their own wxpython? Then they could install into separate --prefix.

in reply to: ↑ 4   Changed 3 years ago by jameskyle@…

Replying to jameskyle@…:

Would it be preferable for the wxpython ports to compile their own wxpython? Then they could install into separate --prefix.

wxpython ports compile their on wxwidgets*

Note: See TracTickets for help on using tickets.