#!/bin/sh

#shellcheck disable=SC2034
#shellcheck disable=SC2154
#shellcheck disable=SC2086

#ebs.formulae
ebsver=1

pkgname=python
pkgver=3.15.0
pkgsrc=https://www.python.org/ftp/python/$pkgver/Python-$pkgver.tar.xz
pkgchecksum=sha256:ba4bed1ba346b916890b76d9e320451420aa69f6408997d33c66482eeae3d575
pkgdesc="Python programming language"
pkgmaintainer="juanvel400 <me@juanvel400.com>"
pkglicense="PSF-2.0"
pkghomepage="https://www.python.org"
pkgcheck=true
pkgdeps="musl"

build() {
    ./configure ${CONFIGUREFLAGS:-} --prefix=/usr \
        --disable-static --enable-shared \
        --without-ensurepip --without-static-libpython
    make
}

check() {
    make test TESTOPTS="--timeout 120"
}

package() {
    "${1:-fakeroot}" make install DESTDIR="$pkgdir"
}
