Skip to content

Commit 85d92b5

Browse files
authored
Merge pull request #4268 from luarss/topic/pin-deps-orfs
chore: pin deps to SHA256 hashes via pip-compile
2 parents eb14d76 + 83e9302 commit 85d92b5

12 files changed

Lines changed: 2661 additions & 13 deletions
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
firebase-admin
2+
pyyaml
3+
tclint==0.7.0
4+
yamlfix==1.19.1

.github/requirements/requirements_lock.txt

Lines changed: 894 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/github-actions-lint-tcl.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ jobs:
1515
- name: Checkout repository
1616
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1717

18+
- uses: actions/setup-python@v6
19+
with:
20+
python-version: "3.10"
21+
1822
- name: Install Dependencies
1923
run: |
2024
python3 -m venv venv
21-
venv/bin/pip install tclint==0.7.0
25+
venv/bin/pip install -r .github/requirements/requirements_lock.txt
2226
2327
- name: Lint
2428
run: |

.github/workflows/github-actions-update-rules.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Install Python Packages
2626
run: |
2727
python3 -m venv venv
28-
venv/bin/pip install firebase-admin
28+
venv/bin/pip install -r .github/requirements/requirements_lock.txt
2929
- name: Execute Python Script Update
3030
env:
3131
CREDS_FILE: ${{ secrets.CREDS_FILE }}

.github/workflows/github-actions-yaml-test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ jobs:
2020
flow/scripts/variables.json
2121
docs/user/FlowVariables.md
2222
yamlfix.toml
23+
.github/requirements/requirements_lock.txt
24+
- uses: actions/setup-python@v6
25+
with:
26+
python-version: "3.10"
2327
- name: Install dependencies
2428
run: |
2529
python3 -m venv venv
26-
venv/bin/pip install --quiet pyyaml yamlfix==1.19.1
30+
venv/bin/pip install --quiet -r .github/requirements/requirements_lock.txt
2731
- name: Run generate-variables-docs.py
2832
run: |
2933
venv/bin/python3 flow/scripts/generate-variables-docs.py

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ version: 2
88
build:
99
os: ubuntu-22.04
1010
tools:
11-
python: "3.7"
11+
python: "3.10"
1212

1313
# Build documentation in the "docs/" directory with Sphinx
1414
sphinx:
@@ -19,4 +19,4 @@ sphinx:
1919
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
2020
python:
2121
install:
22-
- requirements: docs/requirements.txt
22+
- requirements: docs/requirements_lock.txt

docker/Dockerfile.dev

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ FROM $fromImage
88
WORKDIR /tmp/installer/etc
99

1010
COPY DependencyInstaller.sh .
11+
COPY requirements-common_lock.txt .
1112

1213
COPY InstallerOpenROAD.sh \
1314
/tmp/installer/tools/OpenROAD/etc/DependencyInstaller.sh
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
git+https://github.com/executablebooks/sphinx-external-toc.git@v0.3.1
1+
sphinx-external-toc==0.3.1
22
sphinx
33
sphinx-autobuild
44
myst-parser

docs/requirements_lock.txt

Lines changed: 673 additions & 0 deletions
Large diffs are not rendered by default.

etc/DependencyInstaller.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
set -euo pipefail
44

5-
# Make sure we are on the correct folder before beginning
5+
# Capture the script's absolute directory before any cd
66
if [[ "$OSTYPE" == "darwin"* ]]; then
7-
cd "$(dirname $(perl -e 'use Cwd "abs_path";print abs_path(shift)' $0))/../"
7+
_script_dir="$(dirname $(perl -e 'use Cwd "abs_path";print abs_path(shift)' $0))"
88
else
9-
cd "$(dirname $(readlink -f $0))/../"
9+
_script_dir="$(dirname $(readlink -f $0))"
1010
fi
1111

12+
# Make sure we are on the correct folder before beginning
13+
cd "${_script_dir}/../"
14+
1215
# package versions
1316
klayoutVersion=0.30.7
1417
if [[ "$OSTYPE" == "darwin"* ]]; then
@@ -36,23 +39,24 @@ _installPipCommon() {
3639
source /opt/rh/rh-python38/enable
3740
set -u
3841
fi
39-
local pkgs="pandas numpy firebase_admin click pyyaml yamlfix"
42+
local lockfile
43+
lockfile="${_script_dir}/requirements-common_lock.txt"
4044
if [[ "$OSTYPE" == "darwin"* ]]; then
4145
if [[ "$EUID" -eq 0 ]]; then
4246
echo "Error: Do NOT run with sudo."
4347
exit 1
4448
fi
4549
if [[ -n "${VIRTUAL_ENV:-}" ]]; then
46-
pip3 install --no-cache-dir -U $pkgs
50+
pip3 install --no-cache-dir -r "$lockfile"
4751
else
4852
echo "Error: Activate a virtual environment on macOS."
4953
exit 1
5054
fi
5155
else
5256
if [[ $(id -u) == 0 ]]; then
53-
pip3 install --no-cache-dir -U $pkgs
57+
pip3 install --no-cache-dir -r "$lockfile"
5458
else
55-
pip3 install --no-cache-dir --user -U $pkgs
59+
pip3 install --no-cache-dir --user -r "$lockfile"
5660
fi
5761
fi
5862
}

0 commit comments

Comments
 (0)