[141038] trunk/dports/devel/dbus-python/Portfile

michaelld at macports.org michaelld at macports.org
Thu Oct 8 06:33:34 PDT 2015


Revision: 141038
          https://trac.macports.org/changeset/141038
Author:   michaelld at macports.org
Date:     2015-10-08 06:33:34 -0700 (Thu, 08 Oct 2015)
Log Message:
-----------
dbus-python*: robust way of determining abiflags, per #48273.

Modified Paths:
--------------
    trunk/dports/devel/dbus-python/Portfile

Modified: trunk/dports/devel/dbus-python/Portfile
===================================================================
--- trunk/dports/devel/dbus-python/Portfile	2015-10-08 13:01:31 UTC (rev 141037)
+++ trunk/dports/devel/dbus-python/Portfile	2015-10-08 13:33:34 UTC (rev 141038)
@@ -77,15 +77,17 @@
             --disable-html-docs                                           \
             --disable-api-docs
 
-        # determine any abiflags, for Python 3.0+ only
-        set abiflag ""
-        if {${python_version} > 30} {
-            # the following is a better way of finding abiflag, but it causes a problem if python not installed yes (#49180)            
-            #set abiflag [exec ${prefix}/bin/python${python_branch}-config --abiflags]
+        set includedir_base ${python_prefix}/include/python${python_branch}
+        set python_config ${prefix}/bin/python${python_branch}-config
 
-            set abiflag m
+        pre-configure {
+            # determine any abiflags; works for Python 3+ only; will
+            # catch for Python 2.7 and we know there are no flags.
+            if {[catch {set abiflags [exec ${python_config} --abiflags]}]} {
+                set abiflags ""
+            }
+            configure.args-append --includedir=${includedir_base}${abiflags}
         }
-        configure.args-append --includedir=${python_prefix}/include/python${python_branch}${abiflag}
 
         configure.pkg_config_path  ${python_prefix}/lib/pkgconfig
         
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151008/da1bedb8/attachment.html>


More information about the macports-changes mailing list