Changeset 16842 in niluje


Ignore:
Timestamp:
Feb 9, 2020, 11:18:00 PM (3 weeks ago)
Author:
NiLuJe
Message:

Kindle Hacks:

  • We've moved to Python 3.8, handle it properly during install/uninstall
Location:
Configs/trunk/Kindle
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • Configs/trunk/Kindle/Hacks/Python/CREDITS

    r16307 r16842  
    55    (http://tukaani.org/xz/)
    66
    7   python2.7 & python3.7: Python, Copyright (C) 2001-2019 Python Software Foundation,
    8 licensed under the PSF license agreement for Python 2.7.16 (http://docs.python.org/2/license.html) & Python 3.7.3 (https://docs.python.org/3/license.html).
     7  python2.7 & python3.8: Python, Copyright (C) 2001-2020 Python Software Foundation,
     8licensed under the PSF license agreement for Python 2.7.17 (http://docs.python.org/2/license.html) & Python 3.8.1 (https://docs.python.org/3/license.html).
    99(http://www.python.org)
    1010
  • Configs/trunk/Kindle/Hacks/Python/src/install.sh

    r16173 r16842  
    1212
    1313HACKNAME="python"
     14
     15otautils_update_progressbar
     16
     17# Remove Python 3.7 symlinks
     18logmsg "I" "uninstall" "" "removing python 3.7 symlinks"
     19LIST="/usr/bin/python3 /usr/bin/python3.7 /usr/bin/python3.7m"
     20for var in ${LIST} ; do
     21    if [ -L "${var}" ] ; then
     22        logmsg "I" "uninstall" "" "symbolic link ${var} -> $( readlink ${var} ) exists, deleting..."
     23        PYBIN="$( readlink ${var} )"
     24        if [ "${PYBIN}" == "/mnt/us/python3/bin/python3.7" ] ; then
     25            rm -f "${var}"
     26        else
     27            logmsg "I" "uninstall" "" "symbolic link is not ours, skipping..."
     28        fi
     29    fi
     30done
    1431
    1532otautils_update_progressbar
     
    130147# Generate Python 3 bytecode (standard lib)
    131148logmsg "I" "install" "" "generating bytecode (std lib) ..."
    132 /mnt/us/python3/bin/python3.7 -m compileall -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data|test|tests' /mnt/us/python3/lib/python3.7
     149/mnt/us/python3/bin/python3.8 -m compileall -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data|test|tests' /mnt/us/python3/lib/python3.8
    133150_RET=$?
    134151if [ ${_RET} -ne 0 ] ; then
     
    140157
    141158logmsg "I" "install" "" "generating optimized bytecode (std lib) ..."
    142 /mnt/us/python3/bin/python3.7 -O -m compileall -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data|test|tests' /mnt/us/python3/lib/python3.7
     159/mnt/us/python3/bin/python3.8 -O -m compileall -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data|test|tests' /mnt/us/python3/lib/python3.8
    143160_RET=$?
    144161if [ ${_RET} -ne 0 ] ; then
     
    150167
    151168logmsg "I" "install" "" "generating really optimized bytecode (std lib) ..."
    152 /mnt/us/python3/bin/python3.7 -OO -m compileall -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data|test|tests' /mnt/us/python3/lib/python3.7
     169/mnt/us/python3/bin/python3.8 -OO -m compileall -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data|test|tests' /mnt/us/python3/lib/python3.8
    153170_RET=$?
    154171if [ ${_RET} -ne 0 ] ; then
     
    161178# Generate Python bytecode (third-party modules)
    162179logmsg "I" "install" "" "generating bytecode (3rd party) ..."
    163 /mnt/us/python3/bin/python3.7 -m compileall -f -x badsyntax /mnt/us/python3/lib/python3.7/site-packages
     180/mnt/us/python3/bin/python3.8 -m compileall -f -x badsyntax /mnt/us/python3/lib/python3.8/site-packages
    164181_RET=$?
    165182if [ ${_RET} -ne 0 ] ; then
     
    171188
    172189logmsg "I" "install" "" "generating optimized bytecode (3rd party) ..."
    173 /mnt/us/python3/bin/python3.7 -O -m compileall -f -x badsyntax /mnt/us/python3/lib/python3.7/site-packages
     190/mnt/us/python3/bin/python3.8 -O -m compileall -f -x badsyntax /mnt/us/python3/lib/python3.8/site-packages
    174191_RET=$?
    175192if [ ${_RET} -ne 0 ] ; then
     
    181198
    182199logmsg "I" "install" "" "generating really optimized bytecode (3rd party) ..."
    183 /mnt/us/python3/bin/python3.7 -OO -m compileall -f -x badsyntax /mnt/us/python3/lib/python3.7/site-packages
     200/mnt/us/python3/bin/python3.8 -OO -m compileall -f -x badsyntax /mnt/us/python3/lib/python3.8/site-packages
    184201_RET=$?
    185202if [ ${_RET} -ne 0 ] ; then
     
    192209# Symlinks setup...
    193210logmsg "I" "install" "" "installing python 3 symlinks"
    194 LIST="/usr/bin/python3 /usr/bin/python3.7 /usr/bin/python3.7m"
     211LIST="/usr/bin/python3 /usr/bin/python3.8"
    195212for var in ${LIST} ; do
    196213    if [ -L "${var}" ] ; then
     
    201218        else
    202219            logmsg "I" "install" "" "creating ${var} symbolic link"
    203             ln -fs "/mnt/us/python3/bin/python3.7" "${var}"
     220            ln -fs "/mnt/us/python3/bin/python3.8" "${var}"
    204221        fi
    205222    fi
  • Configs/trunk/Kindle/Hacks/Python/src/uninstall.sh

    r16159 r16842  
    4040otautils_update_progressbar
    4141
    42 # Remove Python 3 symlinks
    43 logmsg "I" "uninstall" "" "removing python 3 symlinks"
     42# Remove Python 3.7 symlinks
     43logmsg "I" "uninstall" "" "removing python 3.7 symlinks"
    4444LIST="/usr/bin/python3 /usr/bin/python3.7 /usr/bin/python3.7m"
    4545for var in ${LIST} ; do
     
    4848        PYBIN="$( readlink ${var} )"
    4949        if [ "${PYBIN}" == "/mnt/us/python3/bin/python3.7" ] ; then
     50            rm -f "${var}"
     51        else
     52            logmsg "I" "uninstall" "" "symbolic link is not ours, skipping..."
     53        fi
     54    fi
     55done
     56
     57otautils_update_progressbar
     58
     59# Remove Python 3.8 symlinks
     60logmsg "I" "uninstall" "" "removing python 3.8 symlinks"
     61LIST="/usr/bin/python3 /usr/bin/python3.8"
     62for var in ${LIST} ; do
     63    if [ -L "${var}" ] ; then
     64        logmsg "I" "uninstall" "" "symbolic link ${var} -> $( readlink ${var} ) exists, deleting..."
     65        PYBIN="$( readlink ${var} )"
     66        if [ "${PYBIN}" == "/mnt/us/python3/bin/python3.8" ] ; then
    5067            rm -f "${var}"
    5168        else
  • Configs/trunk/Kindle/Kobo_Hacks/KoboStuff/README

    r16755 r16842  
    9797
    9898
    99   python2.7 & python3.7: Python, Copyright (C) 2001-2019 Python Software Foundation,
    100 licensed under the PSF license agreement for Python 2.7.16 (http://docs.python.org/2/license.html) & Python 3.7.3 (https://docs.python.org/3/license.html).
     99  python2.7 & python3.8: Python, Copyright (C) 2001-2020 Python Software Foundation,
     100licensed under the PSF license agreement for Python 2.7.17 (http://docs.python.org/2/license.html) & Python 3.8.1 (https://docs.python.org/3/license.html).
    101101(http://www.python.org)
    102102
  • Configs/trunk/Kindle/Kobo_Hacks/KoboStuff/build/build-updates.sh

    r16729 r16842  
    5353
    5454# Python 3
    55 for my_bin in python3.7m python3.7 python3 ; do
    56         ln -sf /mnt/onboard/.niluje/python3/bin/python3.7 usr/bin/${my_bin}
     55for my_bin in python3.8 python3 ; do
     56        ln -sf /mnt/onboard/.niluje/python3/bin/python3.8 usr/bin/${my_bin}
    5757done
    5858
  • Configs/trunk/Kindle/Kobo_Hacks/KoboStuff/uninstall/usr/local/stuff/bin/self-destruct.sh

    r16729 r16842  
    5050done
    5151
    52 # Python 3
     52# Python 3.7
    5353check_and_rm_link "/usr/bin/python3.7" "/mnt/onboard/.niluje/python3/bin"
    5454# Take care of the other Python symlinks if things went well..
    5555if [ $? -eq 0 ] ; then
    5656        for my_py_sym in python3.7m python3 ; do
     57                [ -L "/usr/bin/${my_py_sym}" ] && rm -f "/usr/bin/${my_py_sym}" >> "${KOBOSTUFF_LOG}" 2>&1
     58        done
     59fi
     60
     61# Python 3.8
     62check_and_rm_link "/usr/bin/python3.8" "/mnt/onboard/.niluje/python3/bin"
     63# Take care of the other Python symlinks if things went well..
     64if [ $? -eq 0 ] ; then
     65        for my_py_sym in python3 ; do
    5766                [ -L "/usr/bin/${my_py_sym}" ] && rm -f "/usr/bin/${my_py_sym}" >> "${KOBOSTUFF_LOG}" 2>&1
    5867        done
  • Configs/trunk/Kindle/Touch_Hacks/Python/CREDITS

    r16307 r16842  
    55(http://tukaani.org/xz/)
    66
    7   python2.7 & python3.7: Python, Copyright (C) 2001-2019 Python Software Foundation,
    8 licensed under the PSF license agreement for Python 2.7.16 (http://docs.python.org/2/license.html) & Python 3.7.3 (https://docs.python.org/3/license.html).
     7  python2.7 & python3.8: Python, Copyright (C) 2001-2020 Python Software Foundation,
     8licensed under the PSF license agreement for Python 2.7.17 (http://docs.python.org/2/license.html) & Python 3.8.1 (https://docs.python.org/3/license.html).
    99(http://www.python.org)
    1010
  • Configs/trunk/Kindle/Touch_Hacks/Python/src/install.sh

    r16173 r16842  
    1212[ -f ./libotautils5 ] && source ./libotautils5
    1313
     14
     15otautils_update_progressbar
     16
     17# Remove Python 3.7 symlinks
     18logmsg "I" "uninstall" "" "removing python 3.7 symlinks"
     19LIST="/usr/bin/python3 /usr/bin/python3.7 /usr/bin/python3.7m"
     20for var in ${LIST} ; do
     21    if [ -L "${var}" ] ; then
     22        logmsg "I" "uninstall" "" "symbolic link ${var} -> $( readlink ${var} ) exists, deleting..."
     23        PYBIN="$( readlink ${var} )"
     24        if [ "${PYBIN}" == "/mnt/us/python3/bin/python3.7" ] ; then
     25            rm -f "${var}"
     26        else
     27            logmsg "I" "uninstall" "" "symbolic link is not ours, skipping..."
     28        fi
     29    fi
     30done
    1431
    1532otautils_update_progressbar
     
    130147# Generate Python 3 bytecode (standard lib)
    131148logmsg "I" "install" "" "generating bytecode (std lib) ..."
    132 /mnt/us/python3/bin/python3.7 -m compileall -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data|test|tests' /mnt/us/python3/lib/python3.7
     149/mnt/us/python3/bin/python3.8 -m compileall -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data|test|tests' /mnt/us/python3/lib/python3.8
    133150_RET=$?
    134151if [ ${_RET} -ne 0 ] ; then
     
    140157
    141158logmsg "I" "install" "" "generating optimized bytecode (std lib) ..."
    142 /mnt/us/python3/bin/python3.7 -O -m compileall -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data|test|tests' /mnt/us/python3/lib/python3.7
     159/mnt/us/python3/bin/python3.8 -O -m compileall -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data|test|tests' /mnt/us/python3/lib/python3.8
    143160_RET=$?
    144161if [ ${_RET} -ne 0 ] ; then
     
    150167
    151168logmsg "I" "install" "" "generating really optimized bytecode (std lib) ..."
    152 /mnt/us/python3/bin/python3.7 -OO -m compileall -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data|test|tests' /mnt/us/python3/lib/python3.7
     169/mnt/us/python3/bin/python3.8 -OO -m compileall -f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data|test|tests' /mnt/us/python3/lib/python3.8
    153170_RET=$?
    154171if [ ${_RET} -ne 0 ] ; then
     
    161178# Generate Python bytecode (third-party modules)
    162179logmsg "I" "install" "" "generating bytecode (3rd party) ..."
    163 /mnt/us/python3/bin/python3.7 -m compileall -f -x badsyntax /mnt/us/python3/lib/python3.7/site-packages
     180/mnt/us/python3/bin/python3.8 -m compileall -f -x badsyntax /mnt/us/python3/lib/python3.8/site-packages
    164181_RET=$?
    165182if [ ${_RET} -ne 0 ] ; then
     
    171188
    172189logmsg "I" "install" "" "generating optimized bytecode (3rd party) ..."
    173 /mnt/us/python3/bin/python3.7 -O -m compileall -f -x badsyntax /mnt/us/python3/lib/python3.7/site-packages
     190/mnt/us/python3/bin/python3.8 -O -m compileall -f -x badsyntax /mnt/us/python3/lib/python3.8/site-packages
    174191_RET=$?
    175192if [ ${_RET} -ne 0 ] ; then
     
    181198
    182199logmsg "I" "install" "" "generating really optimized bytecode (3rd party) ..."
    183 /mnt/us/python3/bin/python3.7 -OO -m compileall -f -x badsyntax /mnt/us/python3/lib/python3.7/site-packages
     200/mnt/us/python3/bin/python3.8 -OO -m compileall -f -x badsyntax /mnt/us/python3/lib/python3.8/site-packages
    184201_RET=$?
    185202if [ ${_RET} -ne 0 ] ; then
     
    192209# Symlinks setup...
    193210logmsg "I" "install" "" "installing python 3 symlinks"
    194 LIST="/usr/bin/python3 /usr/bin/python3.7 /usr/bin/python3.7m"
     211LIST="/usr/bin/python3 /usr/bin/python3.8"
    195212for var in ${LIST} ; do
    196213    if [ -L "${var}" ] ; then
     
    201218        else
    202219            logmsg "I" "install" "" "creating ${var} symbolic link"
    203             ln -fs "/mnt/us/python3/bin/python3.7" "${var}"
     220            ln -fs "/mnt/us/python3/bin/python3.8" "${var}"
    204221        fi
    205222    fi
  • Configs/trunk/Kindle/Touch_Hacks/Python/src/uninstall.sh

    r16159 r16842  
    4040otautils_update_progressbar
    4141
    42 # Remove Python 3 symlinks
    43 logmsg "I" "uninstall" "" "removing python 3 symlinks"
     42# Remove Python 3.7 symlinks
     43logmsg "I" "uninstall" "" "removing python 3.7 symlinks"
    4444LIST="/usr/bin/python3 /usr/bin/python3.7 /usr/bin/python3.7m"
    4545for var in ${LIST} ; do
     
    4848        PYBIN="$( readlink ${var} )"
    4949        if [ "${PYBIN}" == "/mnt/us/python3/bin/python3.7" ] ; then
     50            rm -f "${var}"
     51        else
     52            logmsg "I" "uninstall" "" "symbolic link is not ours, skipping..."
     53        fi
     54    fi
     55done
     56
     57otautils_update_progressbar
     58
     59# Remove Python 3.8 symlinks
     60logmsg "I" "uninstall" "" "removing python 3.8 symlinks"
     61LIST="/usr/bin/python3 /usr/bin/python3.8"
     62for var in ${LIST} ; do
     63    if [ -L "${var}" ] ; then
     64        logmsg "I" "uninstall" "" "symbolic link ${var} -> $( readlink ${var} ) exists, deleting..."
     65        PYBIN="$( readlink ${var} )"
     66        if [ "${PYBIN}" == "/mnt/us/python3/bin/python3.8" ] ; then
    5067            rm -f "${var}"
    5168        else
Note: See TracChangeset for help on using the changeset viewer.