Skip to main content

A set of tools to relocate virtualenv (and main installation on Windows)

Project description

Build Status

virtualenv-tools-enhanced

virtualenv-tools-enhanced is a fork of virtualenv-tools3.

virtualenv-tools-enhanced

This repository contains scripts I am using for my portable environment used to develop with VSCodium. As the environmnet is portable across different plateforms and computers, I need a way to get Python and virtualenv working everywhere.

Why not virtualenv --relocatable?

For starters: because it does not work. Relocatable is very limited in what it does and it works at runtime instead of making the whole thing actually move to the new location. We ran into a ton of issues with it and it is currently in the process of being phased out.

Why not virtualenv-tools3?

Because of some lack of Windows support. Because...

Why would I want to use it?

The main reason you want to use this is simplification. No more long options, some more 'usefull' features.

Help :

usage: virtualenv_tools.py [-h] [-m] [-u UPDATE_PATH] [-b BASE_PYTHON_DIR] [-f] [-c] [-v] [path]

Update paths in a virtualenv before/after moving it or a Python installation after moving it.

positional arguments:
  path                  Virtualenv folder, default to "."
                        Executable for main update.

optional arguments:
  -h, --help            show this help message and exit
  -m, --main            Update Python home after moving it.Portable Python is bad, not recommended and not supported.But why not?Windows only
  -u UPDATE_PATH, --update-path UPDATE_PATH
                        Update the path for all required executables and helper files that are supported to the new python prefix.
                        If omitted, path argument will be used.If a virtualenv name is given and "WORKON_HOME" is set, it will updatethis virtualenv otherwise fallback to path argument.
  -b BASE_PYTHON_DIR, --base-python-dir BASE_PYTHON_DIR
                        On Windows, a directory pointing to a valid Python installation.
                        On *nux, a valid Python executable.
                        The virtualenv will load standard libraries from here.This is needed to update pyvenv.cfg with a non default installation.If omitted, the default python will be used.
  -f, --force           Continue processing even if the original path is the same as the updated path.
  -c, --clean           Clean .pyc and .pyo files which are not the same version of the Python in the virtualenv or the main installation.
  -v, --verbose         Show a listing of changes

To be able to give a virtualenv name, WORKON_HOME variable must be set
Before moving : virtualenv_tools.py -u new/path/of/venv old/path/of/venv
Before moving : virtualenv_tools.py -u new/path/of/venv old_venv
After moving and in the virtualenv : virtualenv_tools.py
After moving : virtualenv_tools.py new_venv
After moving : virtualenv_tools.py new/path/of/venv.

For main installation, python as executable
virtualenv_tools.py -m python

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

virtualenv-tools-enhanced-1.0.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

virtualenv_tools_enhanced-1.0.0-py2.py3-none-any.whl (9.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file virtualenv-tools-enhanced-1.0.0.tar.gz.

File metadata

  • Download URL: virtualenv-tools-enhanced-1.0.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for virtualenv-tools-enhanced-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5668f5fa8996c1d697cb6165e262fa852aa2349f962f3a28803416de48ab0a20
MD5 11b4ff981330bde4435a750ecac6b012
BLAKE2b-256 300969615412107b7b19ba23cf4f34e0180cb9e8903421c8a8a354b8f830c0a8

See more details on using hashes here.

File details

Details for the file virtualenv_tools_enhanced-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: virtualenv_tools_enhanced-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for virtualenv_tools_enhanced-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7ff9f462336f3a7b3413ed522ec8a1abc08ef16f9783e8d2d6f7f7087fc0231b
MD5 7961de6bf39f555b2d2dfa279f949895
BLAKE2b-256 2d1559b20f1a46bfaf7bcee7dc26c236a7aef2c8d2a52d6f3c1d64170d411343

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