From 63194ba97f0b77a74c3483ec1ba85fad7f956237 Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Sep 12 2019 16:10:54 +0000 Subject: Add rules for Cython Cython sources MUST be regenerated. https://pagure.io/packaging-committee/issue/893 --- diff --git a/guidelines/modules/ROOT/pages/Python.adoc b/guidelines/modules/ROOT/pages/Python.adoc index da7b44d..b05fb83 100644 --- a/guidelines/modules/ROOT/pages/Python.adoc +++ b/guidelines/modules/ROOT/pages/Python.adoc @@ -1,5 +1,5 @@ = Python Packaging Guidelines -:last-reviewed: 2019-02-14 +:last-reviewed: 2019-05-20 :toc: == Python Version Support @@ -243,6 +243,20 @@ Use of the macros has several benefits: * It ensures that the packages are installed correctly on multilib architectures. * Using these macros instead of hardcoding the directory in the specfile ensures your spec remains compatible with the installed python version even if the directory structure changes radically (for instance, if `+python3_sitelib+` moves into `+%{_datadir}+`). +== Packages using Cython + +A great amount of extension modules for Python +(Python modules written in a compiled language such as C or C++) +are written using the https://cython.org/[Cython] language and compiler. + +Majority of such packages contains the generated C (or C++) sources in the source tarball. + +Tightening the xref:what-can-be-packaged.adoc#_pregenerated_code[general Fedora policy], +packages MUST NOT use pre-generated Cython sources. +They MUST be deleted in `%prep` and regenerated during the build. + +Any exception to this rule should be considered a xref:index.adoc#bootstrapping[bootstrapping]. + == Files to include When packaging python modules, several types of files are included: