(request-repo) |
(Use -epel suffix) |
||
Line 6: | Line 6: | ||
New repos for existing Python modules packaged for Fedora can be requested without the need for a new review with: | 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 | fedpkg request-repo --exception python38-foo-epel | ||
== All Packages == | == All Packages == | ||
Line 28: | Line 28: | ||
%global __python3 /usr/bin/python3.8 | %global __python3 /usr/bin/python3.8 | ||
Name: python38-%{srcname} | Name: python38-%{srcname}-epel | ||
Version: 1.2.3 | Version: 1.2.3 | ||
Release: 1%{?dist} | Release: 1%{?dist} | ||
Line 37: | Line 37: | ||
BuildArch: noarch | BuildArch: noarch | ||
%description | |||
A python module which provides a convenient example. | |||
%package -n python38-%{srcname} | |||
Summary: %{sum} | |||
BuildRequires: python38-devel | BuildRequires: python38-devel | ||
BuildRequires: python38-othermodule | BuildRequires: python38-othermodule | ||
Requires: python38-othermodule | Requires: python38-othermodule | ||
%description | %description -n python38-%{srcname} | ||
A python module which provides a convenient example. | |||
%prep | %prep | ||
Line 56: | Line 62: | ||
%{__python3} setup.py test | %{__python3} setup.py test | ||
%files | %files -n python38-%{srcname} | ||
%license COPYING | %license COPYING | ||
%doc README.rst | %doc README.rst |
Revision as of 19:09, 21 May 2022
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-epel
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}-epel Version: 1.2.3 Release: 1%{?dist} Summary: %{sum} License: MIT URL: https://pypi.python.org/pypi/%{srcname} Source0: %{pypi_source} BuildArch: noarch %description A python module which provides a convenient example. %package -n python38-%{srcname} Summary: %{sum} BuildRequires: python38-devel BuildRequires: python38-othermodule Requires: python38-othermodule %description -n python38-%{srcname} A python module which provides a convenient example. %prep %autosetup -n %{srcname}-%{version} %build %py3_build %install %py3_install %check %{__python3} setup.py test %files -n python38-%{srcname} %license COPYING %doc README.rst %{python3_sitelib}/* %{_bindir}/sample-exec-%{python3_version} %changelog