[152558] trunk/dports/sysutils/python_select/Portfile
larryv at macports.org
larryv at macports.org
Mon Sep 12 09:22:25 PDT 2016
Revision: 152558
https://trac.macports.org/changeset/152558
Author: larryv at macports.org
Date: 2016-09-12 09:22:25 -0700 (Mon, 12 Sep 2016)
Log Message:
-----------
python_select: Refactor to reduce repetition
Modified Paths:
--------------
trunk/dports/sysutils/python_select/Portfile
Modified: trunk/dports/sysutils/python_select/Portfile
===================================================================
--- trunk/dports/sysutils/python_select/Portfile 2016-09-12 15:41:20 UTC (rev 152557)
+++ trunk/dports/sysutils/python_select/Portfile 2016-09-12 16:22:25 UTC (rev 152558)
@@ -30,48 +30,34 @@
# select.file ${filespath}/python[string map {. {}} ${branch}]
# install all files
-select.entries {python base} \
- {python none}
+select.entries {python base} \
+ {python none}
-platform darwin 8 {
- select.entries-append {python python23-apple}
+platform darwin {
+ set apple_pythons [
+ if {${os.major} == 8} {
+ list python23-apple
+ } elseif {${os.major} == 9} {
+ list python25-apple
+ } elseif {${os.major} == 10} {
+ list python25-apple \
+ python26-apple
+ } elseif {${os.major} == 11} {
+ list python25-apple \
+ python26-apple \
+ python27-apple
+ } elseif {${os.major} == 12 || ${os.major} == 13} {
+ list {python25-apple.mtln python25-apple} \
+ {python26-apple.mtln python26-apple} \
+ {python27-apple.mtln python27-apple}
+ } elseif {${os.major} >= 14} {
+ list {python26-apple.mtln python26-apple} \
+ {python27-apple.mtln python27-apple}
+ }
+ ]
+ foreach python $apple_pythons {
+ select.entries-append [list python2 {*}$python]
+ }
}
-platform darwin 9 {
- select.entries-append {python python25-apple}
-}
-
-platform darwin 10 {
- select.entries-append {python python25-apple} \
- {python python26-apple}
-}
-
-platform darwin 11 {
- select.entries-append {python python25-apple} \
- {python python26-apple} \
- {python python27-apple}
-}
-
-platform darwin 12 {
- select.entries-append {python python25-apple.mtln python25-apple} \
- {python python26-apple.mtln python26-apple} \
- {python python27-apple.mtln python27-apple}
-}
-
-platform darwin 13 {
- select.entries-append {python python25-apple.mtln python25-apple} \
- {python python26-apple.mtln python26-apple} \
- {python python27-apple.mtln python27-apple}
-}
-
-platform darwin 14 {
- select.entries-append {python python26-apple.mtln python26-apple} \
- {python python27-apple.mtln python27-apple}
-}
-
-platform darwin 15 {
- select.entries-append {python python26-apple.mtln python26-apple} \
- {python python27-apple.mtln python27-apple}
-}
-
livecheck.type none
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160912/a0f17ee4/attachment.html>
More information about the macports-changes
mailing list