From 8a3dd7d5388a416acd4139c899856c3481759943 Mon Sep 17 00:00:00 2001 From: FrantiĊĦek Zatloukal Date: Nov 16 2018 10:05:57 +0000 Subject: Drop python2 subpackage on Fedora <= 29 --- diff --git a/libtaskotron.spec b/libtaskotron.spec index 4fd9e4f..813024e 100644 --- a/libtaskotron.spec +++ b/libtaskotron.spec @@ -1,7 +1,7 @@ Name: libtaskotron # NOTE: if you update version, *make sure* to also update `libtaskotron/__init__.py` Version: 0.9.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Taskotron Support Library License: GPLv3 @@ -14,7 +14,7 @@ BuildArch: noarch Libtaskotron is a support library for running taskotron tasks. # ********* python2-libtaskotron ********* - +%if 0%{?fedora} <= 29 %package -n python2-libtaskotron Summary: libtaskotron python2 libraries @@ -26,7 +26,9 @@ Requires: python2-fedora Requires: python2-hawkey Requires: python2-jinja2 Requires: python2-koji +Requires: python2-munch Requires: python2-progressbar +Requires: python2-pyyaml Requires: python2-requests Requires: python2-resultsdb_api Requires: python2-rpm @@ -35,23 +37,17 @@ Requires: python2-xunitparser # used by 'synchronize' task in ansible Requires: rsync -%if 0%{?fedora} <= 27 -Requires: PyYAML -Requires: python-munch -%else -Requires: python2-pyyaml -Requires: python2-munch -%endif - BuildRequires: python2-configparser BuildRequires: python2-devel BuildRequires: python2-fedora BuildRequires: python2-hawkey BuildRequires: python2-koji BuildRequires: python2-mock +BuildRequires: python2-munch BuildRequires: python2-progressbar BuildRequires: python2-pytest BuildRequires: python2-pytest-cov +BuildRequires: python2-pyyaml BuildRequires: python2-requests BuildRequires: python2-resultsdb_api BuildRequires: python2-rpmfluff @@ -60,19 +56,12 @@ BuildRequires: python2-sphinx_rtd_theme BuildRequires: python2-testcloud BuildRequires: python2-xunitparser -%if 0%{?fedora} <= 27 -BuildRequires: PyYAML -BuildRequires: python-munch -%else -BuildRequires: python2-pyyaml -BuildRequires: python2-munch -%endif %description -n python2-libtaskotron Libtaskotron libraries built for Python 2. +%endif # ********* python3-libtaskotron ********* - %package -n python3-libtaskotron Summary: libtaskotron python3 libraries @@ -175,17 +164,25 @@ getent group taskotron >/dev/null || groupadd taskotron # testing needs to occur here instead of %%check section, because we need to # patch config files after testing is done, but before py[co] files are built # (so that they match the source files) +%if 0%{?fedora} <= 29 %{__python2} setup.py test +%endif %{__python3} setup.py test + # adjust data path in config sed -i "/_data_dir/s#_data_dir = '../data'#_data_dir = '%{_datarootdir}/libtaskotron'#" libtaskotron/config_defaults.py grep -Fq "_data_dir = '%{_datarootdir}/libtaskotron'" libtaskotron/config_defaults.py + # build files +%if 0%{?fedora} <= 29 %py2_build +%endif %py3_build %install +%if 0%{?fedora} <= 29 %py2_install +%endif %py3_install # configuration files @@ -218,6 +215,7 @@ cp -a data/* %{buildroot}%{_datarootdir}/libtaskotron %doc README.rst %license LICENSE +%if 0%{?fedora} <= 29 %files -n python2-libtaskotron %{python2_sitelib}/%{name}/ %{python2_sitelib}/%{name}-*.egg-info @@ -237,6 +235,7 @@ cp -a data/* %{buildroot}%{_datarootdir}/libtaskotron %doc README.rst %license LICENSE +%endif %files -n python3-libtaskotron %{_bindir}/taskotron_result @@ -261,6 +260,10 @@ cp -a data/* %{buildroot}%{_datarootdir}/libtaskotron %license LICENSE %changelog +* Fri Nov 16 2018 Frantisek Zatloukal - 0.9.2-2 +- Drop support for Fedora 27 +- Don't build python2-libtaskotron on Fedora >= 30 + * Thu Nov 01 2018 Frantisek Zatloukal - 0.9.2-1 - New packaging scheme - Build the library both for Python 2 and Python 3