Skip to content

Commit 5ddfac4

Browse files
committed
docs: add docs on python providers page
1 parent c40a5ac commit 5ddfac4

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

docs/pages/docs/providers/python.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

4355
If `requirements.txt`
4456

45-
```
57+
```shell
4658
pip install -r requirements.txt
4759
```
4860

4961
If `pyproject.toml`
5062

51-
```
63+
```shell
5264
pip install --upgrade build setuptools && pip install .
5365
```
5466

5567
If `pyproject.toml` (w/ `poetry.lock`)
5668

57-
```
69+
```shell
5870
poetry install --no-dev --no-interactive --no-ansi
5971
```
6072

6173
If `pyproject.toml` (w/ `pdm.lock`)
6274

63-
```
75+
```shell
6476
pdm install --prod
6577
```
6678

6779
If `Pipfile` (w/ `Pipfile.lock`)
6880

69-
```
81+
```shell
7082
PIPENV_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
7694
uv sync --no-dev --frozen
7795
```
7896

7997
## Start
8098

8199
if Django Application
82100

83-
```
101+
```shell
84102
python manage.py migrate && gunicorn {app_name}.wsgi
85103
```
86104

87105
if `pyproject.toml`
88106

89-
```
107+
```shell
90108
python -m {module}
91109
```
92110

93111
Otherwise
94112

95-
```
113+
```shell
96114
python main.py
97115
```
98116

0 commit comments

Comments
 (0)