Re: Draft: Macros to tell what Python versions to package for

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2.3.2018 11:25, Pavel Raiskup wrote:
On Friday, March 2, 2018 10:36:36 AM CET Miro Hrončok wrote:
I've prepared a draft for Python packaging that introduces some new
macros that should ease packaging for Fedoras, EPELs and even potential
new RHELs, when it comes to python stacks.

I don't do much ifs in specfiles and prefer to leverage git branches for
this, so I don't know what bothers you most. The proposal with example
spec file is at:

https://fedoraproject.org/wiki/User:Churchyard/Packaging:PythonMustMayMacros
[..snip..]
Could you please provide feedback? Ask questions?

What's the real usecase for *_must?

This tells you that according to the guidelines for given distro, if upstream supports this python version, you MUST package for it. Some packages might want to only package their Python library for the stacks where it's required.

Why the py2_must is not defined for
epel7 and epel6?

Because there is no such guideline. It is completely OK to package for python3 only on EPELs.


I always only needed to see whether (a) python2 runtime is available, (b)
python3 is available.  So more readable and understandable approach (to
me) would be to have only the %pyX_may (or %py3_available).  But I'm
probably not experienced enough, so I'm only curious :-).

For that, yes. here may == available. We can discuss the naming if it sounds weird.


E.g. last time (argparse-manpage) I went with:

   %if 0%{?fedora}
     %bcond_without python2
     %bcond_without python3
   %else
     %if 0%{?rhel} > 7
       %bcond_with    python2
       %bcond_without python3
     %else
       %bcond_without python2
       %bcond_with    python3
     %endif
   %endif

Which allows me to do things like:

   %if %{with python2}
     ....
   %endif

Or:

   BuildRequires: %{?with_python3:foo} %{?with_python2:bar}

.. and which brings the convenient --with{,out}-python{2,3} options for
custom re-builds.  Could we have something similar in the draft, too?

We can definitively make those with statemetns, however we cannot make it with_python2 and with_python3, because we might destroy current specfiles with that. So we would need to have:

   %if %{with python2_must}
     ....
   %endif

Or:

   BuildRequires: %{?with_python3_may:foo} %{?with_python2_must:bar}

And specifying those on the command line would be rather unreadable. What does --with-python2-may even mean?

You can always define your with_python2 based on values of py2_may, py2_must and fedora version.

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux