Skip to content

take into account that no Python dependency may be provided when setting $Python3_ROOT_DIR in configure step of PythonPackage easyblock#4079

Merged
laraPPr merged 1 commit intoeasybuilders:developfrom
boegel:20260226134835_new_pr_pythonpackage
Feb 26, 2026
Merged

take into account that no Python dependency may be provided when setting $Python3_ROOT_DIR in configure step of PythonPackage easyblock#4079
laraPPr merged 1 commit intoeasybuilders:developfrom
boegel:20260226134835_new_pr_pythonpackage

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Feb 26, 2026

(created using eb --new-pr)

fix for bug that was introduced in:

  File "/home/example/easybuild/easyblocks/generic/pythonpackage.py", line 923, in configure_step
    env.setvar("Python3_ROOT_DIR", get_software_root('Python'))
  File "/home/example/easybuild/tools/environment.py", line 92, in setvar
    os.environ[key] = value
  File "/usr/lib64/python3.9/os.py", line 684, in __setitem__
    value = self.encodevalue(value)
  File "/usr/lib64/python3.9/os.py", line 756, in encode
    raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not NoneType

In some cases, there is no Python dependency. One example is vsc-mympirun-5.5.0.eb

…ing $Python3_ROOT_DIR in configure step of PythonPackage easyblock
@boegel boegel added the bug fix label Feb 26, 2026
@boegel boegel added this to the next release (5.2.2?) milestone Feb 26, 2026
@boegel boegel requested a review from laraPPr February 26, 2026 12:49
Copy link
Copy Markdown
Contributor

@laraPPr laraPPr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Feb 26, 2026

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS vsc-mympirun-5.5.0.eb

  • SUCCESS matplotlib-3.7.2-gfbf-2023a.eb

Build succeeded for 2 out of 2 (total: 4 mins 36 secs) (2 easyconfigs in total)
node4009.donphan.os - Linux RHEL 9.6, x86_64, Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz (cascadelake), 1 x NVIDIA NVIDIA A2, 580.95.05, Python 3.9.21
See https://gist.github.com/boegel/289cebeba8d8d70edf67ad16c876518f for a full test report.

Copy link
Copy Markdown
Member

@ocaisa ocaisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@laraPPr
Copy link
Copy Markdown
Contributor

laraPPr commented Feb 26, 2026

Going in, thanks @boegel!

@laraPPr laraPPr merged commit c0b3a89 into easybuilders:develop Feb 26, 2026
22 checks passed
@boegel boegel deleted the 20260226134835_new_pr_pythonpackage branch February 26, 2026 20:42
@boegel boegel changed the title take into account that no Python dependency may be provided when setting $Python3_ROOT_DIR in configure step of PythonPackage easyblock take into account that no Python dependency may be provided when setting $Python3_ROOT_DIR in configure step of PythonPackage easyblock Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants