public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/file] rawhide: Simplify %pyproject macro usage
Date: Wed, 02 Sep 2026 07:29:08 GMT	[thread overview]
Message-ID: <178833414849.1.9594519643805443660.rpms-file-776a81bc8a85@fedoraproject.org> (raw)

           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}
 

                 reply	other threads:[~2026-09-02  7:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178833414849.1.9594519643805443660.rpms-file-776a81bc8a85@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox