python: build script cleanup
* remove sed for cgi, cgi is deprecated and about to be dropped * remove CPPFLAGS/LDFLAGS. it leaks into sysconfig and builds fine without it * don't set CXX (defaults to g++ otherwise). nure sure why an absolute path is needed here and not for CC. It builds fine without it. * remove ac_cv_func_bind_textdomain_codeset override, gets detected correctly * drop LC_CTYPE, we default to utf-8 * remove EXTRA_CFLAGS, cpython supports CFLAGS since forever * remove some optdepends commented code
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
pkgbase=python
|
||||
pkgname=('python' 'python-devel')
|
||||
pkgver=3.10.10
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
_pybasever=${pkgver%.*}
|
||||
pkgdesc="Next generation of the python high-level scripting language"
|
||||
arch=('i686' 'x86_64')
|
||||
@@ -82,9 +82,6 @@ apply_patch_with_msg() {
|
||||
prepare() {
|
||||
cd "${srcdir}/Python-${pkgver}"
|
||||
|
||||
# FS#23997
|
||||
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
|
||||
|
||||
apply_patch_with_msg \
|
||||
001-3.1-enable-new-dtags.patch \
|
||||
003-3.4-select-cygwin.patch \
|
||||
@@ -125,11 +122,7 @@ prepare() {
|
||||
build() {
|
||||
cd "${srcdir}/Python-${pkgver}"
|
||||
|
||||
CPPFLAGS+=" -I/usr/include/ncursesw"
|
||||
LDFLAGS+=" -L."
|
||||
|
||||
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
|
||||
CXX=/usr/bin/g++ \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--build=${CYGWIN_CHOST} \
|
||||
@@ -143,10 +136,9 @@ build() {
|
||||
--with-system-ffi \
|
||||
--with-system-libmpdec \
|
||||
--enable-loadable-sqlite-extensions \
|
||||
--without-ensurepip \
|
||||
ac_cv_func_bind_textdomain_codeset=yes
|
||||
--without-ensurepip
|
||||
|
||||
LC_CTYPE=en_US.UTF-8 make EXTRA_CFLAGS="$CFLAGS" > >(tee make-python.log)
|
||||
make > >(tee make-python.log)
|
||||
sed -ne '/^\s*Failed to build these modules/,$ {p; /^\s*$/q42}' make-python.log
|
||||
}
|
||||
|
||||
@@ -156,13 +148,12 @@ check() {
|
||||
}
|
||||
|
||||
package_python() {
|
||||
#optdepends=('tk: for tkinter' 'sqlite')
|
||||
depends=('libbz2' 'libexpat' 'libffi' 'liblzma' 'ncurses' 'libopenssl' 'libreadline' 'mpdecimal' 'libsqlite' 'zlib')
|
||||
provides=('python3')
|
||||
replaces=('python3')
|
||||
|
||||
cd "${srcdir}/Python-${pkgver}"
|
||||
make DESTDIR="${pkgdir}" EXTRA_CFLAGS="$CFLAGS" install
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
# Why are these not done by default...
|
||||
ln -sf python3 "${pkgdir}"/usr/bin/python.exe
|
||||
|
||||
Reference in New Issue
Block a user