[COPY] --- T2-COPYRIGHT-BEGIN --- [COPY] t2/package/*/python2/python2.desc [COPY] Copyright (C) 2004 - 2025 The T2 SDE Project [COPY] Copyright (C) 1998 - 2004 ROCK Linux Project [COPY] SPDX-License-Identifier: GPL-2.0 [COPY] --- T2-COPYRIGHT-END --- [I] The Python programming language [T] Python is an interpreted object-oriented programming language, and is [T] often compared with Tcl, Perl, Java or Scheme. [U] https://www.python.org/ [A] Stichting Mathematisch Centrum, Amsterdam, The Netherlands [M] Rene Rebe [C] base/development [F] CROSS [L] OpenSource [S] Stable [V] 2.7.18 [P] O 0--3-5---9 109.000 [CV-FLAGS] NO-MAJOR [D] 7a3a94c0431a012919318b752eeba13caca56d3c7d2b143eb32f6970 Python-2.7.18.tar.xz https://www.python.org/ftp/python/2.7.18/ python_postmake() { cat > $root/etc/profile.d/python <<-EOT export PYTHON="$root$bindir/python" EOT } runpysetup=0 var_append confopt ' ' "--enable-shared --with-threads" var_append makeinstopt ' ' -j1 var_append GCC_WRAPPER_APPEND ' ' -std=gnu17 # atstage cross && var_append confopt ' ' " --disable-ipv6" python_modules() { if pkginstalled gdbm; then sed -i 's:#gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib:gdbm gdbmmodule.c -I/usr/include -L/usr/lib:' Modules/Setup.dist fi if pkginstalled readline; then sed -i 's:#readline:readline:' Modules/Setup.dist fi if pkginstalled openssl; then sed -i 's:#SSL=/usr/local/ssl:SSL=/usr:' Modules/Setup.dist sed -i 's:#_ssl:_ssl:' Modules/Setup.dist sed -i 's:# -DUSE_SSL: -DUSE_SSL:' Modules/Setup.dist sed -i 's:# -L$(SSL): -L$(SSL):' Modules/Setup.dist fi if pkginstalled zlib; then sed -i 's:#zlib:zlib:' Modules/Setup.dist fi } # We can savely ignore this dependencies. var_append flistrfilter '|' ".*: /usr/lib.*/python.*/site-packages/.*" atstage toolchain || hook_add preconf 5 "python_modules" atstage toolchain || hook_add postmake 5 "python_postmake" # hardcoded paths fix_python_libdir() { sed -i "s,/lib\([[:blank:]]\),/${libdir##*/}\1,g" Modules/Setup.dist ln -svnf ../lib/python${ver:0:3} $root$libdir/python${ver:0:3} } [[ $libdir = *lib ]] || hook_add preconf 9 "fix_python_libdir" # toolchain if atstage toolchain; then export LDFLAGS="-Wl,-rpath,${root}${libdir}" hook_add postmake 5 'cp Parser/pgen $root$bindir/python-pgen' fi # cross-compiling if atstage cross; then var_append configcache ' ' ac_cv_buggy_getaddrinfo=no var_append configcache ' ' ac_cv_file__dev_ptmx=yes var_append configcache ' ' ac_cv_file__dev_ptc=no var_insert CFLAGS ' ' -I$root/usr/include var_insert LDFLAGS ' ' "-L$root/usr/lib -L$root/lib" var_insert LDFLAGS ' ' -L$builddir/Python-$ver var_append configprefix ' ' "CFLAGS=\"$CFLAGS\"" var_append configprefix ' ' "LDFLAGS=\"$LDFLAGS\"" fi