Python guidelines cleanup
Miro Hrončok
mhroncok at redhat.com
Thu Jul 30 14:37:25 UTC 2015
On 28.7.2015 07:02, Jason L Tibbitts III wrote:
> As many of you may be aware, FPC has been fielding several tickets
> surrounding python packaging lately, and the last one was a sizable
> reorganization that unfortunately was based on an older version of the
> guidelines. While merging it all together I just said screw it and just
> cleaned up the page like I've always wanted to do.
>
> I suggest anyone who hasn't lost sanity due to this whole guidelines
> revision process pile onto:
> https://fedorahosted.org/fpc/ticket/552#comment:4
>
> Here's the contents of that comment to save you a click.
>
> OK, this was a lot of stuff, and the more I worked on it, the more
> annoyed I became. Plus the wiki kept eating my edits and I kept getting
> lost in the overhuge page. So, I've probably gone too far in cleaning
> up but I'll present what I have and if people yell at me then I'll try
> something less ambitious.
>
> There are now three pages:
> https://fedoraproject.org/wiki/User:Tibbs/PythonCleanup2
> https://fedoraproject.org/wiki/Packaging:Python_F21
> https://fedoraproject.org/wiki/User:Tibbs/PythonAppendix
>
> The first page incorporates the following changes:
> * Notes that these guidelines apply only to F22+ and EPEL7. Points at
> the 2nd page for old guidelines.
> * Includes the information about not retiring python-version-specific
> subpackages in stable releases.
> * Makes BuildRequires: section much more succinct.
> * Makes sure python2-foo provide is versioned, mentions
> %python_provide macro.
> * Makes the macro table collapsible and collapsed by default.
> * Remove EL6-specific cruft (it's in the old guidelines page).
> * Move the parts of the byte compilation section that nobody ever uses
> off to the Appendix page.
> * Make the single-rpm single-dir case the default. Move the
> entire multiple-dir case to the appendix.
> * Completely remove %with_python3 from the example spec. We want people
> to build for python3. People just paste this in without knowing why
> they would ever need it. If you're using the new macros you can't
> just conditionalize for EL6 anyway. This really makes the spec look
> nice. Macro-izing the summary and description would make it look even
> nicer once the description gets longer than a line.
> * Uses a generic "example" module as an example. Two different approved
> proposals changed it to two different things; I just punted.
> * Puts the example spec all together without a bunch of text and admons
> and whatnot in the middle.
> * Moves the 2to3 section to the appendix.
> * Simply refers to the eggs section. That whole part at the bottom was
> quite awkward and I don't think most people even looked down that far.
> * Loads and loads of typo fixes, grammar fixes, and cleanups.
>
> The current main guideline page is now a bit over half the length it was
> and on the page it's less because of the collapsed macro table. I find
> it to be far more readable, and the sample spec no longer turns my
> stomach.
>
> The old guidelines page is just as it was before writing up the new
> macros, except that I added a short explanatory section at the top.
>
> The appendix page conveniently holds things which we probably should
> document but pretty much nobody would actually want to read without some
> specific reason.
>
> Functionally I do not believe I have gone beyond anything upon which we
> voted but I wanted to toss this out there and see if anyone yells before
> I copy it into place. Been trying to get this done for three days now
> and I think I'm finally there.
>
> - J<
> _______________________________________________
> python-devel mailing list
> python-devel at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/python-devel
>
Awesome.
Few hints:
* in example spec, you mix srcname and pypi_name macros
* For example, the python 3 version of "coverage" must ship executables
/usr/bin/coverage, /usr/bin/coverage-2 and /usr/bin/coverage-2.7, while
the python 3 version must provide /usr/bin/coverage-3 and
/usr/bin/coverage-3.4 (assuming python3 is Python 3.4).
Should be:
* For example, the python 3 version of "coverage" must ship executables
/usr/bin/coverage, /usr/bin/coverage-3 and /usr/bin/coverage-3.4, while
the python 2 version must provide /usr/bin/coverage-2 and
/usr/bin/coverage-2.7 (assuming python3 is Python 3.4 and python2 is 2.7).
* Must: If you build for a single python runtime you must add
%python_provide python-$module so that the current default python is
provided from the unversioned python package.
I'm quite confused with this and don't understand it all. Generally
%python_provide is not explained at all... ?
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
More information about the python-devel
mailing list