Bug 2183519
Summary: | %pyproject_buildrequires swamped with "ValueError: I/O operation on closed file."s with setuptools 67.5.1 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> |
Component: | pyproject-rpm-macros | Assignee: | Miro Hrončok <mhroncok> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | cstratak, maxwell, mhroncok, pviktori, python-packagers-sig |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | pyproject-rpm-macros-1.7.0-1.fc39 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-04-18 09:10:15 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 2144132 |
Description
Miro Hrončok
2023-03-31 13:19:50 UTC
Reverting https://src.fedoraproject.org/rpms/pyproject-rpm-macros/c/85fc41174dbdbc26fd3b456c08d6c15dc623e91e?branch=rawhide seems to make it work, but that's not the desired outcome. I think I know where the problem is. First, we call get_requires_for_build_wheel hook in hook_call() and setuptools stores a reference to our faked stdout in the logger. At the end of this hook_call(), our faked stdout is closed. Later, we call prepare_metadata_for_build_wheel hook in another hook_call() and setuptools attempts to log to the faked stdout stored in the logger. That is however the already closed faked stdout from the previous hook_call() invocation. Sharing one faked stdout across multiple hook_call()s seems to do the trick, but I need to figure out how to do that nicely. At this point it might be worth it to switch to writing to file, and use `>&2` & `cat` in the macro. I actually have a fix ready, testing it. Here is my proposed fix: https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/369 But yeah, switching to writing to file, and use `>&2` & `cat` in the macro is still an option. And here is the alternative with >&2 and cat: https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/370 FEDORA-2023-28b5d794fc has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-28b5d794fc FEDORA-2023-28b5d794fc has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report. |