From Fedora Project Wiki

Revision as of 02:22, 13 December 2020 by Orion (talk | contribs) (Initial version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.

All Packages

  • Must override the __python3 macro, e.g.:
%global __python3 /usr/bin/python3.8
  • No need for the %python_provide 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

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