Bug 2090007
| Summary: | Make %py3_dist respect %python3_pkgversion | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Maxwell G <maxwell> |
| Component: | python-rpm-macros | Assignee: | Miro Hrončok <mhroncok> |
| Status: | CLOSED ERRATA | QA Contact: | Lukáš Zachar <lzachar> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | --- | CC: | carl, mhroncok, pviktori, python-maint, rhel-cs-apps-subsystem-qe, torsava |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-rpm-macros-3-42.el8 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-08 09:42:24 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: | |||
Maxwell, could you please review https://git.centos.org/rpms/python-rpm-macros/pull-request/1 ? (In reply to Miro Hrončok from comment #1) > Maxwell, could you please review > https://git.centos.org/rpms/python-rpm-macros/pull-request/1 ? I left a comment[1]. Thanks for fixing this! [1]: https://git.centos.org/rpms/python-rpm-macros/pull-request/1#comment-1114 `%pytest` does not respect `%python3_pkgversion`, either, as `%__pytest` is hardcoded to `/usr/bin/pytest-3`. This makes it so `%pytest` does not work with versions of pytest other than python3-pytest, as python3{8,9}-pytest provide /usr/bin/pytest-3.{8,9}. It looks like this was already solved in Fedora: https://src.fedoraproject.org/rpms/python-rpm-macros/c/02536540768555dde6d675935db45df81bcab7bf. I was going to suggest redefining `%__pytest` to `%{__python3} -m pytest`, but I'm not sure if that would cause problems with `%__python3` being set to platform-python by default.
Please let me know if I need to open a new bug for this.
(In reply to Maxwell G from comment #4) > `%pytest` does not respect `%python3_pkgversion`, either, as `%__pytest` is > hardcoded to `/usr/bin/pytest-3`. This makes it so `%pytest` does not work > with versions of pytest other than python3-pytest, as python3{8,9}-pytest > provide /usr/bin/pytest-3.{8,9}. It looks like this was already solved in > Fedora: > https://src.fedoraproject.org/rpms/python-rpm-macros/c/ > 02536540768555dde6d675935db45df81bcab7bf. I was going to suggest redefining > `%__pytest` to `%{__python3} -m pytest`, but I'm not sure if that would > cause problems with `%__python3` being set to platform-python by default. > > Please let me know if I need to open a new bug for this. - %pytest is redefined in python3X-rpm-macros - `%{__python3} -m pytest` cannot be used (I wish it could) due to different default sys.path - to backport https://src.fedoraproject.org/rpms/python-rpm-macros/c/02536540768555dde6d675935db45df81bcab7bf yes, please open another bugzilla (In reply to Miro Hrončok from comment #6) > - %pytest is redefined in python3X-rpm-macros It looks %__pytest is redefined in python39-rpm-macros[1] but not python38-rpm-macros[2]. In any case, I will open a new bugzilla to set %__pytest dynamically in python3-rpm-macros. That seems like a better approach anyways. [1]: https://git.centos.org/rpms/python39/blob/c8s-stream-3.9/f/SOURCES/macros.python39#_3 [2]: https://git.centos.org/rpms/python38/blob/c8s-stream-3.8/f/SOURCES/macros.python38 See the commit message for how I tested this. Am I correct in assuming that this is targeted for RHEL 8.7? Currently, it is. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (python-rpm-macros bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:7572 |
Description of problem: %py3_dist does not respect the value of `%python3_pkgversion`. Version-Release number of selected component (if applicable): python-rpm-macros-3-41.el8.noarch How reproducible: When `%python3_pkgversion` has a value other than 3. Steps to Reproduce: 1. rpm -D 'python3_pkgversion 38' -E '%{py3_dist pyyaml}' Actual results: python3dist(pyyaml) Expected results: python3.8dist(pyyaml) Additional info: This was already fixed in Fedora in https://src.fedoraproject.org/rpms/python-rpm-macros/c/638f809f4c15b8b14dfc1f6f8c3c08b0d2ba0b70, but it would have to be modified to account for the fact that there are no dots in `%python3_pkgversion` on RHEL.