Browse Source

python(2): fix bin/ and share/man/

Justification for the changes:

$ dpkg -S smtpd.py
python: /data/data/com.termux/files/usr/lib/python3.6/smtpd.py
python2: /data/data/com.termux/files/usr/lib/python2.7/smtpd.py
python2: /data/data/com.termux/files/usr/bin/smtpd.py

$ ls -l $PREFIX/bin/python-config
lrwxrwxrwx    1 u0_a312  u0_a312         14 May 18 01:09 /data/data/com.termux/files/usr/bin/python-config -> python2-config

$ ls -l $PREFIX/share/man/man1/python2.1
lrwxrwxrwx    1 u0_a312  u0_a312          9 May 18 01:09 /data/data/com.termux/files/usr/share/man/man1/python2.1 -> python2.1

$ dpkg -S bin/2to3
python: /data/data/com.termux/files/usr/bin/2to3
python: /data/data/com.termux/files/usr/bin/2to3-3.6

$ dpkg -S bin/pydoc
python2: /data/data/com.termux/files/usr/bin/pydoc
python: /data/data/com.termux/files/usr/bin/pydoc3.6
python: /data/data/com.termux/files/usr/bin/pydoc3
android-5
Tom Yan 7 years ago
committed by Fredrik Fornwall
parent
commit
5ccf28cf8c
  1. 4
      packages/python/build.sh
  2. 15
      packages/python2/build.sh

4
packages/python/build.sh

@ -52,7 +52,9 @@ termux_step_pre_configure() {
termux_step_post_make_install () {
(cd $TERMUX_PREFIX/bin
ln -sf python${_MAJOR_VERSION}m python${_MAJOR_VERSION}
ln -sf python3 python)
ln -sf python3 python
ln -sf python3-config python-config
ln -sf pydoc3 pydoc)
(cd $TERMUX_PREFIX/share/man/man1
ln -sf python3.1 python.1)

15
packages/python2/build.sh

@ -28,9 +28,12 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_buggy_getaddrinfo=no"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_little_endian_double=yes"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --build=$TERMUX_BUILD_TUPLE --with-system-ffi --without-ensurepip"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-unicode=ucs4"
# Let 2to3 be in the python3 package:
TERMUX_PKG_RM_AFTER_INSTALL="bin/2to3"
TERMUX_PKG_RM_AFTER_INSTALL="
bin/smtpd.py
bin/python
bin/python-config
share/man/man1/python.1
"
termux_step_host_build () {
# We need a host-built Parser/pgen binary, copied into cross-compile build in termux_step_post_configure() below
@ -63,8 +66,10 @@ termux_step_pre_configure() {
termux_step_post_make_install () {
# Avoid file clashes with the python (3) package:
mv $TERMUX_PREFIX/share/man/man1/{python.1,python2.1}
rm $TERMUX_PREFIX/bin/python
(cd $TERMUX_PREFIX/bin
mv 2to3 2to3-${_MAJOR_VERSION}
mv pydoc pydoc${_MAJOR_VERSION}
ln -sf pydoc${_MAJOR_VERSION} pydoc2)
# Restore path which termux_step_host_build messed with
export PATH=$TERMUX_ORIG_PATH
}

Loading…
Cancel
Save