Oh, sorry. I may have chosen a bad email subject.<br><br>This failed scratch build shows what was happening:<br><a href="https://koji.fedoraproject.org/koji/taskinfo?taskID=2468876">https://koji.fedoraproject.org/koji/taskinfo?taskID=2468876</a><br>
<br><div class="gmail_quote">On Wed, Sep 15, 2010 at 11:07 PM, Robin Lee <span dir="ltr"><<a href="mailto:robinlee.sysu@gmail.com">robinlee.sysu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
The main issue is failing to use a macro defined with %__python3 to specify the version of a requirement.<br><br>The recipe is sth like this:<br><br><pre>%global py3_ver %(echo `%{__python3} -c "import sys;<br>
sys.stdout.write(sys.version[:3])"`)<br><br>.......<div class="im"><br><br>Requires: python(abi) = %{py3_ver}<br><br></div></pre><div><div></div><div class="h5"><div class="gmail_quote">On Wed, Sep 15, 2010 at 10:32 PM, David Malcolm <span dir="ltr"><<a href="mailto:dmalcolm@redhat.com" target="_blank">dmalcolm@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I suspect I haven't had enough coffee yet, but I don't see the problem<br>
here. Why not simply add "python3-devel" as a build requirement as<br>
Ignacio says?<br>
<br>
If a build requirement isn't installed, it's acceptable for a build to<br>
fail: it's a violation of a precondition.<br>
<div><div></div><div><br>
On Wed, 2010-09-15 at 19:35 +0800, Robin Lee wrote:<br>
> You should build this package in a clean root like a mock environment.<br>
> If you have python3-devel already installed and then run rpmbuild<br>
> --rebuild, you will not see the issue.<br>
><br>
> On Wed, Sep 15, 2010 at 7:25 PM, Robin Lee <<a href="mailto:robinlee.sysu@gmail.com" target="_blank">robinlee.sysu@gmail.com</a>><br>
> wrote:<br>
> For a more concrete example:<br>
> <a href="https://bugzilla.redhat.com/show_bug.cgi?id=567348" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=567348</a><br>
> I want to set the python(abi) requirement of the subpackage at<br>
> buildtime. So, I want to set it like this:<br>
> Requires: python(abi) = %{py3_ver}<br>
><br>
> But when build it, it will fail with the following output:<br>
> $ rpmbuild -bp dreampie.spec<br>
> Building target platforms: i686<br>
> Building for target i686<br>
> sh: python3: command not found<br>
> sh: python3: command not found<br>
> sh: python3: command not found<br>
> error: line 46: Version required: Requires: python(abi) =<br>
><br>
> Even though python3-devel has been added as BR.<br>
><br>
><br>
><br>
> On Wed, Sep 15, 2010 at 7:06 PM, Ignacio Vazquez-Abrams<br>
> <<a href="mailto:ivazqueznet@gmail.com" target="_blank">ivazqueznet@gmail.com</a>> wrote:<br>
><br>
> On Wed, 2010-09-15 at 18:22 +0800, Robin Lee wrote:<br>
> > python3 rpm macros not available without<br>
> python3-devel installed.<br>
> > 'rpmbuild --viewrc' will show you.<br>
> ><br>
> > So if you use the python3 macros to define another<br>
> macro and you have<br>
> > no python3-devel installed, you must fail.<br>
> ><br>
> > So, how to define, for example, a %py3_ver macro for<br>
> the major version<br>
> > of Python3? Must yum be used?<br>
> ><br>
> > Robin<br>
><br>
><br>
> Adding a "BuildRequires: python3-devel" should be<br>
> enough to pull them<br>
> in.<br>
><br>
> --<br>
> Ignacio Vazquez-Abrams <<a href="mailto:ivazqueznet@gmail.com" target="_blank">ivazqueznet@gmail.com</a>><br>
<br>
<br>
<br>
_______________________________________________<br>
python-devel mailing list<br>
<a href="mailto:python-devel@lists.fedoraproject.org" target="_blank">python-devel@lists.fedoraproject.org</a><br>
<a href="https://admin.fedoraproject.org/mailman/listinfo/python-devel" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/python-devel</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>