From Fedora Project Wiki
(→‎Example Spec: define __python3)
(request-repo)
Line 4: Line 4:
= Python 3X applications and modules in EPEL 8 =
= Python 3X applications and modules in EPEL 8 =
Since Python minor version are not ABI compatible and because EPEL guidelines strongly discourage breaking ABI compatibility, separate Python 3 minor versions in EPEL 8 are packaged as separate python3X (currently python38) packages to allow for independent versions for each Python version.  These guidelines are for building modules for the non-primary version(s) of Python in RHEL 8.
Since Python minor version are not ABI compatible and because EPEL guidelines strongly discourage breaking ABI compatibility, separate Python 3 minor versions in EPEL 8 are packaged as separate python3X (currently python38) packages to allow for independent versions for each Python version.  These guidelines are for building modules for the non-primary version(s) of Python in RHEL 8.
New repos for existing Python modules packaged for Fedora can be requested without the need for a new review with:
fedpkg request-repo --exception python38-foo


== All Packages ==
== All Packages ==

Revision as of 02:39, 13 December 2020

DRAFT

This is a work in progress

Python 3X applications and modules in EPEL 8

Since Python minor version are not ABI compatible and because EPEL guidelines strongly discourage breaking ABI compatibility, separate Python 3 minor versions in EPEL 8 are packaged as separate python3X (currently python38) packages to allow for independent versions for each Python version. These guidelines are for building modules for the non-primary version(s) of Python in RHEL 8.

New repos for existing Python modules packaged for Fedora can be requested without the need for a new review with:

fedpkg request-repo --exception python38-foo

All Packages

  • Must override the __python3 macro, e.g.:
%global __python3 /usr/bin/python3.8
  • No need for the %python_provide macro

Issues

  • How to handle %{py3_dist} macro?

Modules

  • where in Fedora, a module has python3-foo subpackage, in EPEL the subpackage must be python3X-foo.
  • Any files in %{_bindir} must only be of the form %{_bindir}/foo-%{python3_version}

Example Spec

%global srcname example
%global sum An example python module
%global __python3 /usr/bin/python3.8

Name:           python38-%{srcname}
Version:        1.2.3
Release:        1%{?dist}
Summary:        %{sum}
License:        MIT
URL:            https://pypi.python.org/pypi/%{srcname}
Source0:        %{pypi_source}

BuildArch:      noarch
BuildRequires:  python38-devel
BuildRequires:  python38-othermodule
Requires:       python38-othermodule

%description
An python module which provides a convenient example.

%prep
%autosetup -n %{srcname}-%{version}

%build
%py3_build

%install
%py3_install

%check
%{__python3} setup.py test

%files
%license COPYING
%doc README.rst
%{python3_sitelib}/*
%{_bindir}/sample-exec-%{python3_version}

%changelog