Skip to content
/ penv Public

penv: venv-based python portable environment

License

Notifications You must be signed in to change notification settings

hmasdev/penv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

penv: venv-based Python Portable Environment

GitHub top language GitHub tag (latest SemVer) GitHub GitHub last commit

Scheduled Test

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

pip install git+https://github.com/hmasdev/penv

Usage

Almost same as venv module.

python -m penv .penv

Here is the help of penv command.

 $ 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

  2. Clone your forked repository

    git clone https://github.com/{YOUR_GITHUB_ID}/penv
    cd penv
  3. Setup the development environment

    python -m venv .venv
    .venv\\Scripts\\activate.bat
    pip install -e .[dev]
  4. Create a new branch like feature/add-something

    git checkout -b {BRANCH_NAME}
  5. Make your changes and add tests

  6. Commit your changes

    git add .
    git commit -m "Add something"
  7. Push your changes to your forked repository

    git push -u origin {BRANCH_NAME}
  8. Create a pull request

License

MIT

Author

About

penv: venv-based python portable environment

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages