Repository navigation
Conversation
| self.cfg.update('configopts', '--with-tzpath=' + tzdata) | ||
| # also fix the datetime tester, which has a hardcoded path to /usr/share/zoneinfo | ||
| datetimetester_file = os.path.join('Lib', 'test', 'datetimetester.py') | ||
| apply_regex_substitutions(datetimetester_file, [("zoneroot = '/usr/share/zoneinfo'", f"zoneroot = '{tzdata}'")]) |
There was a problem hiding this comment.
Shouldn't this be done in upstream easybuild, in the EasyBlock (probably conditional on if a sysroot is configured)?
There was a problem hiding this comment.
Good point. Probably that would be better, though it would also require more checks (are these files really available etc). Shall I open an issue on the easyblocks repo, and meanwhile we use this hook?
There was a problem hiding this comment.
There's already quite a bit of sysroot-related patching in https://github.com/easybuilders/easybuild-easyblocks/blob/develop/easybuild/easyblocks/p/python.py#L545. Let me try to add this.
There was a problem hiding this comment.
Done in easybuilders/easybuild-easyblocks#4280, so we can probably close this PR.
|
Closing in favor of an upstream solution in EasyBuild easybuilders/easybuild-easyblocks#4280 |
This should fix EESSI/software-layer#1888 (comment).
Looks like this is being caused by Python using timezone data from
/usr/share/zoneinfo, which means that the tests will be run using those files from the build container. However, glibc is configured to use the ones from the compat layer, and apparently it causes some mixup in the Python tests. The build containers were recently updated to the most recent Debian version and most up-to-date package versions, so it has very up-to-date timezone data now, while the compat layer hasn't been updated for a while.This PR fixes things by adding
--with-tzpathto our Python builds. This option can take a list of paths, and the default is:So I'm prepending our compat layer dir to it (to hopefully keep the system stuff as fallback). It's also patch a test, since it uses a hardcoded path to
/usr/share/zoneinfohere: https://github.com/python/cpython/blob/v3.14.2/Lib/test/datetimetester.py#L6414.