@@ -38,61 +38,79 @@ You also specify the exact poetry, pdm, and uv versions:
3838- The ` NIXPACKS_PDM_VERSION ` environment variable
3939- The ` NIXPACKS_UV_VERSION ` environment variable or ` uv ` in a ` .tool-versions ` file
4040
41+ You can specify a particular package manager, to override the lockfile-based choice, by setting the
42+ ` NIXPACKS_PYTHON_PACKAGE_MANAGER ` environment variable to one of the following:
43+
44+ - ` auto ` to choose based on the available lockfiles (default)
45+ - ` requirements ` to install using ` pip ` from ` requirements.txt `
46+ - ` setuptools ` to install using ` pip ` with ` build ` and ` setuptools `
47+ - ` poetry ` to install using ` poetry ` from ` poetry.lock `
48+ - ` pdm ` to install using ` pdm ` from ` pdm.lock `
49+ - ` uv ` to install using ` uv ` from ` uv.lock `
50+ - ` pipenv ` to install with ` pipenv ` from ` Pipfile ` (if a ` Pipfile.lock ` is present it will be used)
51+ - ` skip ` to not install a package
52+
4153## Install
4254
4355If ` requirements.txt `
4456
45- ```
57+ ``` shell
4658pip install -r requirements.txt
4759```
4860
4961If ` pyproject.toml `
5062
51- ```
63+ ``` shell
5264pip install --upgrade build setuptools && pip install .
5365```
5466
5567If ` pyproject.toml ` (w/ ` poetry.lock ` )
5668
57- ```
69+ ``` shell
5870poetry install --no-dev --no-interactive --no-ansi
5971```
6072
6173If ` pyproject.toml ` (w/ ` pdm.lock ` )
6274
63- ```
75+ ``` shell
6476pdm install --prod
6577```
6678
6779If ` Pipfile ` (w/ ` Pipfile.lock ` )
6880
69- ```
81+ ``` shell
7082PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy
7183```
7284
73- if ` uv .lock` :
85+ If ` Pipfile ` (without ` Pipfile .lock` )
7486
87+ ``` shell
88+ PIPENV_VENV_IN_PROJECT=1 pipenv install --skip-lock
7589```
90+
91+ if ` uv.lock ` :
92+
93+ ``` shell
7694uv sync --no-dev --frozen
7795```
7896
7997## Start
8098
8199if Django Application
82100
83- ```
101+ ``` shell
84102python manage.py migrate && gunicorn {app_name}.wsgi
85103```
86104
87105if ` pyproject.toml `
88106
89- ```
107+ ``` shell
90108python -m {module}
91109```
92110
93111Otherwise
94112
95- ```
113+ ``` shell
96114python main.py
97115```
98116
0 commit comments