Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#32251 closed enhancement (fixed)

MyPaint needs to be updated to python 2.7

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: su-v, ak.ml@…, blender3dartist@…
Port: MyPaint

Attachments (2)

MyPaint-python27.diff (1.5 KB) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.
simple patch (that results in the error)
patch-SConstruct.diff (2.3 KB) - added by ak.ml@… 12 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

The error one gets with the attached simple update is:

scons: *** [lib/_mypaintlib.so] Implicit dependency `_PyMac_Error' not found, needed by target `lib/_mypaintlib.so'.

I don't understand what this means or why it happens with python 2.7 but not 2.6.

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: MyPaint-python27.diff added

simple patch (that results in the error)

comment:2 Changed 12 years ago by su-v

Cc: suv-sf@… added

Cc Me!

comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

  • r87621: Worked around "You need to have numpy installed" error by adding py27-numpy dependency; yes I know this is ridiculous and welcome a proper fix to depend on only python 2.7 parts.

comment:4 Changed 12 years ago by ak.ml@…

Cc: ak.ml@… added

Cc Me!

comment:5 Changed 12 years ago by ak.ml@…

The problem here is that python2.7-config adds a -u linker options (compared to python-2.6-config) that scons is unable to handle (this is documented).

$ python2.6-config --ldflags
-L/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config -ldl -framework CoreFoundation -lpython2.6

$ python2.7-config --ldflags
-L/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -ldl -framework CoreFoundation -lpython2.7 -u _PyMac_Error /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python

And in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-2.0.1/SCons/Environment.py

            # Other options not currently handled:
            #  -u symbol       (linker undefined symbol)

This is not fixed in scons 2.1.

As a workaround, I've put everything after -u in LINKFLAGS.
But simply removing everything after -u might work as well.

I'm attaching a sample patch that works for me.
With MyPaint 1.0.0 I had a UsingTheRightCompiler message, which is why I added a env['CXX'] line in the patch and in Portfile:

build.env-append    CXX=${configure.cxx}
destroot.env-append CXX=${configure.cxx}

Changed 12 years ago by ak.ml@…

Attachment: patch-SConstruct.diff added

comment:6 Changed 12 years ago by blender3dartist@…

Cc: blender3dartist@… added

Cc Me!

comment:7 Changed 12 years ago by blender3dartist@…

Heh, I was just looking into this, and then I find this here. Nice little surprise.

I tested out the patch and it works as described, MyPaint builds. You may consider sending the patch up to MyPaint as well?

comment:8 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added
Resolution: fixed
Status: newclosed

Thanks. I used the upstream patch from https://gna.org/bugs/?19119 instead. Committed in r88756.

comment:9 in reply to:  5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ak.ml@…:

With MyPaint 1.0.0 I had a UsingTheRightCompiler message,

Fixed in r88758 along with ensuring we use the right -arch flags and adding a universal variant.

Note: See TracTickets for help on using tickets.