~groctel/local-python

A simple tool to manage locally-installed Python versions
first: Base implementation, README and LICENCE

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~groctel/local-python
read/write
git@git.sr.ht:~groctel/local-python

You can also use your local clone with git send-email.

#local-python

A simple tool to manage locally-installed Python versions.

#Dependencies

You will need a Lua interpreter in your system. The script also relies on curl and is designed to run on POSIX systems.

#Installation

Move local-python to ~/.local/bin/local-python if you want to.

The script relies on ~/.local/bin/ being added on your path with higher precedence than /usr/bin. Be sure to include a line analogous to the following in your shellrc (e.g. ~/.bashrc):

export PATH="~/.local/bin:$PATH"

#Configuration

You can configure a couple of options by directly modifying the script:

  • Installer.BIN_PATH: Directory in your $PATH where a python executable linking to a locally installed python executable will be found.
    • Default: $HOME/.local/bin
  • Installer.PYTHON_PATH: Directory where all locally installed python executables will be installed.

#Usage

Run local-python without arguments to find about each mode. For example, you can install and set Python 3.8.16 with this call:

local-python install 3.8.16
local-python set 3.8.16

Any arguments to pass to install after the version will be passed to make. For example, this will install Python 3.10.2 with 8 threads:

local-python install 3.10.2 -j8
Do not follow this link