<div dir="ltr"><div class="gmail_quote"><div dir="ltr">Zbigniew Jędrzejewski-Szmek &lt;<a href="mailto:zbyszek@in.waw.pl">zbyszek@in.waw.pl</a>&gt; schrieb am Fr., 31. Juli 2015 um 06:06 Uhr:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Jul 30, 2015 at 07:34:48PM -0500, Jason L Tibbitts III wrote:<br>
&gt; After some additional discussion and cleanup, I&#39;ve gone ahead and moved<br>
&gt; my drafts into place in the main guidelines.  Please let me know if I&#39;ve<br>
&gt; made any mistakes or typos or left out anything important.<br>
There&#39;s a dead link in &quot;Example common spec file&quot;.<br>
<br>
&gt; However, there is one thing I&#39;m trying to understand about the new<br>
&gt; guidelines (which came from one of the submitted drafts, not something<br>
&gt; that I wrote).  They say:<br>
&gt;<br>
&gt; &quot;<br>
&gt; The following is a very simple spec file for a module building for both<br>
&gt; python2 and python3. It builds both versions in the same directory; this<br>
&gt; is possible because setuptools uses different build directories for<br>
&gt; different python versions and architectures. In addition, python3 will<br>
&gt; include the version of the interpreter in the names of generated files,<br>
&gt; so the build products don&#39;t conflict. (Of course this only works if a<br>
&gt; package builds for a single python2 version, which should always be the<br>
&gt; case in Fedora.)<br>
&gt; &quot;<br>
&gt;<br>
&gt; Which is fine, except that I must be missing something about the second<br>
&gt; sentence.  Setuptools in f22 and rawhide (which I know are different<br>
&gt; versions) seems to use &quot;build&quot; regardless of which python version is<br>
&gt; used to execute setup.py.  Am I misunderstanding what that sentence is<br>
&gt; trying to tell me?<br>
I wrote that. I turns out, which I didn&#39;t know at the time, that this is<br>
only true for binary modules<br>
(for example python-systemd has build/{lib,temp}.linux-x86_64-{2.7,3.4}).<br>
For pure-python modules it seems to use a single build directory,<br>
but separate build/scripts directories.<br>
<br>
[ It seems that there&#39;s no nice way to tell setuptools/distutils/distribute<br>
to always use separate build directories. It still uses the same build<br>
directory even if 2to3 translation is specified in the setup.py file, which is<br>
probably a bug. In a pinch, it is possible to override the build dir with<br>
--build-lib. So something like this works, even if 2to3 is used:<br>
%{__python2} setup.py build --build-lib build/2<br>
%{__python3} setup.py build --build-lib build/3<br>
Fortunately this is rarely necessary.]<br></blockquote><div><br></div><div>So either this is a bug in the case of 2to3 or the %py{2,3}_build macros should implement this to work around it? Otherwise these packages would need to be build within different build directories and the current pushd/popd boilerplate.</div><div><br></div><div>   -Tom</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So I think the detailed justification should be removed, and the first<br>
paragraph of &quot;Example common spec file&quot; replaced with something like this:<br>
<br>
&quot;The following is a very simple spec file for a module building for<br>
both python2 and python3. It builds both versions in the same<br>
directory; this is possible because build products for different<br>
versions of Python usually do not conflict.&quot;<br>
<br>
&gt; For the package I&#39;m using for testing (python-requests) it turns out<br>
&gt; that the results of %py2_build and %py3_build are completely identical,<br>
&gt; but this might just be coincidence.<br>
<br>
Zbyszek<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" rel="noreferrer" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/python-devel</a></blockquote></div></div>