Skip to content

Commit c2de47a

Browse files
jangalda-nscnordicjm
authored andcommitted
tools: Use pip-compile-cross-platform
pip-compile does not support generating one output file for different environments (operating systems) If we run it on Linux, it drops all packages which available only onl Windows (like windows-curses). pip-compile-cross-platform passes conditional markers from input files to output one. Signed-off-by: Jan Gałda <[email protected]>
1 parent ac93ce8 commit c2de47a

File tree

5 files changed

+156
-151
lines changed

5 files changed

+156
-151
lines changed

.github/workflows/compliance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
pip3 install -U pip
3030
pip3 install -U setuptools
3131
pip3 install -U wheel
32-
grep -E "^python-magic|^junitparser|^lxml|^gitlint|^pylint|^pykwalify|^yamllint|^unidiff" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
32+
grep -E "^python-magic=|^junitparser|^lxml|^gitlint|^pylint|^pykwalify|^yamllint|^unidiff" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
3333
grep -E "^west" scripts/requirements-fixed.txt | cut -d ' ' -f '1' | xargs pip3 install -U
3434
pip3 show -f west
3535

.github/workflows/validate-pip-requirements-fixed-file.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,16 @@ jobs:
5757
# For no aparent reason it returns 1 with the same output as local.
5858
mkvirtualenv pip-fixed-venv > /dev/null 2>&1 || true
5959
workon pip-fixed-venv > /dev/null 2>&1
60-
pip3 install pip-tools > /dev/null 2>&1
61-
# Use setuptools==71.1.0 due to https://github.com/pypa/setuptools/issues/4519
62-
pip3 install setuptools==71.1.0 --upgrade
6360
64-
pip-compile \
65-
--build-isolation \
66-
--strip-extras \
67-
--annotation-style line \
68-
--allow-unsafe \
69-
--output-file $OUT_FILE \
70-
bootloader/mcuboot/scripts/requirements.txt \
71-
zephyr/scripts/requirements.txt \
72-
nrf/scripts/requirements.txt \
73-
nrf/scripts/requirements-ci.txt \
74-
nrf/scripts/requirements-extra.txt
61+
pip3 install pip-compile-cross-platform==1.4.2 --upgrade > /dev/null 2>&1
62+
pip-compile-cross-platform \
63+
bootloader/mcuboot/scripts/requirements.txt \
64+
nrf/scripts/requirements-ci.txt \
65+
nrf/scripts/requirements-extra.txt \
66+
nrf/scripts/requirements.txt \
67+
zephyr/scripts/requirements.txt \
68+
--output-file nrf/scripts/requirements-fixed.txt \
69+
--min-python-version 3.10
7570
7671
deactivate
7772
rmvirtualenv pip-fixed-venv

scripts/requirements-build.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
cbor2>=5.4.2.post1
22
clang-format
3+
click==8.1.3
34
ecdsa
45
cryptography>=42.0.4
56
imagesize>=1.2.0
67
intelhex
78
pylint
89
zcbor~=0.8.0
910
nrf-regtool~=6.0.0
11+
windows-curses; sys_platform == 'win32'
12+
unidiff

scripts/requirements-ci.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
aenum
22
bitarray
33
chardet
4-
gitlint==0.18.0
4+
gitlint==0.19.1
55
GitPython==3.1.41
66
jsonschema
77
milksnake

0 commit comments

Comments
 (0)