diff --git a/README.md b/README.md index 7e88997..4670962 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,79 @@ -python2-tk -=============== +# python2-tk -Sources for python2 and a precompiled version for use on newer systems \ No newline at end of file + +Since `python2` has long been deprecated, new `linux` distributions are +no longer making it available in their repositories. + +Unfortunately, some useful tools never got migrated to `python3` and +have therefore been made orphans. + +This repo may fix this for you. Included is the source code for +`python 2.7.18` and well as a tarball of a precompiled version that +can just be untarred from `/` to install in `/usr/local/`. It was +built in a docker image running on Linux Mint 22 and then transfered +(via this tarball) into the base system. This seems to work fine, at +least as of this writing. + +## Installation + +**WARNING**: + + **`python2` has not been supported for many years. Installing it on + your system as described below may expose you to security + compromise. Use wisely and at your own risk!!!** + + +To install: + +``` + +# become root +sudo su - + +# make a backup, just in case +tar -czvf original-usr-local.tar.gz /usr/local/ + +# install it +cd / +tar -xvf python2-tk.tar.gz + +exit + +``` + +You should now have a running python2.7 with tkinter support +in `/usr/local/bin`. + + +## Rebuilding From Source + +It may be necessary to rebuild this from time to time as +the base system gets upgraded or rebuilt. The easiest way +to do this in a docker container or VM running the base +system version of your choice. + +Once you have that running, the rebuild looks like this: + + +``` + +# become root +sudo su - + +# install the supporting packages and libraries +apt install --fix-missing build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev + +# untar the source code +tar -xvf Python-2.7.18.tgz +cd Python-2.7.18 + +# configure and build python2 +./configure --enable-optimizations --with-tk +make + +# install it at an alternate location +make altinstall + +exit + +```