Skip to content

A pyenv plugin, to make package cli, at runtime, using SAME python version when you install it.

Notifications You must be signed in to change notification settings

loynoir/pyenv-shim-version-lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brief

A pyenv plugin, to make package cli, at runtime, using SAME python version when you install it. Aka static shim.

Pain Point Solved

$ env \
    PYENV_VERSION=2.7.10/envs/some-outdated-cli \
    pip install some-outdated-cli
$ export PYENV_VERSION=2.7.10/envs/some-outdated-cli
$ some-outdated-clisome-outdated-cli --help

Everytime call it, need to somehow setup environment.

Install

Recommend, using with pyenv-virtualenv.

$ git clone \
    https://github.com/loynoir/pyenv-shim-version-lock.git \
    $(pyenv root)/plugins/pyenv-shim-version-lock

Usage

Here is an exmaple using with pyenv-virtualenv

$ env \
    PYENV_SHIM_VERSION_LOCK=y \
    PYENV_VERSION=2.7.10/envs/some-outdated-cli \
    pip install some-outdated-cli
# some-outdated-cli will auto under 2.7.10
$ some-outdated-cli --help

Compact

When PYENV_SHIM_VERSION_LOCK is not set or is empty, generate 100% same shim.

$ env \
    pip install some-NORMAL-cli
$ env \
    PYENV_SHIM_VERSION_LOCK= \
    pip install some-NORMAL-cli

Directory Structure

etc/pyenv.d/rehash/envs.bash | main code

src/index.sh | library code

test/index.test.sh | test library for bash and zsh

script/ | extended github/scripts-to-rule-them-all

License

MIT.

About

A pyenv plugin, to make package cli, at runtime, using SAME python version when you install it.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages