summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-02-18 12:56:22 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-02-18 12:56:22 -0500
commit13984f725db156cbc952d0afe90f27da15a0b85d (patch)
treeb3a39b75ecaecca11ee1525a99153a7606e460cb /python
downloadspm_packages-13984f725db156cbc952d0afe90f27da15a0b85d.tar.gz
Initial commit
Diffstat (limited to 'python')
-rw-r--r--python/build.sh69
1 files changed, 69 insertions, 0 deletions
diff --git a/python/build.sh b/python/build.sh
new file mode 100644
index 0000000..990fcb4
--- /dev/null
+++ b/python/build.sh
@@ -0,0 +1,69 @@
+#!/bin/bash
+name=python
+version=3.7.5
+_basever=${version%.*}
+revision=0
+sources=(
+ "https://www.python.org/ftp/python/${version}/Python-${version}.tar.xz"
+)
+build_depends=(
+ "sed"
+ "grep"
+ "automake"
+ "autoconf"
+ "xz"
+)
+depends=(
+ "bzip2"
+ "e2fsprogs"
+ "gdbm"
+ "gzip"
+ "libexpat"
+ "libffi"
+ "ncurses"
+ "openssl==1.1.1d"
+ "tar"
+ "readline"
+ "sqlite"
+ "tk"
+ "zlib"
+)
+
+
+function prepare() {
+ tar xf Python-${version}.tar.xz
+ cd Python-${version}
+}
+
+function build() {
+ #zlib="zlib zlibmodule.c ${CFLAGS} ${LDFLAGS} -lz"
+ #echo "${zlib/=/ }" >> Modules/Setup
+
+ export CFLAGS="${CFLAGS} -I${build_runtime}/include/ncursesw"
+ ./configure \
+ --prefix="${_prefix}" \
+ --enable-ipv6 \
+ --enable-loadable-sqlite-extensions \
+ --enable-shared \
+ --with-computed-gotos \
+ --with-dbmliborder=gdbm:ndbm \
+ --with-pymalloc \
+ --with-system-expat \
+ --without-ensurepip
+ make -j${_maxjobs}
+}
+
+function package() {
+ make install DESTDIR="${_pkgdir}"
+ echo "Removing __pycache__ directories..."
+ find "${_pkgdir}" -name "__pycache__" | xargs rm -rf
+
+ ln -s python3 "${_pkgdir}/${_prefix}"/bin/python
+ ln -s python3-config "${_pkgdir}/${_prefix}"/bin/python-config
+ ln -s idle3 "${_pkgdir}/${_prefix}"/bin/idle
+ ln -s pydoc3 "${_pkgdir}/${_prefix}"/bin/pydoc
+ ln -s python${_basever}.1 "${_pkgdir}/${_prefix}"/share/man/man1/python.1
+ chmod 755 "${_pkgdir}/${_prefix}"/lib/libpython${_basever}m.so
+}
+
+