Skip to content

Conversation

@neeraj9
Copy link

@neeraj9 neeraj9 commented Nov 28, 2025

Description

make_generated_files.py used subprocess with python command to execute generated scripts. This do not respect the virtual environment. If we dont do this then dependencies installed within virtual environment are not available and this script fails.

Traceback (most recent call last):
  File "D:\code\source\mbedtls\framework\scripts\generate_test_cert_macros.py", line 15, in <module>
    import jinja2
ModuleNotFoundError: No module named 'jinja2'
Traceback (most recent call last):
  File "D:\code\source\mbedtls\framework\scripts\make_generated_files.py", line 295, in <module>
    sys.exit(main())
             ^^^^^^
  File "D:\code\source\mbedtls\framework\scripts\make_generated_files.py", line 292, in main
    make_generated_files(generation_scripts)
  File "D:\code\source\mbedtls\framework\scripts\make_generated_files.py", line 208, in make_generated_files
    subprocess.run([generation_script.exe, str(generation_script.script)], check=True)
  File "D:\Python\Python312\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python', 'framework\\scripts\\generate_test_cert_macros.py']' returned non-zero exit status 1.

PR checklist

Please add the numbers (or links) of the associated pull requests for consuming branches. You can omit branches where this pull request is not needed.

  • TF-PSA-Crypto PR provided # | not required because: I dont know if this applies
  • development PR provided # | not required because: I dont know if this applies
  • 3.6 PR provided # | not required because: I dont know if this applies

Notes for the submitter

Please refer to the contributing guidelines, especially the
checklist for PR contributors.

Help make review efficient:

  • Multiple simple commits
    • please structure your PR into a series of small commits, each of which does one thing
  • Avoid force-push
    • please do not force-push to update your PR - just add new commit(s)
  • See our Guidelines for Contributors for more details about the review process.

make_generated_files.py used subprocess with python command to execute generated scripts. This do not respect the virtual environment.
If we dont do this then dependencies installed within virtual environment are not available and this script fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant