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

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

 



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?  Why the py2_must is not defined for
epel7 and epel6?

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 :-).

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?

Pavel



> There is a note at the bottom of the draft about how you could possibly 
> start dropping Python 2 subpackages from Fedora.
> 
> 



_______________________________________________
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