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 class="bz_comment_text" id="comment_text_15">%global py3_ver %(echo `%{__python3} -c &quot;import sys;<br>
sys.stdout.write(sys.version[:3])&quot;`)<br><br>.......<br><br>Requires:   python(abi) = %{py3_ver}<br><br></pre><div class="gmail_quote">On Wed, Sep 15, 2010 at 10:32 PM, David Malcolm <span dir="ltr">&lt;<a href="mailto:dmalcolm@redhat.com">dmalcolm@redhat.com</a>&gt;</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&#39;t had enough coffee yet, but I don&#39;t see the problem<br>
here.  Why not simply add &quot;python3-devel&quot; as a build requirement as<br>
Ignacio says?<br>
<br>
If a build requirement isn&#39;t installed, it&#39;s acceptable for a build to<br>
fail: it&#39;s a violation of a precondition.<br>
<div><div></div><div class="h5"><br>
On Wed, 2010-09-15 at 19:35 +0800, Robin Lee wrote:<br>
&gt; You should build this package in a clean root like a mock environment.<br>
&gt; If you have python3-devel already installed and then run rpmbuild<br>
&gt; --rebuild, you will not see the issue.<br>
&gt;<br>
&gt; On Wed, Sep 15, 2010 at 7:25 PM, Robin Lee &lt;<a href="mailto:robinlee.sysu@gmail.com">robinlee.sysu@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;         For a more concrete example:<br>
&gt;         <a href="https://bugzilla.redhat.com/show_bug.cgi?id=567348" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=567348</a><br>
&gt;         I want to set the python(abi) requirement of the subpackage at<br>
&gt;         buildtime. So, I want to set it like this:<br>
&gt;         Requires: python(abi) = %{py3_ver}<br>
&gt;<br>
&gt;         But when build it, it will fail with the following output:<br>
&gt;         $ rpmbuild -bp dreampie.spec<br>
&gt;         Building target platforms: i686<br>
&gt;         Building for target i686<br>
&gt;         sh: python3: command not found<br>
&gt;         sh: python3: command not found<br>
&gt;         sh: python3: command not found<br>
&gt;         error: line 46: Version required: Requires:   python(abi) =<br>
&gt;<br>
&gt;         Even though python3-devel has been added as BR.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;         On Wed, Sep 15, 2010 at 7:06 PM, Ignacio Vazquez-Abrams<br>
&gt;         &lt;<a href="mailto:ivazqueznet@gmail.com">ivazqueznet@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;                 On Wed, 2010-09-15 at 18:22 +0800, Robin Lee wrote:<br>
&gt;                 &gt; python3 rpm macros not available without<br>
&gt;                 python3-devel installed.<br>
&gt;                 &gt; &#39;rpmbuild --viewrc&#39; will show you.<br>
&gt;                 &gt;<br>
&gt;                 &gt; So if you use the python3 macros to define another<br>
&gt;                 macro and you have<br>
&gt;                 &gt; no python3-devel installed, you must fail.<br>
&gt;                 &gt;<br>
&gt;                 &gt; So, how to define, for example, a %py3_ver macro for<br>
&gt;                 the major version<br>
&gt;                 &gt; of Python3? Must yum be used?<br>
&gt;                 &gt;<br>
&gt;                 &gt; Robin<br>
&gt;<br>
&gt;<br>
&gt;                 Adding a &quot;BuildRequires: python3-devel&quot; should be<br>
&gt;                 enough to pull them<br>
&gt;                 in.<br>
&gt;<br>
&gt;                 --<br>
&gt;                 Ignacio Vazquez-Abrams &lt;<a href="mailto:ivazqueznet@gmail.com">ivazqueznet@gmail.com</a>&gt;<br>
<br>
<br>
<br>
_______________________________________________<br>
python-devel mailing list<br>
<a href="mailto:python-devel@lists.fedoraproject.org">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>