From 5d301deb65c0918d74d5e71e524f5cdacbd1fff8 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Aug 12 2018 13:41:19 +0000 Subject: Drop python2 subpackage Signed-off-by: Igor Gnatenko --- diff --git a/python-geoip2.spec b/python-geoip2.spec index d4b33b4..a61e0ca 100644 --- a/python-geoip2.spec +++ b/python-geoip2.spec @@ -1,20 +1,18 @@ +%{?python_enable_dependency_generator} + %global pypi_name geoip2 %global srcname GeoIP2-python %global desc This package provides an API for the GeoIP2 web services. %global test_data MaxMind-DB %global test_data_rls f6ed981c23b0eb33d7c07568e2177236252afda6 -%if %{defined fedora} -%bcond_without python3 -%endif - Name: python-%{pypi_name} Version: 2.9.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: MaxMind GeoIP2 API License: ASL 2.0 -URL: http://www.maxmind.com/ +URL: https://www.maxmind.com/ Source0: https://github.com/maxmind/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz Source1: https://github.com/maxmind/%{test_data}/archive/%{test_data_rls}/%{test_data}-%{test_data_rls}.tar.gz @@ -30,89 +28,48 @@ BuildRequires: %{_bindir}/sphinx-build %description doc This package provides the documentation for %{pypi_name}. -%package -n python2-%{pypi_name} -Summary: %{summary} -BuildRequires: python2-requests-mock -BuildRequires: python2-setuptools -BuildRequires: python2-devel -BuildRequires: python2-requests -BuildRequires: python%{?fedora:2}-ipaddress -BuildRequires: python2-maxminddb -%{?python_provide:%python_provide python2-%{pypi_name}} -Requires: python2-requests -Requires: python%{?fedora:2}-ipaddress -Requires: python2-maxminddb - -%description -n python2-%{pypi_name} -%{desc} - -%if %{with python3} %package -n python3-%{pypi_name} Summary: %{summary} -BuildRequires: python3-requests-mock -BuildRequires: python3-setuptools BuildRequires: python3-devel +BuildRequires: python3-setuptools BuildRequires: python3-requests BuildRequires: python3-maxminddb +BuildRequires: python3-requests-mock %{?python_provide:%python_provide python3-%{pypi_name}} -Requires: python3-requests -Requires: python3-maxminddb %description -n python3-%{pypi_name} %{desc} -%endif %prep %autosetup -n %{srcname}-%{version} -a 1 rmdir tests/data mv -f %{test_data}-%{test_data_rls} tests/data -%if %{defined rhel} -# https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires -# RHEL's setuptools does not currently support this argument. -sed -e '/python_requires=/d' -i setup.py -# Upstream requires requests 2.9 without a clear reason why. RHEL7 only has 2.6.0. -sed -e '/requests/ s/>=.*//' -i requirements.txt -%endif %build -%py2_build -%if %{with python3} %py3_build -%endif sphinx-build -b html docs html rm -rf html/.{buildinfo,doctrees} %install -%py2_install -%if %{with python3} %py3_install -%endif %check -PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} setup.py test -%if %{with python3} PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} setup.py test -%endif %files doc %doc html/ %license LICENSE -%files -n python2-%{pypi_name} -%doc README.rst -%license LICENSE -%{python2_sitelib}/%{pypi_name}/ -%{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}.egg-info/ - -%if %{with python3} %files -n python3-%{pypi_name} %doc README.rst %license LICENSE %{python3_sitelib}/%{pypi_name}/ -%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ -%endif +%{python3_sitelib}/%{pypi_name}-*.egg-info/ %changelog +* Sun Aug 12 2018 Igor Gnatenko - 2.9.0-5 +- Drop python2 subpackage + * Sat Jul 14 2018 Fedora Release Engineering - 2.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild