Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 67 lines (45 sloc) 1.2 KB
#!/bin/bash
{
set -x
set -e
set -u
. build.profile
. "${PREFIX}/${BUILD_sqlite}/profile"
function B_PYTHON {
SRCURL="${BUILD_python_SRCURL}"
BUILD_PKG=${BUILD_python}
PREFIX="${PREFIX}/${BUILD_PKG}"
mkdir -p "${PREFIX}"
cat >"${PREFIX}"/profile <<-EOF
PATH="${PREFIX}"/bin:\${PATH}
EOF
test -e "${BUILD_PKG}.tar.gz" || wget -nv "${SRCURL}" -O "${BUILD_PKG}.tar.gz"
test -d "${BUILD_PKG}" || mkdir -pv "${BUILD_PKG}" && tar -xf "${BUILD_PKG}.tar.gz" --strip-components=1 -C "${BUILD_PKG}"
pushd "${BUILD_PKG}"
local _conf=(
--prefix "${PREFIX}"
--enable-loadable-sqlite-extensions
--enable-optimizations
)
export PKG_CONFIG_PATH
SQLITE_PREFIX=$(pkg-config sqlite3 --variable=prefix)
LDFLAGS="-Wl,-rpath -Wl,-L${SQLITE_PREFIX}/lib" \
./configure "${_conf[@]}"
make -j "${NPROC}"
make install
ln -vfs python3 "${PREFIX}/bin/python"
ln -vfs python3-config "${PREFIX}/bin/python-config"
ln -vfs pydoc3 "${PREFIX}/bin/pydoc"
ln -vfs idle3 "${PREFIX}/bin/idle"
ln -vfs pip3 "${PREFIX}/bin/pip"
. "${PREFIX}/profile"
pip3 install --prefix="${PREFIX}" --upgrade pip
python3 -m pip install --no-cache-dir --upgrade pipenv==2024.0.1
# for libvips
pip3 install meson
popd
}
pushd ${BUILD_DIR}
B_PYTHON
popd
}