[131480] trunk/dports/science/uhd/Portfile

michaelld at macports.org michaelld at macports.org
Mon Jan 12 09:42:35 PST 2015


Revision: 131480
          https://trac.macports.org/changeset/131480
Author:   michaelld at macports.org
Date:     2015-01-12 09:42:35 -0800 (Mon, 12 Jan 2015)
Log Message:
-----------
uhd*: require Python 2.7; leave +python2[67] legacy variants for now.

Modified Paths:
--------------
    trunk/dports/science/uhd/Portfile

Modified: trunk/dports/science/uhd/Portfile
===================================================================
--- trunk/dports/science/uhd/Portfile	2015-01-12 17:41:13 UTC (rev 131479)
+++ trunk/dports/science/uhd/Portfile	2015-01-12 17:42:35 UTC (rev 131480)
@@ -123,58 +123,32 @@
 
 default_variants +docs +examples +libusb +manual +test +orc +manpages
 
-# set Python variants
+# set Python legacy variants; these can be removed 2016-01-01
 
-set pythons_suffixes {26 27}
-global chosen_python_suffix
-set chosen_python_suffix ""
+variant python26 description {Legacy variant} {}
+variant python27 description {Legacy variant} {}
 
-set pythons_ports {}
-foreach s ${pythons_suffixes} {
-    lappend pythons_ports python${s}
-}
+# require Python 2.7
 
-foreach s ${pythons_suffixes} {
-    set p python${s}
-    set v [join [split ${s} ""] "."]
-    set i [lsearch -exact ${pythons_ports} ${p}]
-    set c [lreplace ${pythons_ports} ${i} ${i}]
-    eval [subst {
-        variant ${p} description "Build UHD for Python ${v}" \
-            conflicts ${c} {
+depends_lib-append \
+    port:python27 \
+    port:py27-cheetah
 
-            set chosen_python_suffix ${s}
-            depends_lib-append \
-                port:${p} \
-                port:py${s}-cheetah
+# specify that Python version to use
+configure.args-append \
+    -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7
 
-            # specify that Python version to use
-            configure.args-append \
-                -DPYTHON_EXECUTABLE=${prefix}/bin/python${v}
+# after destroot, have uhd fetch its images into the
+# destroot area, so that they are also tracked by MacPorts
 
-            # after destroot, have uhd fetch its images into the
-            # destroot area, so that they are also tracked by MacPorts
+post-destroot {
 
-            post-destroot {
-                ui_debug "${prefix}/bin/python${v} ${destroot}${prefix}/share/uhd/utils/uhd_images_downloader.py --install-location=${destroot}${prefix}/share/uhd/images"
-                system "${prefix}/bin/python${v} ${destroot}${prefix}/share/uhd/utils/uhd_images_downloader.py --install-location=${destroot}${prefix}/share/uhd/images"
-            }
-        }
-    }]
-}
+    ui_debug "Fetching images:"
+    ui_debug "${prefix}/bin/python2.7 ${destroot}${prefix}/share/uhd/utils/uhd_images_downloader.py --install-location=${destroot}${prefix}/share/uhd/images"
+    system "${prefix}/bin/python2.7 ${destroot}${prefix}/share/uhd/utils/uhd_images_downloader.py --install-location=${destroot}${prefix}/share/uhd/images"
 
-# if no python variant is set, default to 2.7
-if {![variant_isset python26] &&
-    ![variant_isset python27]} {
-    default_variants +python27
 }
 
-# make sure -python27 was not used alone
-if {![variant_isset python26] &&
-    ![variant_isset python27]} {
-    return -code error "Exactly one Python variant must be selected."
-}
-
 variant test description {enable tests} {
     configure.args-append -DENABLE_TESTS=ON
     test.run yes
@@ -213,8 +187,7 @@
 }
 
 variant manual description {build manual} {
-    depends_lib-append \
-        port:py${chosen_python_suffix}-docutils
+    depends_lib-append port:py27-docutils
     configure.args-append -DENABLE_MANUAL=ON
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150112/9968c4db/attachment.html>


More information about the macports-changes mailing list