From Fedora Project Wiki


Revision as of 02:25, 13 December 2020 by Orion (talk | contribs) (py3_dist comment)


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


  • How to handle %{py3_dist} macro?


  • 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:  {srcname}
Source0:        %{pypi_source}

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

An python module which provides a convenient example.

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



%{__python3} test

%license COPYING
%doc README.rst