Remove python2-langtable subpackage (Resolves: rhbz#1686395)

This commit is contained in:
Mike FABIAN 2019-03-08 09:23:53 +01:00
parent 31b92bbcac
commit 3377680f23

View File

@ -1,10 +1,6 @@
%if 0%{?fedora}
%global with_python2 1
%endif
Name: langtable
Version: 0.0.41
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Guessing reasonable defaults for locale, keyboard layout, territory, and language.
# the translations in languages.xml and territories.xml are (mostly)
# imported from CLDR and are thus under the Unicode license, the
@ -15,9 +11,6 @@ URL: https://github.com/mike-fabian/langtable
Source0: https://github.com/mike-fabian/langtable/releases/download/%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl-interpreter
%if 0%{?with_python2}
BuildRequires: python2-devel
%endif
BuildRequires: python3-devel
%description
@ -27,22 +20,6 @@ example, guess the territory and the keyboard layout if the language
is known or guess the language and keyboard layout if the territory is
already known.
%if 0%{?with_python2}
%package -n python2-langtable
%{?python_provide:%python_provide python2-langtable}
# Remove before F30
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Summary: Python module to query the langtable-data
License: GPLv3+
Requires: %{name} = %{version}-%{release}
Requires: %{name}-data = %{version}-%{release}
%description -n python2-langtable
This package contains a Python module to query the data
from langtable-data.
%endif
%package -n python3-langtable
Summary: Python module to query the langtable-data
License: GPLv3+
@ -70,28 +47,15 @@ This package contains the data files for langtable.
%build
perl -pi -e "s,_datadir = '(.*)',_datadir = '%{_datadir}/langtable'," langtable.py
%if 0%{?with_python2}
%py2_build
%endif
%py3_build
%install
%if 0%{?with_python2}
%py2_install -- --install-data=%{_datadir}/langtable
gzip --force --best $RPM_BUILD_ROOT/%{_datadir}/langtable/*.xml
%endif
%py3_install -- --install-data=%{_datadir}/langtable
# the .xml files copied by the “python3 setup.py install” are identical
# to those copied in the “python2 setup.py install”,
# it does not hurt to gzip them again:
gzip --force --best $RPM_BUILD_ROOT/%{_datadir}/langtable/*.xml
%check
%if 0%{?with_python2}
(cd $RPM_BUILD_DIR/%{name}-%{version}/data; PYTHONPATH=.. %{__python2} ../test_cases.py; %{__python2} ../langtable.py)
%endif
(cd $RPM_BUILD_DIR/%{name}-%{version}/data; PYTHONPATH=.. %{__python3} ../test_cases.py; %{__python3} ../langtable.py)
xmllint --noout --relaxng $RPM_BUILD_ROOT/%{_datadir}/langtable/schemas/keyboards.rng $RPM_BUILD_ROOT/%{_datadir}/langtable/keyboards.xml.gz
xmllint --noout --relaxng $RPM_BUILD_ROOT/%{_datadir}/langtable/schemas/languages.rng $RPM_BUILD_ROOT/%{_datadir}/langtable/languages.xml.gz
@ -105,11 +69,6 @@ xmllint --noout --relaxng $RPM_BUILD_ROOT/%{_datadir}/langtable/schemas/timezone
%dir %{_datadir}/langtable/
%{_datadir}/langtable/schemas
%if 0%{?with_python2}
%files -n python2-langtable
%{python2_sitelib}/*
%endif
%files -n python3-langtable
%{python3_sitelib}/langtable.py
%{python3_sitelib}/langtable-*.egg-info
@ -120,6 +79,9 @@ xmllint --noout --relaxng $RPM_BUILD_ROOT/%{_datadir}/langtable/schemas/timezone
%{_datadir}/langtable/*.xml.gz
%changelog
* Fri Mar 08 2019 Mike FABIAN <mfabian@redhat.com> - 0.0.41-3
- Remove python2-langtable subpackage (Resolves: rhbz#1686395)
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.41-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild