2015-05-25 21:04:41 +00:00
|
|
|
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
|
|
|
|
|
|
|
|
|
PortSystem 1.0
|
|
|
|
|
PortGroup select 1.0
|
|
|
|
|
|
|
|
|
|
name python3_select
|
2023-12-09 16:56:58 +11:00
|
|
|
version 0.1
|
|
|
|
|
revision 0
|
2015-05-25 21:04:41 +00:00
|
|
|
categories sysutils
|
|
|
|
|
supported_archs noarch
|
2019-08-20 11:22:22 +10:00
|
|
|
configure.cxx_stdlib
|
2023-12-09 16:56:58 +11:00
|
|
|
license BSD
|
|
|
|
|
maintainers nomaintainer
|
|
|
|
|
|
2015-05-25 21:04:41 +00:00
|
|
|
description Common files for selecting default Python 3 version
|
|
|
|
|
long_description This port installs files that allow 'port select' \
|
|
|
|
|
to create links to the preferred default version \
|
|
|
|
|
of Python 3.
|
2023-12-09 16:56:58 +11:00
|
|
|
homepage https://www.macports.org/
|
|
|
|
|
|
|
|
|
|
distfiles
|
|
|
|
|
use_configure no
|
|
|
|
|
build {}
|
|
|
|
|
destroot {}
|
2015-05-25 21:04:41 +00:00
|
|
|
|
|
|
|
|
# Documentation for Python 3 ports:
|
|
|
|
|
# PortGroup select 1.0
|
|
|
|
|
# set pythonNoDot python[string map {. {}} $branch]
|
|
|
|
|
# select.entries [list python3 python3-$pythonNoDot $pythonNoDot]
|
|
|
|
|
|
2023-12-09 16:56:58 +11:00
|
|
|
if {$subport eq $name} {
|
|
|
|
|
select.entries {python3 base} \
|
|
|
|
|
{python3 none}
|
2015-05-25 21:04:41 +00:00
|
|
|
|
2023-12-09 16:56:58 +11:00
|
|
|
platform darwin {
|
|
|
|
|
set apple_pythons [
|
|
|
|
|
if {${os.major} == 19} {
|
|
|
|
|
list python37-apple \
|
|
|
|
|
python38-apple
|
|
|
|
|
} elseif {${os.major} == 20} {
|
|
|
|
|
list python38-apple
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
foreach python $apple_pythons {
|
|
|
|
|
select.entries-append [list python3 {*}$python]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-29 07:53:28 +02:00
|
|
|
foreach p {38 39 310 311 312 313 314 315 315t} {
|
2023-12-09 16:56:58 +11:00
|
|
|
subport python3_select-${p} {
|
|
|
|
|
set pyver $p
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if {$subport ne $name} {
|
2023-12-09 18:21:26 +11:00
|
|
|
revision 1
|
2023-12-09 16:56:58 +11:00
|
|
|
platforms any
|
|
|
|
|
depends_run port:python3_select
|
2023-12-09 18:21:26 +11:00
|
|
|
select.entries [list python3 python${pyver} python${pyver}]
|
2023-12-09 16:56:58 +11:00
|
|
|
pre-activate {
|
2024-03-16 12:31:04 +11:00
|
|
|
if {[file exists ${prefix}/etc/select/python3/python${pyver}]} {
|
|
|
|
|
set owner [registry_file_registered ${prefix}/etc/select/python3/python${pyver}]
|
|
|
|
|
if {[string match python${pyver}* $owner]} {
|
|
|
|
|
registry_deactivate_composite $owner "" [list ports_nodepcheck 1]
|
|
|
|
|
}
|
2020-06-05 18:38:15 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-25 21:04:41 +00:00
|
|
|
livecheck.type none
|