Ticket #35332: port-py_keyring.diff

File port-py_keyring.diff, 1.6 KB (added by anddam (Andrea D'Amore), 12 years ago)
  • Portfile

     
    2828python.default_version  27
    2929
    3030if {${subport} != ${name}} {
     31    patchfiles  patch-setup_py.diff
    3132    post-destroot {
    3233        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport} \
    3334                          ${destroot}${prefix}/share/examples/${subport}
  • files/patch-setup_py.diff

     
     1--- setup.py.orig       2011-08-03 22:08:15.000000000 +0200
     2+++ setup.py    2012-08-03 11:17:49.000000000 +0200
     3@@ -21,7 +21,12 @@
     4 if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
     5     # XCode 4.0 dropped support for ppc architecture, which is hardcoded in
     6     # distutils.sysconfig
     7-    version = runcmd(['/usr/bin/xcodebuild', '-version'], {})[0].splitlines()[0]
     8+    commandResult = runcmd(['/usr/bin/xcodebuild', '-version'], {})
     9+    print('commandResult:' + type(commandResult).__name__)
     10+    print('commandResult[0]:' + type(commandResult[0]).__name__)
     11+    print('commandResult[0].splitlines():' + type(commandResult[0].splitlines()).__name__)
     12+    print('commandResult[0].splitlines()[0]:' + type(commandResult[0].splitlines()[0]).__name__)
     13+    version = commandResult[0].splitlines()[0]
     14     # Also parse only first digit, because 3.2.1 can't be parsed nicely
     15     if (version.startswith('Xcode') and
     16         StrictVersion(version.split()[1]) >= StrictVersion('4.0')):