Skip to content

Commit bb28e8d

Browse files
nordicjmcarlescufi
authored andcommitted
scripts: Update to use python-dotenv and update doc build
This brings in changes needed by the update to the zephyr module script Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
1 parent 75216a2 commit bb28e8d

7 files changed

Lines changed: 24 additions & 16 deletions

File tree

.github/workflows/compliance.yml

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

doc/_extensions/options_from_kconfig.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from docutils import statemachine
1010
from docutils.parsers.rst import directives
11+
from dotenv import load_dotenv
1112
from sphinx.application import Sphinx
1213
from sphinx.util.docutils import SphinxDirective
1314

@@ -69,12 +70,15 @@ def run(self):
6970
kconfig_module_dirs = ""
7071
for module in modules:
7172
kconfig_module_dirs += zephyr_module.process_kconfig_module_dir(module.project,
72-
module.meta)
73+
module.meta,
74+
False)
7375

7476
import tempfile
75-
f = tempfile.NamedTemporaryFile('w', encoding="utf-8")
76-
os.environ["KCONFIG_ENV_FILE"] = f.name
77+
f = tempfile.NamedTemporaryFile('w', encoding="utf-8", delete=False)
7778
f.write(kconfig_module_dirs)
79+
f.close()
80+
load_dotenv(f.name)
81+
os.unlink(f.name)
7882

7983
import kconfiglib
8084
self._monkey_patch_kconfiglib(kconfiglib)
@@ -124,7 +128,6 @@ def run(self):
124128

125129
lines = statemachine.string2lines('\n'.join(lines))
126130
self.state_machine.insert_input(lines, path)
127-
f.close()
128131
return []
129132

130133

doc/nrf/installation/recommended_versions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Building and running applications, samples, and tests
233233
* - packaging
234234
- :ncs-tool-version:`PACKAGING_VERSION`
235235
* - progress
236-
- :ncs-tool-version:`PROGRESS_VERSION`
236+
- :ncs-tool-version:`TQDM_VERSION`
237237
* - pyelftools
238238
- :ncs-tool-version:`PYELFTOOLS_VERSION`
239239
* - pylint

doc/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ sphinx_markdown_tables # | | | X | | |
2727
sphinxcontrib-mscgen # | X | | | | X | | |
2828
sphinxcontrib-plantuml>=0.27 # | | | | | | X | |
2929
west>=1.0.0 # | | | | | | | X |
30+
python-dotenv # | | X | | | | | |

scripts/requirements-build.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ nrf-regtool==9.2.1
1414
windows-curses; sys_platform == 'win32'
1515
unidiff
1616
pycryptodome==3.21.0
17+
python-dotenv

scripts/requirements-ci.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ qrcode
1414
stringcase==1.2.0
1515
toml
1616
wget
17+
python-dotenv

scripts/requirements-fixed.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ attrs==25.3.0 ; python_version >= "3.12" and python_version < "4.0"
1515
banal==1.0.6 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
1616
beautifulsoup4==4.13.4 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
1717
beautifulsoup4[chardet]==4.13.4 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
18-
binaryornot==0.4.4 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
18+
binaryornot==0.4.4 ; python_version >= "3.12" and python_version < "4.0"
1919
bitarray==3.6.0 ; python_version >= "3.12" and python_version < "4.0"
20-
boolean-py==4.0 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
20+
boolean-py==4.0 ; python_version >= "3.12" and python_version < "4.0"
2121
canopen==2.3.0 ; python_version >= "3.12" and python_version < "4.0"
2222
capstone==4.0.2 ; python_version >= "3.12" and python_version < "4.0"
2323
cbor2==5.6.5 ; python_version >= "3.12" and python_version < "4.0"
@@ -61,7 +61,7 @@ graphviz==0.20.3 ; python_version >= "3.12" and python_version < "4.0"
6161
grpcio-tools==1.66.1 ; python_version >= "3.12" and python_version < "4.0"
6262
grpcio==1.73.0 ; python_version >= "3.12" and python_version < "4.0"
6363
hidapi==0.14.0.post4 ; python_version >= "3.12" and python_version < "4.0" and platform_system != "Linux"
64-
html5lib-modern==1.2 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
64+
html5lib-modern==1.2 ; python_version >= "3.12" and python_version < "4.0"
6565
html5lib==1.1 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
6666
humanfriendly==10.0 ; python_version >= "3.12" and python_version < "4.0"
6767
idna==3.10 ; python_version >= "3.12" and python_version < "4.0"
@@ -80,18 +80,17 @@ jsonschema-specifications==2025.4.1 ; python_version >= "3.12" and python_versio
8080
jsonschema==4.24.0 ; python_version >= "3.12" and python_version < "4.0"
8181
jsonstreams==0.6.0 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
8282
junit2html==31.0.2 ; python_version >= "3.12" and python_version < "4.0"
83-
junitparser==3.2.0 ; python_version >= "3.12" and python_version < "4.0"
83+
junitparser==4.0.2 ; python_version >= "3.12" and python_version < "4.0"
8484
lark==1.2.2 ; python_version >= "3.12" and python_version < "4.0"
8585
libusb-package==1.0.26.1 ; python_version >= "3.12" and python_version < "4.0"
8686
libusb==1.0.28.post2 ; python_version >= "3.12" and python_version < "4.0"
87-
license-expression==30.3.1 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
87+
license-expression==30.3.1 ; python_version >= "3.12" and python_version < "4.0"
8888
lpc-checksum==3.0.0 ; python_version >= "3.12" and python_version < "4.0"
8989
lxml==5.4.0 ; python_version >= "3.12" and python_version < "4.0"
9090
markupsafe==3.0.2 ; python_version >= "3.12" and python_version < "4.0"
9191
matter-idl==1.0.0 ; python_version >= "3.12" and python_version < "4.0"
9292
mccabe==0.7.0 ; python_version >= "3.12" and python_version < "4.0"
9393
milksnake==0.1.6 ; python_version >= "3.12" and python_version < "4.0"
94-
mock==5.1.0 ; python_version >= "3.12" and python_version < "4.0"
9594
more-itertools==10.7.0 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
9695
msgpack==1.0.5 ; python_version >= "3.12" and python_version < "4.0" and platform_system != "Windows"
9796
mypy-extensions==1.1.0 ; python_version >= "3.12" and python_version < "4.0"
@@ -119,7 +118,6 @@ plugincode==32.0.0 ; python_version >= "3.12" and python_version < "4.0" and pla
119118
ply==3.11 ; python_version >= "3.12" and python_version < "4.0"
120119
polib==1.2.0 ; python_version >= "3.12" and python_version < "4.0"
121120
prettytable==3.16.0 ; python_version >= "3.12" and python_version < "4.0"
122-
progress==1.6 ; python_version >= "3.12" and python_version < "4.0"
123121
protobuf==5.29.5 ; python_version >= "3.12" and python_version < "4.0"
124122
psutil==7.0.0 ; python_version >= "3.12" and python_version < "4.0"
125123
publicsuffix2==2.20191221 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
@@ -145,6 +143,8 @@ pyserial==3.5 ; python_version >= "3.12" and python_version < "4.0"
145143
pytest==8.4.0 ; python_version >= "3.12" and python_version < "4.0"
146144
python-can==4.4.2 ; python_version >= "3.12" and python_version < "4.0"
147145
python-dateutil==2.9.0.post0 ; python_version >= "3.12" and python_version < "4.0"
146+
python-debian==1.0.1 ; python_version >= "3.12" and python_version < "4.0"
147+
python-dotenv==1.1.1 ; python_version >= "3.12" and python_version < "4.0"
148148
python-magic-bin==0.4.14 ; python_version >= "3.12" and python_version < "4.0" and sys_platform == "win32"
149149
python-magic==0.4.27 ; python_version >= "3.12" and python_version < "4.0" and sys_platform != "win32"
150150
python-stdnum==2.1 ; python_version >= "3.12" and python_version < "4.0"
@@ -153,11 +153,12 @@ pyusb==1.3.1 ; python_version >= "3.12" and python_version < "4.0"
153153
pywin32==306 ; platform_system == "Windows" and platform_python_implementation == "CPython" and python_version >= "3.12" and python_version < "4.0"
154154
pyyaml==6.0.2 ; python_version >= "3.12" and python_version < "4.0"
155155
qrcode==8.2 ; python_version >= "3.12" and python_version < "4.0"
156-
rdflib==7.1.0 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
156+
rdflib==7.1.0 ; python_version >= "3.12" and python_version < "4.0"
157157
referencing==0.36.2 ; python_version >= "3.12" and python_version < "4.0"
158158
regex==2024.11.6 ; python_version >= "3.12" and python_version < "4.0"
159159
requests==2.32.4 ; python_version >= "3.12" and python_version < "4.0"
160160
requests[use-chardet-on-py3]==2.32.4 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
161+
reuse==5.0.2 ; python_version >= "3.12" and python_version < "4.0"
161162
rpds-py==0.26.0 ; python_version >= "3.12" and python_version < "4.0"
162163
ruamel-yaml-clib==0.2.8 ; platform_python_implementation == "CPython" and python_version < "3.13" and python_version >= "3.12"
163164
ruamel-yaml==0.18.6 ; python_version >= "3.12" and python_version < "4.0"
@@ -171,7 +172,7 @@ six==1.17.0 ; python_version >= "3.12" and python_version < "4.0"
171172
smmap==5.0.2 ; python_version >= "3.12" and python_version < "4.0"
172173
sortedcontainers==2.4.0 ; python_version >= "3.12" and python_version < "4.0"
173174
soupsieve==2.7 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
174-
spdx-tools==0.7.0a3 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
175+
spdx-tools==0.7.0a3 ; python_version >= "3.12" and python_version < "4.0"
175176
sphinx-lint==1.0.0 ; python_version >= "3.12" and python_version < "4.0"
176177
stringcase==1.2.0 ; python_version >= "3.12" and python_version < "4.0"
177178
svada==2.2.0 ; python_version >= "3.12" and python_version < "4.0"
@@ -187,13 +188,14 @@ typing-extensions==4.14.1 ; python_version >= "3.12" and python_version < "4.0"
187188
unidiff==0.7.5 ; python_version >= "3.12" and python_version < "4.0"
188189
urllib3==2.5.0 ; python_version >= "3.12" and python_version < "4.0"
189190
urlpy==0.5 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
191+
vermin==1.6.0 ; python_version >= "3.12" and python_version < "4.0"
190192
wcwidth==0.2.13 ; python_version >= "3.12" and python_version < "4.0"
191193
webencodings==0.5.1 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
192194
west==1.4.0 ; python_version >= "3.12" and python_version < "4.0"
193195
wget==3.2 ; python_version >= "3.12" and python_version < "4.0"
194196
windows-curses==2.4.0 ; python_version >= "3.12" and python_version < "4.0" and sys_platform == "win32"
195197
wrapt==1.17.2 ; python_version >= "3.12" and python_version < "4.0"
196-
xmltodict==0.14.2 ; python_version >= "3.12" and python_version < "4.0" and platform_machine == "x86_64"
198+
xmltodict==0.14.2 ; python_version >= "3.12" and python_version < "4.0"
197199
yamllint==1.35.1 ; python_version >= "3.12" and python_version < "4.0"
198200
zcbor==0.8.1 ; python_version >= "3.12" and python_version < "4.0"
199201
zipp==3.23.0 ; python_version >= "3.12" and python_version < "4.0"

0 commit comments

Comments
 (0)