Metadata-Version: 2.1
Name: autoadd-bindir
Version: 1.0
Summary: Automatically add bin-dir to PATH for every process in your virtualenv.
Home-page: https://github.com/libranet/autoadd_bindir
License: MIT
Keywords: entrypoints,sitecustomize
Author: Wouter Vanden Hove
Author-email: wouter@libranet.eu
Maintainer: Wouter Vanden Hove
Maintainer-email: wouter@libranet.eu
Requires-Python: >=3.9.0,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Typing :: Typed
Requires-Dist: sitecustomize-entrypoints (>=0.1.0)
Project-URL: Bug Tracker, https://github.com/Libranet/autoadd_bindir/issues
Project-URL: Documentation, https://github.com/libranet/autoadd_bindir
Project-URL: Repository, https://github.com/libranet/autoadd_bindir
Description-Content-Type: text/markdown

[![Under Development](https://img.shields.io/badge/under-development-orange.svg)](https://github.com/cezaraugusto/github-template-guidelines) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/libranet/autoadd-bindir/blob/main/docs/license.md) [![Read the Docs](https://readthedocs.org/projects/autoadd-bindir/badge/?version=latest)](https://autoadd-bindir.readthedocs.io/en/latest/)


# Autoadd-bindir

Automatically add the bin-directory of your virtualenv to the ``PATH``-environment variable.

You no longer need to manually *activate* your virtual environment.

## How does it work?

We register the ``autoadd_bin.entrypoint()``-function to sitecustomize-module that run for every python
The function will look up ``sys.prefix`` of your python-executable and add the corresponding bin-directory
to the ``PATH``.



## Installation

Install via pip:

```bash
> bin/pip install autoadd_bindir
```

Or add to your poetry-based project:

```bash
> poetry add autoadd_bindir
```


## Validate & Usage
After installing this package there is nothing left you need to do explicitly.
We can validate the plugin works correctly b starting a python-session and checking the ``PATH``-environment-variable?

```bash
> bin/python
```

```python
>>> import os
>>> print(os.getenv("PATH"))
    "<path-to-your-virtualenv>/bin", ...
```


## Registered sitecustomize-entrypoint


The ``autoadd_bindir``-function is registered as a ``sitecustomize``-entrypoint in pyproject.toml_:

``` toml
    [tool.poetry.plugins]
    [tool.poetry.plugins."sitecustomize"]
    autoadd_bindir = "autoadd_bindir:entrypoint"
```

Sitecustomize and all its entrypoints will be executed at the start of *every* python-process.

For more information, please see [sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)




## Dependencies

 - sitecustomize-entrypoints



