Skip to main content

Convienience wrapper for common pyenv operations.

Project description

PyEnv Tool

A convienience wrapper for common pyenv operations.

This tool is designed for Python developers who primarily use pyenv to keep a complete array of up-to-date Python executables installed. This tool should be considered porcelain to pyenv's plumbing, but NOT as a complete interface replacement. Many pyenv operations will still need to be perfomed via pyenv's interface.

Operational Goal

pyenvtool is built around the concept of a "main" version which is composed of a major and minor version, but ignores any bugfix, prerelease, or build information. That is, 3.11.0, 3.11-dev, and 3.11.2 are all the same "main" version of 3.11.

pyenvtool operates with the goal that any existing main version of Python should be left on the system, but updated if possible, and any supported main versions of Python should be installed if absent.

  • For every main version that is supported and not present on the system:

    • The latest bugfix version is installed
  • For every main version that is supported and present on the system:

    • The latest bugfix version is installed if not already present
    • Bugfix versions prior to the latest are uninstalled, unless the --keep-bugfix option is provided
  • For every main version that is unsupported and present on the system:

    • The latest bugfix version is installed if not already present, unless the --remove-minor option is provided
    • Bugfix versions prior to the latest are uninstalled, unless the --keep-bugfix option is provided

Usage

Complete help documentation can be found by running pyenvtool --help, the following is only a quick-start introduction.

The primary usage will be the pyenvtool upgrade command, which will perform whatever pyenv operations are required to leave the system with a complete array of up-to-date Python executables. By default, this command will:

  • Scrape python.org to determine which Python versions are currently supported
  • Update pyenv with the latest list of available versions (and possibly also update the pyenv tool itself).
  • Update any installed Python versions to the latest bugfix version (by installing the new version and uninstalling any old versions)
  • Install any supported Python versions, at the latest bugfix, which are not currently installed
  • Uninstall any unsupported Python versions EXCEPT for the latest bugfix

This behavior can be changed with the following command arguments:

--keep-bugfix/-k Keep any existing python versions even if a newer bugfix is available.

--remove-minor/-r Remove ALL unsupported python versions, including the latest bugfix.

--no-update Do not update the pyenv tool or the list of available versions

--dry-run/-n Check the system and determine the necessary changes, but do not execute them.

Installation

To install pyenvtool, run the following command. python3 should point to whatever Python binary you want to install it under, version 3.8 or later.

python3 -m pip install pyenvtool

Prerequisites

This tool requires pyenv to be installed and available in the path. The pyenv project can be found at https://github.com/pyenv/pyenv along with documentation and installation instructions.

Credits

This package was created with Cookiecutter and the zanfar/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyenvtool-1.0.0.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyenvtool-1.0.0-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file pyenvtool-1.0.0.tar.gz.

File metadata

  • Download URL: pyenvtool-1.0.0.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.10.102.1-microsoft-standard-WSL2

File hashes

Hashes for pyenvtool-1.0.0.tar.gz
Algorithm Hash digest
SHA256 50e88280381e85f90de8a10aa5a42a3281fa9db5d19456e3b59909b296626017
MD5 855e2a32d93e2472b8e9beaabbaaa5d7
BLAKE2b-256 caab6633bd2128a7d5879dfb35417d2063d56b55fbccda0994931ee29f184ee2

See more details on using hashes here.

File details

Details for the file pyenvtool-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyenvtool-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.10.102.1-microsoft-standard-WSL2

File hashes

Hashes for pyenvtool-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 854dcb4f386993ff7f39cb1afc82bfcad5954f71ced0e81efe9ef8c33d2f1d72
MD5 83cd687677c4276c1812304d33cc9af9
BLAKE2b-256 6f9e93d97b42711b9600d196ef68632ce96766060d382a64297ef0ec48a3c754

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page