Re: Apps using default Python in Fedora vs. EPEL

2015-01-28 Thread Bohuslav Kabrda
- Original Message -
 On 28 January 2015 at 03:32, Toshio Kuratomi a.bad...@gmail.com wrote:
  On Tue, Jan 27, 2015 at 10:50:07PM +1000, Nick Coghlan wrote:
  What if, instead, we were able to add a new macro that let folks
  *explicitly* opt in to running in the system Python, but then define
  the recommended spec file usage such that it falls back to Python 2 if
  the system Python macro isn't defined?
 
  Slavek raises the issue of how we get this into the buildroot.  An idea
  could be to talk to rel-eng and the other packagers about adding these
  sorts
  of system-feature macros to a package in the buildroot.  We could create
  a new package or add onto an existing one (is epel-release and
  fedora-release in the buildroot?)  the package would contain a small set of
  macros that specified certain features about the OS that packagers need to
  know
  Then we really could write the conditionals as a feature test instead of
  a distro version test.
 
  One drawback is that we would have to push the macros out to every release
  that we build for (epel and fedora) otherwise we'd still have to use
  distro+version  conditionals.
 
 That sounds vaguely analogous to the situation we have in Beaker:
 adding completely new system features may require a Beaker server
 update, while enabling and disabling already known features for a
 custom distro is just a configuration setting for that distro in the
 database. Actually switching to that model required updating the base
 templates for every distro we natively support.
 
 The reason we decided that approach was worth the extra up front
 effort was because it meant we just had one place to update in the
 future (the code that handles the calculation of the distro - feature
 mappings) rather than having to search the templates for all the cases
 where we were switching based on the distro.
 
 I personally think do it right (i.e. figuring out how to enable
 feature based rather than version based checks) is the direction we
 should go for Fedora  EPEL, and then Slavek  I can separately tackle
 the challenge of getting key downstreams (i.e. RHEL  CentOS) to go
 along with that change. I'm more optimistic than Slavek is about that,
 as many of the reasons we made the change for the Beaker kickstart
 templates also apply to building for different environments.

I'll try to find out what it'd take to add such a package to epel minimal 
buildroot and fedora minimal buildroot and we'll see. I actually have one more 
use case for this and that is the Py3 in EPEL, where having some macros in 
minimal buildroot would help a lot, too.

I'll try to find out ASAP and post the result here.

Slavek

 Regards,
 Nick.
 
 --
 Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia

-- 
Regards,
Slavek Kabrda
___
python-devel mailing list
python-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/python-devel

Re: Apps using default Python in Fedora vs. EPEL

2015-01-28 Thread Toshio Kuratomi
On Wed, Jan 28, 2015 at 11:59:01AM -0500, Bohuslav Kabrda wrote:
 - Original Message -
  On Tue, Jan 27, 2015 at 06:26:26AM -0500, Bohuslav Kabrda wrote:
   
   Current state:
   - Up until F21, maintainers were encouraged to build applications with
   Python 2, but weren't discouraged from building with Python 3.
  
  Note -- this isn't quite right.  If an application could run with either
  python2 or python3 maintainers in F21 and below were supposed to have the
  app run with python2.  F22 is supposed to flip this so that maintainers are
  supposed make these packages run with python3 instead of python2.
 
 I guess that I interpreted it my way since I didn't see any must in 
 there... But ok, thanks for the clarification :)
 
Yeah -- a product of Fedora Guidelines being written by different people at
different times.  We don't have strict RFC-like usage of should and may in
most places. (must is usually unambiguous as to being a directive and
a bolded should, must, or may has precise meaning.  Other uses (or
simple lack of any of those terms) leaves the question of how strict
a question that would have to go back to the FPC to figure out what they
meant in the past or what they want it to mean in the present day.)

   - This means that packagers will be able to use the unversioned macros
   throughout their specfile. Requires and BuildRequires will look like this:
   
   Requires: %{default_python}-flask
   BuildRequires %{default_python}-setuptools
   
   Note: since BuildRequires need to be expanded in the minimal buildroot,
   it's necessary to define the %default_python macro in the specfile. Other
   way would be to define it in a macro file that would be added to the
   minimal buildroot, but that's neither very likely nor very nice :)
   
  Have you talked to dennis?  We've added packages to the minimal BuildRoot
  many times before in order to enable macro files.  Not so problematic if
  it's only one macro, though.
 
 I will. Do you have any idea who I should talk to regarding EPEL? Is it also 
 Dennis?

Also dennis.  Rel-eng is growing as a group so you could also put in
a ticket/go to one of their weekly meetings but Dennis is probably still the
one that knows the most about koji and buildroots.

 
   
   I think this solution makes sense for *applications* that need to be built
   both in Fedora and in EPEL. Note that it'd also align with my EPEL-python3
   proposal [1], in case such an app was to be moved to python3X in EPEL
   (%default_python would just be redefined to python3X). I also think that
   this approach should never be allowed for packaging libraries, e.g.
   packages that have python-foo and python3-foo subpackages.
   
   Thoughts?
  
  If we were to use different macro names instead of overwriting currently
  well known ones I think this has merit.
 
 For me, introducing yet another set of macros is unnecessary. I think that 
 it'd introduce a long(-ish) new part of guidelines that'll make them even 
 more complicated than they are right now (compared to one new macro function 
 and rules on how/when to use it).

Nick's breakdown of the three desired states seems like a non-complex way to
organize things.  And explicit being a good thing is also a winner for me.
In addition to my original arguments that bashing existing macro names in
some spec files but not in all of them is a bad thing to force packagers to
have to deal with.

tangentially, when speaking about long-ish, though, could we use something
shorter than default_python?  Maybe syspython to follow Nick's usage of
System Python?

-Toshio


pgpW94ONm2CJU.pgp
Description: PGP signature
___
python-devel mailing list
python-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/python-devel