Metadata-Version: 2.1
Name: venv-pack2
Version: 0.6.0
Summary: Package virtual environments for redistribution
Home-page: https://github.com/mrmathematica/venv-pack
Maintainer: mrmathematica
Maintainer-email: mrmathematica@yahoo.com
License: BSD
Project-URL: Source Code, https://github.com/mrmathematica/venv-pack
Keywords: venv packaging
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Archiving :: Packaging
Classifier: Topic :: System :: Software Distribution
Classifier: Topic :: Software Development :: Build Tools
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# Venv-Pack

This is based on [venv-pack](https://github.com/jcrist/venv-pack) but with lots of improvements added by
[mrmathematica](https://github.com/mrmathematica/). It has Windows support. Bin/Scripts generated by venv will
work out-of-box.

Venv-pack is a command-line tool for packaging virtual environments for distribution. This is useful for deploying code
in a consistent environment.

Supports virtual environments created using python3/venv. Venv is part of the python standard library.

## Install from source

venv-pack is available on github and can always be installed from source.

```
pip install git+https://github.com/mrmathematica/venv-pack.git
```

## Install from pypi

venv-pack is available on pypi as `venv-pack2`.

```
pip install venv-pack2
```

## Command-line Usage

One common use case is packing an environment on one machine to distribute to other machines as part of a deployment
process.

### On the source machine

Create venv, and then upgrade pip + setuptools first:
```
python -m venv venv
venv\Scripts\activate
python -m pip install -U pip setuptools
```

Python generates Windows .exe file such as pip.exe on the fly, so on Windows there is restriction that you want to fix a
version of pip and setuptools at the beginning and stick with it. If needed, re-create new venv from a lock file. See
[pip-tools](https://github.com/jazzband/pip-tools).   

Install all your python packages, for example
```
pip install -r requirements.txt
```

Pack the current environment into my_env.zip
```
venv-pack -o env.zip
```

Pack an environment located at an explicit path into my_env.zip
```
venv-pack -p explicit\path\to\env -o env.zip 
```

### On the target machine

Unpack environment into directory `my_env`
```
md my_env
python -m zipfile -e venv.zip my_env\ 
```

All features of venv should keep working from my_env folder. 


