Bug 2097158 - %pyproject_build_lib uses the dotted python version which is not the case for setuptools 62.4.0
Summary: %pyproject_build_lib uses the dotted python version which is not the case for...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pyproject-rpm-macros
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Python Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2064842 2097085 2097103 2097109
TreeView+ depends on / blocked
 
Reported: 2022-06-15 02:16 UTC by Charalampos Stratakis
Modified: 2022-06-29 02:06 UTC (History)
5 users (show)

Fixed In Version: pyproject-rpm-macros-1.3.2-1.fc37 pyproject-rpm-macros-1.3.2-1.fc35 pyproject-rpm-macros-1.3.2-1.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-20 13:45:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Charalampos Stratakis 2022-06-15 02:16:35 UTC
Before this [0] commit in setuptools, building a C extension would create the lib.linux-x86_64-3.9 build directory.

That's not the case now, as with the latest version, the directory would be lib.linux-x86_64-cpython39

This currently makes a number of packages to fail, e.g. bug 2097107

[0] https://github.com/pypa/setuptools/pull/3258/commits/1c23f5e1e4b18b50081cbabb2dea22bf345f5894

Comment 1 Miro Hrončok 2022-06-15 08:42:47 UTC
Awesome! 

This is the current iplmentation:

%pyproject_build_lib %{expand:\\\
$(
pyproject_build_lib=()
if [ -d build/lib.%{python3_platform}-%{python3_version} ]; then
  pyproject_build_lib+=( "${PWD}/build/lib.%{python3_platform}-%{python3_version}" )
fi
if [ -d build/lib ]; then
  pyproject_build_lib+=( "${PWD}/build/lib" )
fi
for directory in $(find "%{_pyproject_builddir}" -type d -wholename "%{_pyproject_builddir}/pip-req-build-*/build/lib.%{python3_platform}-%{python3_version}" 2>/dev/null); do
  pyproject_build_lib+=( "${directory}" )
done
for directory in $(find "%{_pyproject_builddir}" -type d -wholename "%{_pyproject_builddir}/pip-req-build-*/build/lib" 2>/dev/null); do
  pyproject_build_lib+=( "${directory}" )
done
echo $(IFS=:; echo "${pyproject_build_lib[*]}")
)}


I believe this can be solved by adding more ifs and fors.

Due to the ongoing Python 3.11 rebuild, I won't be looking into this soon. I would be able to review a PR.

-------

Note that there are many packages that make this assumption in their spec file manually without pyproject-rpm-macros

Comment 3 Fedora Update System 2022-06-20 13:43:07 UTC
FEDORA-2022-d857c5b521 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-d857c5b521

Comment 4 Fedora Update System 2022-06-20 13:45:55 UTC
FEDORA-2022-d857c5b521 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2022-06-20 14:09:11 UTC
FEDORA-2022-49880f29f9 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-49880f29f9

Comment 6 Fedora Update System 2022-06-20 14:09:12 UTC
FEDORA-2022-de6aa089a7 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-de6aa089a7

Comment 7 Fedora Update System 2022-06-21 01:29:55 UTC
FEDORA-2022-49880f29f9 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-49880f29f9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-49880f29f9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2022-06-21 01:58:36 UTC
FEDORA-2022-de6aa089a7 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-de6aa089a7`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-de6aa089a7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2022-06-29 01:50:41 UTC
FEDORA-2022-de6aa089a7 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2022-06-29 02:06:54 UTC
FEDORA-2022-49880f29f9 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.