### this file is sourced not run
PKGVER=3.11.2
PKGARCH=x86_64

# LFS 11.3
TARBALL=Python-$PKGVER.tar.xz
MD5SUM=a957cffb58a89303b62124896881950b
BUNDLE=fatdog-base-11.3.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/900/$BUNDLE

SLACKREQ='libreadline'
SLACKDESC="python3-base: python3-base $PKGVER (Build-system Python)
python3-base: 
python3-base: The Python 3 package contains the Python development environment. It 
python3-base: is useful for object-oriented programming, writing scripts, 
python3-base: prototyping large programs, or developing entire applications.
python3-base: 
python3-base: This is the base, part of the build system, not for general use.
python3-base: 
python3-base: DO NOT INSTALL THIS PACKAGE unless you know what you're doing.
python3-base:
python3-base: 
"

### override download for LFS sources bundle
# $1-src-dir $2-tarball 
pkg_download() {
	echo downloading $BUNDLE for $TARBALL
	wget -P $1 $SRC_URL
	tar -xf $1/$BUNDLE --strip-components=1 -C $1 
	rm $1/$BUNDLE
}

### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/Python* &&

	CONFFLAGS="$CONFFLAGS   \
		--enable-shared     \
		--with-system-expat \
		--with-system-ffi   \
		--with-readline     \
		--with-ensurepip=install  \
		--with-platlibdir=$LIBDIR \
	" &&
	# --without-ensurepip # build without pip3
	pkg_build_autoconf &&

	# LFS 11.3 suppress warning and urge to upgrade pip3
	cat > /etc/pip.conf << EOF &&
[global]
root-user-action = ignore
disable-pip-version-check = true
EOF

	pkg_build_slackdesc
}
