venvify
Python package to turn Python installations into venv-like environments that you can activate.
Say you have the following python installation:
python_env
|- bin
| |- python3.9
|- include
|- lib
Then you can venvify it by running the following script:
venvify ~/python_env
The result:
python_env
|- bin
| |- python3.9
| |- python (symlink)
| |- python3 (symlink)
| |- activate
| |- activate.sh
| |- etc.
|- include
|- lib
Now you can source the activate file to use the environment as you would use a venv:
user@laptop: source python_env/bin/activate
(python_env) user@laptop: python -m pip install <some_package>
To undo the venvifying, simply remove the activate scripts and the symlinks from the bin directory.
Installation
All the logic of the package can be found in a single script venvify.py.
The only dependency is the venv Python standard library package.
venv should be shipped with Python 3, but can be installed with sudo apt install python3-venv.
So if you don't want to pip install, you can clone this repo and simply run venvify.py with any Python interpreter.
However if you don't mind you can:
pip install venvify
And then run the venvify command.
Use case: Blender Python environment
I made this package to make developing python scripts for Blender a bit more convenient.
Blender ships with its own Python installation.
But specifying the entire path to the Blender Python executable is tedious.
My initial solution was to add an alias bpython to my .bashrc.
This relieved the burden of typing long paths, but another problem remained.
Some Python packages come with command line entry points. For example, a package I use BlenderProc has a command blenderproc.
After installing BlenderProc into the Blender Python installation, there was no way access this command.
However, when you install such a package into a virtual environment, its commands are exposed after sourcing the created activate file.
Hence this package, which allowed me to activate the Blender Python environment and use the commands of the installed Python packages.
TODO
Maybe in the future this package could also ensure pip gets installed into the environment.
Metadata
Release files for venvify 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| venvify-0.0.2.tar.gz | 4.0 kB | Without provenance | Details for venvify-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| venvify-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for venvify-0.0.2-py3-none-any.whl |
Total release size: 8.5 kB
Release files / venvify-0.0.2.tar.gz
| Download URL | venvify-0.0.2.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc171ada5a79281f1dbcd4fad6c6d0c9d99abd1f59a48d30fc97c1758933a69a
|
|
BLAKE2b-256 checksum How to use checksums |
eb209321d79e4e4bc6cb89c864f59ab987d504c35e01afe5f4cfb9cc12093efe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
|
Release files / venvify-0.0.2-py3-none-any.whl
| Download URL | venvify-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b9f06215e982dd7e1219145f89aa070131f9f65755e96d3cf4a425afab2224d
|
|
BLAKE2b-256 checksum How to use checksums |
f566bb49e8fb2ae067d8b565904912e499af96bbc79a257647059655677018cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
|
Security for venvify 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.