File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # shellcheck shell=bash
2+
3+ python.matrix () {
4+ local prefix=' https://www.python.org'
5+
6+ local version=
7+ while read -r version; do
8+ printf ' %s\n' " CPython|$version |linux|amd64|$prefix /ftp/python/${version# v} /Python-${version# v} .tar.xz"
9+ done < <( m.fetch_github_tags ' python/cpython' )
10+ }
11+
12+ python.install () {
13+ local url=" $1 "
14+ local version=" $2 "
15+
16+ m.fetch -o ' ./python.tar.xz' " $url "
17+ m.ensure tar xf ' ./python.tar.xz'
18+ m.ensure mv ./Python-* / ' ./dir'
19+ m.ensure cd -- ' ./dir'
20+
21+ ./configure \
22+ --prefix=" $PWD /prefix" \
23+ --enable-optimizations
24+ make -j" $( nproc) "
25+ make install
26+
27+ m.ensure cd ' ..' # FIXME
28+
29+ REPLY_DIR=' ./dir'
30+ REPLY_BINS=(' ./prefix/bin' )
31+ }
Original file line number Diff line number Diff line change @@ -58,6 +58,14 @@ m.git_tag_to_versions_array() {
5858 unset _sha1 refspec
5959}
6060
61+ m.fetch_github_tags () {
62+ local prefix=" $1 "
63+
64+ local {_,refspec}=
65+ while read -r _ refspec; do
66+ printf ' %s\n' " ${refspec# refs/ tags/ } "
67+ done < <( git ls-remote --refs --tags " https://github.com/$prefix " )
68+ }
6169m.fetch_github_release () {
6270 local repo=" $1 "
6371
You can’t perform that action at this time.
0 commit comments