Skip to content

Commit 741dc1e

Browse files
committed
fix: include python in nixpack
1 parent 8cce1a7 commit 741dc1e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

nixpacks.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,33 @@
33
NPM_CONFIG_UPDATE_NOTIFIER = 'false'
44
NPM_CONFIG_FUND = 'false'
55

6+
# Python configuration
7+
PYTHONUNBUFFERED = '1'
8+
PYTHONDONTWRITEBYTECODE = '1'
9+
POETRY_VERSION = '1.4.2' # Optional: specify Poetry version if you're using it
10+
PYTHON_VERSION = '3.11' # Specify your desired Python version
11+
12+
[phases.setup]
13+
nixPkgs = [
14+
'python311', # Python 3.11
15+
'python311Packages.pip',
16+
'python311Packages.setuptools',
17+
'python311Packages.wheel',
18+
]
19+
620
[phases.caddy]
721
dependsOn = ['setup']
822
nixpkgsArchive = 'ba913eda2df8eb72147259189d55932012df6301'
923
nixPkgs = ['caddy']
1024

25+
[phases.install]
26+
dependsOn = ['setup']
27+
cmds = [
28+
'python -m pip install --upgrade pip',
29+
# Add your pip install commands here, for example:
30+
# 'pip install -r requirements.txt'
31+
]
32+
1133
[phases.fmt]
1234
dependsOn = ['caddy']
1335
cmds = ['caddy fmt --overwrite Caddyfile']

0 commit comments

Comments
 (0)