Skip to content

d99kris/tenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tenv

Linux Mac
Linux macOS

Tenv - toggle python virtual environment - is a simple tool to toggle enabling/disabling a python virtual environment.

Example Usage

~$ tenv
(.venv) ~$ pip3 install spacy
Collecting spacy
...
(.venv) ~$ tenv
~$ 

Supported Platforms

Tenv is primarily developed and tested on Linux, but basic functionality should work in macOS as well. Current version has been tested on:

  • macOS Sonoma 14.5
  • Ubuntu 22.04 LTS

Installation

Download the source code:

git clone https://github.com/d99kris/tenv && cd tenv

Generate Makefile and build:

mkdir -p build && cd build && cmake .. && make -s

Optionally install in system:

sudo make install

Optionally add alias to simplify usage, by adding the following line in ~/.bashrc (Linux) or ~/.bash_profile (Mac):

alias tenv=". `which tenv`"

Usage

General usage syntax:

. `which tenv`
. `which tenv` <path>
. `which tenv` --help
. `which tenv` --version

Options:

<path> optionally specify virtual environment directory name

--help display this help and exit

--version
       output version information and exit

Technical Details

Tenv test suite can be run using these commands:

mkdir -p build && cd build && cmake .. && make -s && ctest --output-on-failure

License

Tenv is distributed under the MIT license. See LICENSE file.

Keywords

toggle, virtualenv.