https://github.com/hmasdev/penv
penv: venv-based python portable environment
https://github.com/hmasdev/penv
embeddable-python portable python venv
Last synced: about 2 months ago
JSON representation
penv: venv-based python portable environment
- Host: GitHub
- URL: https://github.com/hmasdev/penv
- Owner: hmasdev
- License: mit
- Created: 2024-03-31T14:29:07.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-23T15:24:37.000Z (about 2 years ago)
- Last Synced: 2024-12-29T14:34:53.064Z (over 1 year ago)
- Topics: embeddable-python, portable, python, venv
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `penv`: `venv`-based Python Portable Environment





`penv` is a Python package that provides a portable environment for Python projects.
It is based on the built-in `venv` module, which is available in Python 3.9 and later.
`penv` is designed to be a lightweight alternative to more complex tools like `virtualenv` and `conda`.
## Requirements
- Windows
- Python >= 3.9
## Installation
```bash
pip install git+https://github.com/hmasdev/penv
```
## Usage
Almost same as `venv` module.
```bash
python -m penv .penv
```
Here is the help of `penv` command.
```bash
$ python -m penv --help
usage: penv [-h] [--clear] [--upgrade] [--without-pip] [--prompt PROMPT] [--python-version PYTHON_VERSION] [--platform-arch PLATFORM_ARCH] [--cache-dir CACHE_DIR] [--log-level LOG_LEVEL] ENV_DIR [ENV_DIR ...]
Creates virtual Python environments in one or more target directories.
positional arguments:
ENV_DIR A directory to create the environment in.
options:
-h, --help show this help message and exit
--clear Delete the contents of the environment directory if it already exists, before environment creation.
--upgrade Upgrade the environment directory to use this version of Python, assuming Python has been upgraded in-place.
--without-pip Skips installing or upgrading pip in the virtual environment (pip is bootstrapped by default)
--prompt PROMPT Provides an alternative prompt prefix for this environment.
--python-version PYTHON_VERSION
The version of Python to use
--platform-arch PLATFORM_ARCH
The platform architecture to use
--cache-dir CACHE_DIR
The directory to cache the embeddable python
--log-level LOG_LEVEL
The logging level
Once an environment has been created, you may wish to activate it, e.g. by sourcing an activate script in its bin directory.
```
## Contribution
1. Fork this repository
- [https://github.com/hmasdev/penv/fork](https://github.com/hmasdev/penv/fork)
2. Clone your forked repository
```bash
git clone https://github.com/{YOUR_GITHUB_ID}/penv
cd penv
```
3. Setup the development environment
```bash
python -m venv .venv
.venv\\Scripts\\activate.bat
pip install -e .[dev]
```
4. Create a new branch like `feature/add-something`
```bash
git checkout -b {BRANCH_NAME}
```
5. Make your changes and add tests
6. Commit your changes
```bash
git add .
git commit -m "Add something"
```
7. Push your changes to your forked repository
```bash
git push -u origin {BRANCH_NAME}
```
8. Create a pull request
- [https://github.com/hmasdev/penv/compare](https://github.com/hmasdev/penv/compare)
## License
[MIT](./LICENSE)
## Author
- [hmasdev](https://github.com/hmasdev)