Skip to content

Commit

Permalink
tools: Use pip-compile-cross-platform
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jangalda-nsc committed Oct 15, 2024
1 parent 7783dec commit ac7a561
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 150 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/validate-pip-requirements-fixed-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,16 @@ jobs:
# For no aparent reason it returns 1 with the same output as local.
mkvirtualenv pip-fixed-venv > /dev/null 2>&1 || true
workon pip-fixed-venv > /dev/null 2>&1
pip3 install pip-tools > /dev/null 2>&1
# Use setuptools==71.1.0 due to https://github.com/pypa/setuptools/issues/4519
pip3 install setuptools==71.1.0 --upgrade
pip-compile \
--build-isolation \
--strip-extras \
--annotation-style line \
--allow-unsafe \
--output-file $OUT_FILE \
bootloader/mcuboot/scripts/requirements.txt \
zephyr/scripts/requirements.txt \
nrf/scripts/requirements.txt \
nrf/scripts/requirements-ci.txt \
nrf/scripts/requirements-extra.txt
pip3 install pip-compile-cross-platform==1.4.2 --upgrade > /dev/null 2>&1
pip-compile-cross-platform \
bootloader/mcuboot/scripts/requirements.txt \
nrf/scripts/requirements-ci.txt \
nrf/scripts/requirements-extra.txt \
nrf/scripts/requirements.txt \
zephyr/scripts/requirements.txt \
--output-file nrf/scripts/requirements-fixed.txt \
--min-python-version 3.10
deactivate
rmvirtualenv pip-fixed-venv
3 changes: 3 additions & 0 deletions scripts/requirements-build.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
cbor2>=5.4.2.post1
clang-format
click==8.1.3
ecdsa
cryptography>=42.0.4
imagesize>=1.2.0
intelhex
pylint
zcbor~=0.8.0
nrf-regtool~=6.0.0
windows-curses; sys_platform == 'win32'
unidiff
2 changes: 1 addition & 1 deletion scripts/requirements-ci.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
aenum
bitarray
chardet
gitlint==0.18.0
gitlint==0.19.1
GitPython==3.1.41
jsonschema
milksnake
Expand Down
Loading

0 comments on commit ac7a561

Please sign in to comment.