diff --git a/koji.spec b/koji.spec index 69f40cb..4643d42 100644 --- a/koji.spec +++ b/koji.spec @@ -9,7 +9,7 @@ Name: koji Version: 1.25.0 -Release: 2%{?dist} +Release: 3%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools @@ -25,6 +25,7 @@ Requires: python%{python3_pkgversion}-libcomps Requires: python3-libcomps BuildRequires: systemd BuildRequires: pkgconfig +BuildRequires: sed %description Koji is a system for building and tracking RPMS. The base package @@ -36,6 +37,8 @@ Summary: Build system tools python library BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: make +BuildRequires: python3-pip +BuildRequires: python3-wheel Requires: python%{python3_pkgversion}-rpm Requires: python%{python3_pkgversion}-requests Requires: python%{python3_pkgversion}-requests-gssapi @@ -195,17 +198,27 @@ koji-web is a web UI to the Koji system. %prep %autosetup -p1 - +# we'll be packaging these separately and don't want them registered +# to the wheel we will produce. +sed -e '/util\/koji/g' -e '/koji_cli_plugins/g' -i setup.py %build -# Nothing to build - +%py3_build_wheel %install -make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install +%py3_install_wheel %{name}-%{version}-py3-none-any.whl +mkdir -p %{buildroot}/etc/koji.conf.d +cp cli/koji.conf %{buildroot}/etc/koji.conf +for D in hub builder plugins util www vm ; do + pushd $D + make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install + popd +done + # alter python interpreter in koji CLI scripts='%{_bindir}/koji %{_sbindir}/kojid %{_sbindir}/kojira %{_sbindir}/koji-shadow - %{_sbindir}/koji-gc %{_sbindir}/kojivmd %{_sbindir}/koji-sweep-db %{_sbindir}/koji-sidetag-cleanup' + %{_sbindir}/koji-gc %{_sbindir}/kojivmd %{_sbindir}/koji-sweep-db + %{_sbindir}/koji-sidetag-cleanup' for fn in $scripts ; do sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT$fn done @@ -229,6 +242,7 @@ done %files -n python%{python3_pkgversion}-koji %{python3_sitelib}/%{name} +%{python3_sitelib}/%{name}-%{version}.*-info %{python3_sitelib}/koji_cli %files -n python%{python3_pkgversion}-%{name}-cli-plugins @@ -336,6 +350,9 @@ done %systemd_postun kojira.service %changelog +* Tue Jun 15 2021 Jiri Popelka - 1.25.0-3 +- Python egginfo. Fixes rhbz#1968618 + * Fri Jun 04 2021 Python Maint - 1.25.0-2 - Rebuilt for Python 3.10