public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/file] rawhide: Simplify %pyproject macro usage
@ 2026-09-02 7:29
0 siblings, 0 replies; only message in thread
From: @ 2026-09-02 7:29 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/file
Branch : rawhide
Commit : 776a81bc8a85b2cdf9834f928381584308258c96
Author : Miro Hrončok <miro@hroncok.cz>
Date : 2026-09-01T22:31:06+02:00
Stats : +3/-9 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/file/c/776a81bc8a85b2cdf9834f928381584308258c96?branch=rawhide
Log:
Simplify %pyproject macro usage
- %pyproject_install doe snot need to be called from a project directory
- other macros have --directory option
- no need to have an empty %generate_buildrequires section --without python3
---
diff --git a/file.spec b/file.spec
index 41ebaaf..23097a9 100644
--- a/file.spec
+++ b/file.spec
@@ -104,11 +104,9 @@ iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
touch -r doc/libmagic.man doc/libmagic.man_
mv doc/libmagic.man_ doc/libmagic.man
-%generate_buildrequires
%if %{with python3}
-cd python
-%pyproject_buildrequires
-cd ..
+%generate_buildrequires
+%pyproject_buildrequires --directory python
%endif
%build
@@ -123,9 +121,7 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
export LD_LIBRARY_PATH=$PWD/src/.libs
%make_build
%if %{with python3}
-cd python
-%pyproject_wheel
-cd ..
+%pyproject_wheel --directory python
%endif
%install
@@ -147,10 +143,8 @@ ln -s misc/magic ${RPM_BUILD_ROOT}%{_datadir}/magic
ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/file/magic
%if %{with python3}
-cd python
%pyproject_install
%pyproject_save_files magic
-cd ..
%endif
%{__install} -d ${RPM_BUILD_ROOT}%{_datadir}/%{name}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-02 7:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-02 7:29 [rpms/file] rawhide: Simplify %pyproject macro usage
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox