Bug 2176393
Summary: | %pyproject_build_lib does not work with hatchling backend | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Elliott Sales de Andrade <quantum.analyst> |
Component: | pyproject-rpm-macros | Assignee: | Miro Hrončok <mhroncok> |
Status: | CLOSED CANTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | maxwell, mhroncok, pviktori, python-packagers-sig |
Target Milestone: | --- | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-05-16 17:05:00 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: |
Description
Elliott Sales de Andrade
2023-03-08 10:01:11 UTC
Could you please open a WIP pull request for python-jupyter-console or attach a spec file to this bugzilla so it's easier for me to reproduce the problem? Have you figured out what value of PYTHONPATH is needed (a.k.a. where are the files), or not yet? (Setting FutureFeature because the macros are synced across all branches, but I recognize this as a bug.) Here's my WIP PR to reproduce https://src.fedoraproject.org/rpms/python-jupyter-console/pull-request/7 Bad news: The files appear nowhere in the build directory. hatchling seems to simply pack them into the wheel from $PWD. Despite pyproject-rpm-macros being a general build-backend tool, it seems the %{pyproject_build_lib} value is setuptools-specific. We might want to reconsider the name of the macro as well as the location in pyproject-rpm-macros. It was added there when pip defaulted to out-of-tree builds and it needed to include .pyproject-builddir -- this is no longer the case on Fedora 37+. On Fedora 37, PYTHONPATH=$PWD/build/lib.%{python3_platform}-cpython-%{python3_version_nodots} is good enough for setuptools whether or not pyproject-rpm-macros are used. I'll start a discussion on python-devel. A solution for python-jupyter-console is to use PYTHONPATH=$PWD instead of PYTHONPATH="%{pyproject_build_lib}". I pushed it to https://src.fedoraproject.org/rpms/python-jupyter-console/pull-request/7 The macro has been deprecated in code and REDAME and it was not documented at https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/ |