Skip to content

Commit

Permalink
Remove EXTERNALLY-MANAGED and add pipx
Browse files Browse the repository at this point in the history
  • Loading branch information
hason committed Mar 13, 2024
1 parent 652e640 commit f3bc10a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
3 changes: 2 additions & 1 deletion python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ RUN ln -s /usr/bin/python3 /usr/bin/python; \
ln -s /usr/bin/python3-config /usr/bin/python-config;

RUN mkdir "$PIP_CACHE_DIR" && chmod a+rwx "$PIP_CACHE_DIR" \
&& apk add python3 && python3 -m ensurepip --upgrade \
&& apk add python3 py3-pip && if [ "$version" = "3.11" ]; then apk add pipx; fi \
&& rm -rf /usr/lib/python*/EXTERNALLY-MANAGED \
&& pip install -U pip setuptools wheel \
&& clean

Expand Down
36 changes: 19 additions & 17 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,32 @@ programming language.
Configuration by environment variables
--------------------------------------

- `VENV_PATH` - Path to a virtual environment that will be activated after the
start.
- `PIP_CACHE_DIR` (default `/pip-cache`) - Path to directory with pip cache.
- `PIP_NO_COMPILE` (default 1)
- `PIPENV_VENV_IN_PROJECT` (default 1)
- `VENV_PATH` - Path to a virtual environment that will be activated after the
start.
- `PIP_CACHE_DIR` (default `/pip-cache`) - Path to directory with pip cache.
- `PIP_NO_COMPILE` (default 1)
- `PIPENV_VENV_IN_PROJECT` (default 1)

Utilities
---------

- `pyclean` - Remove all `.pyc`, `.pyo` and `__pycache__` files from directory
(default `/`).
- [micropipenv](https://pypi.org/project/micropipenv/) - A lightweight wrapper
for pip to support requirements.txt, Pipenv and Poetry lock files or
converting them to pip-tools compatible output.
- `pyclean` - Remove all `.pyc`, `.pyo` and `__pycache__` files from directory
(default `/`).
- [pipx](https://pipx.pypa.io) - Install and Run Python Applications in Isolated
Environments.
- [micropipenv](https://pypi.org/project/micropipenv/) - A lightweight wrapper
for pip to support requirements.txt, Pipenv and Poetry lock files or
converting them to pip-tools compatible output.

Packaging
---------

- [twine](https://github.com/pypa/twine) - Utilities for interacting with PyPI
- [pipenv](https://pipenv.pypa.io) - Python Dev Workflow for Humans
- [poetry](https://python-poetry.org/) - Python packaging and dependency
management made easy
- [flit](https://flit.readthedocs.io)- Simple way to put Python packages and
modules on PyPI
- [twine](https://github.com/pypa/twine) - Utilities for interacting with PyPI
- [pipenv](https://pipenv.pypa.io) - Python Dev Workflow for Humans
- [poetry](https://python-poetry.org/) - Python packaging and dependency
management made easy
- [flit](https://flit.readthedocs.io)- Simple way to put Python packages and
modules on PyPI

uWSGI
-----
Expand Down Expand Up @@ -72,4 +74,4 @@ Tags
Related images
--------------

- [PyInstaller](https://github.com/minidocks/pyinstaller)
- [PyInstaller](https://github.com/minidocks/pyinstaller)

0 comments on commit f3bc10a

Please sign in to comment.