-
Notifications
You must be signed in to change notification settings - Fork 7
/
lock_dev_venv.sh
executable file
·22 lines (22 loc) · 1.06 KB
/
lock_dev_venv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
if [ "$1" != "--skip-lock" ]; then
pdm lock --dev --platform=manylinux_2_17_x86_64
pdm lock --dev --append --platform=musllinux_1_1_x86_64
pdm lock --dev --append --platform=windows_amd64
pdm lock --dev --append --platform=windows_arm64
pdm lock --dev --append --platform=macos_x86_64
pdm lock --dev --append --platform=macos_arm64
fi
# Allow bootstrapping `pdm` in CI environments
# with the command `pip install --upgrade -r ci-bootstrap-requirements.txt`
ci_bootstrap_file="ci-bootstrap-requirements.txt"
pdm export --dev --no-default --group bootstrap -o "$ci_bootstrap_file"
echo "Exported $ci_bootstrap_file"
# Also support passing the CI version pins as constraints to any `pip install` command
ci_constraints_file="ci-constraints.txt"
pdm export --dev --no-extras -o "$ci_constraints_file"
echo "Exported $ci_constraints_file"
# Export the docs build dependencies for the sphinx build
docs_requirements_file="docs/requirements.txt"
pdm export --dev --self --no-hashes -o "$docs_requirements_file"
echo "Exported $docs_requirements_file"