Opened 9 years ago

Closed 5 years ago

#45310 closed defect (fixed)

py27-pyobjc build fails with setuptools 6

Reported by: paulvanlorenzo@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: Cc: mndavidoff (Monte Davidoff), wicentowski@…, elventear (Pepe Barbe), 3add3287 (3add3287), tiasus@…, glen@…, allamistakeo19@…, kevin.developer11@…, fracai, epaell, lpsinger (Leo Singer), skymoo (Adam Mercer), petrrr
Port: py27-pyobjc

Description

Installing py27-pyobjc fails via macports in yosemite. py27-pyobjc produced an error:

Error: org.macports.destroot for port py27-pyobjc returned: command execution failed
Please see the log file for port py27-pyobjc for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyobjc/py27-pyobjc/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port py27-pyobjc failed

I attach the log file. I tried 'sudo port clean py27-pyobjc && sudo port selfupdate && sudo port install py27-pyobjc' but doesn't work. System: OS X 10.10 (14A386b) (yosemite beta version 5)

Do you know how can i fix it??

thanks!!!

Attachments (2)

main.log (143.1 KB) - added by paulvanlorenzo@… 9 years ago.
mountain-lion-main.log (8.4 KB) - added by skymoo (Adam Mercer) 9 years ago.

Download all attachments as: .zip

Change History (39)

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

Keywords: yosemite added; py27-pyobjc fails removed

You say you cleaned and tried again, but the log you attached is not from a clean build. Please clean again and try again just once, then attach that main.log. It built fine for me on Yosemite beta.

Changed 9 years ago by paulvanlorenzo@…

Attachment: main.log added

comment:2 in reply to:  1 Changed 9 years ago by paulvanlorenzo@…

Replying to ryandesign@…:

You say you cleaned and tried again, but the log you attached is not from a clean build. Please clean again and try again just once, then attach that main.log. It built fine for me on Yosemite beta.

Thanks for answering.You're right, the log it's wrong, I've just replaced the good main.log. I'm not sure what is happening. The problem started when I migrate macports as Migration saids.

Thanks for your help

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

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

Thanks. I tried again on my system and now I see the same error you do. But I was able to successfully install the port on Yosemite beta back on July 25. So something has changed since then.

comment:4 Changed 9 years ago by mndavidoff (Monte Davidoff)

I see the same failure when I try to install py27-pyobjc on Mac OS X 10.6 (Snow Leopard). I also get the same failure when trying to install py27-matplotlib. The problem seems to have started after I upgraded to py27-setuptools 6.0.

comment:5 Changed 9 years ago by mndavidoff (Monte Davidoff)

Cc: md14-macports@… added

Cc Me!

comment:6 Changed 9 years ago by paulvanlorenzo@…

Thanks to all for answering. I think is a bug that happens with the update of yosemite beta, I'm not sure how to fix it. md14-macports@…, try 'sudo port clean py27-pyobjc && sudo port selfupdate && sudo port install py27-pyobjc' some people fix this problem doing it and updating command line tools in mavericks, maybe it works also for Snow Leopard

comment:7 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: yosemite removed
Summary: py27-pyobjc build fails on OS X 10.10 (yosemite beta version 5)py27-pyobjc build fails with setuptools 6

comment:8 in reply to:  6 Changed 9 years ago by mndavidoff (Monte Davidoff)

Replying to paulvanlorenzo@…:

try 'sudo port clean py27-pyobjc && sudo port selfupdate && sudo port install py27-pyobjc'

I tried this to no avail. I previously reported the same failure when trying to install py27-matplotlib. I had not noticed that py27-pyobjc is a dependency of py27-matplotlib, and the py27-matplotlib failure occurred when trying to install py27-pyobjc.

comment:9 Changed 9 years ago by wicentowski@…

Cc: wicentowski@… added

Cc Me!

comment:10 Changed 9 years ago by wichert@…

This is caused by a change in setuptools which changes the return value from a dictionary to a set: https://bitbucket.org/pypa/setuptools/diff/setuptools/command/install_lib.py?diff2=c0243cfb55d2&at=default . A workaround is to modify pyobjc-core's setup.py to handle both situations:

    def get_exclusions(self):
        result = install_lib.install_lib.get_exclusions(self)

        def add(result, fn):
            if isinstance(result, dict):
                result[fn] = 1
            else:
                result.add(fn)

        for fn in install_lib.orig.install_lib.get_outputs(self):
            if 'PyObjCTest' in fn:
                add(result, fn)

        for fn in os.listdir('PyObjCTest'):
            add(result, os.path.join('PyObjCTest', fn))
            add(result, os.path.join(self.install_dir, 'PyObjCTest', fn))

        return result

comment:11 Changed 9 years ago by wichert@…

comment:12 Changed 9 years ago by wangjicheng11@…

It works, and also works for py-pyobjc-cocoa! Thank you!

comment:13 Changed 9 years ago by luszczek (Piotr Luszczek)

I had the exact same problem with py34-pyobjc and py34-pyobjc-cocoa. My fix was to replace:

result[fn] = 1

with

result.add(fn)

since result is a Python set(), not a dict()

And it works on Yosemite that is being released to the wild today. I'm running Yosemite GM Candidate 3.

Last edited 5 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:14 Changed 9 years ago by elventear (Pepe Barbe)

Cc: elventear@… added

Cc Me!

comment:15 Changed 9 years ago by 3add3287 (3add3287)

Cc: torstenb@… added

Cc Me!

comment:16 Changed 9 years ago by tiasus@…

Cc: tiasus@… added

Cc Me!

comment:17 Changed 9 years ago by glen@…

Cc: glen@… added

Cc Me!

comment:18 Changed 9 years ago by allamistakeo19@…

Cc: allamistakeo19@… added

Cc Me!

comment:19 Changed 9 years ago by fracai

The upstream ticket (linked in comment 11) indicates this has been fixed in trunk and the 3.0.x branch.

comment:20 Changed 9 years ago by kevin.developer11@…

Cc: kevin.developer11@… added

Cc Me!

comment:21 Changed 9 years ago by fracai

Cc: arno@… added

Cc Me!

comment:22 Changed 9 years ago by epaell

Cc: elenc@… added

Cc Me!

comment:23 Changed 9 years ago by lpsinger (Leo Singer)

Cc: aronnax@… added

Cc Me!

comment:24 Changed 9 years ago by lpsinger (Leo Singer)

Has anyone already asked if upstream can do a point release for us?

comment:25 Changed 9 years ago by lpsinger (Leo Singer)

Fixed in r127056, but we should leave this ticket open until it is fixed upstream and we can remove the patch.

comment:26 Changed 9 years ago by lpsinger (Leo Singer)

See also r127057 for py-pyobjc-cocoa.

comment:27 Changed 9 years ago by skymoo (Adam Mercer)

After this change py27--pyobjc is no longer building for me on Mountain Lion, log from a clean build is attached. Problem seems to be that the patch-Modules-2.2.diff patch file no longer applies cleanly. Therefore I imagine the new patch also changes similar areas.

comment:28 Changed 9 years ago by lpsinger (Leo Singer)

Yes, I noticed. I'll make a separate version of the patch for 3.0.1. Thanks!

Changed 9 years ago by skymoo (Adam Mercer)

Attachment: mountain-lion-main.log added

comment:29 Changed 9 years ago by lpsinger (Leo Singer)

I ported the patch forward (without understanding what the patch does) in r127072. Let's see if that works. Note that the patch is for a bug that has been reported upstream, <https://bitbucket.org/ronaldoussoren/pyobjc/issue/100/cannot-find-interface-declaration-for>.

comment:30 Changed 9 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:31 in reply to:  28 Changed 9 years ago by skymoo (Adam Mercer)

Replying to aronnax@…:

Yes, I noticed. I'll make a separate version of the patch for 3.0.1. Thanks!

That did the trick, thanks.

comment:32 Changed 9 years ago by petrrr

Looks like the update to version 3.0.1 broke this port for Python < 2.7:

--->  Building py26-pyobjc
PyObjC: Need at least Python 2.7
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyobjc/py26-pyobjc/work/pyobjc-core-3.0.1" && /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 setup.py --no-user-cfg build 
Exit code: 1
Error: org.macports.build for port py26-pyobjc returned: command execution failed
Warning: targets not executed for py26-pyobjc: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Please see the log file for port py26-pyobjc for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyobjc/py26-pyobjc/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port py26-pyobjc failed

Should we trace this with a separate ticket?

Last edited 9 years ago by petrrr (previous) (diff)

comment:33 Changed 9 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:34 in reply to:  32 Changed 9 years ago by larryv (Lawrence Velázquez)

See #41145. We should just trash the older subports.

comment:35 Changed 9 years ago by petrrr

If I understood things right, the deprecation period for py26 subports and python26 would last until January 2016. Trashing py26-pyobjc implies speeding up this process quite a bit. We would need to deprecate py26-matplotlib first, which is probably the most important dependent of py26-pyobjc. This in turn requires to discontinue all its dependents of py26-matplotlib immediately.

Is this what we want?

comment:36 in reply to:  35 Changed 9 years ago by larryv (Lawrence Velázquez)

Replying to petr@…:

If I understood things right, the deprecation period for py26 subports and python26 would last until January 2016. Trashing py26-pyobjc implies speeding up this process quite a bit.

When I said that the deprecation period for Python 2.6 would last until January 2016, all I meant was that I’d obsolete python26 at that time, so all dependencies on it would necessarily have to be eliminated by then. That doesn’t mean we have to keep Python 2.6 stuff around for another 14 months.

We would need to deprecate py26-matplotlib first, which is probably the most important dependent of py26-pyobjc. This in turn requires to discontinue all its dependents of py26-matplotlib immediately.

Is this what we want?

I don’t use matplotlib or any of its dependents, so I don't know how important it would be to prolong Python 2.6 support. It looks like the alternative would be to keep py25-pyobjc and py26-pyobjc at an old version, which is awkward.

Anyway, there aren’t that many dependents; I count 41.

Version 0, edited 9 years ago by larryv (Lawrence Velázquez) (next)

comment:37 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

In 38e4bd219abb2d6a6da2d58ef3ae3cd26867318a/macports-ports (master):

py-pyobjc: Remove unused patchfiles

Closes: #45310

Note: See TracTickets for help on using tickets.