From 0976ec508ad60b3d083aa361e1c7f447cde7c9d4 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Jun 29 2016 15:21:13 +0000 Subject: Initial import (#1351092). --- diff --git a/.gitignore b/.gitignore index e69de29..21c5ac9 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/GeoIP2-python-2.4.0.tar.gz +/MaxMind-DB-6678894eca7ccd42d6c1456735121d2ac3048e36.tar.gz diff --git a/python-geoip2.spec b/python-geoip2.spec new file mode 100644 index 0000000..d841feb --- /dev/null +++ b/python-geoip2.spec @@ -0,0 +1,94 @@ +%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 6678894eca7ccd42d6c1456735121d2ac3048e36 + +Name: python-%{pypi_name} +Version: 2.4.0 +Release: 1%{?dist} +Summary: MaxMind GeoIP2 API + +License: ASL 2.0 +URL: http://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 + +BuildArch: noarch + +%description +%{desc} + +%package doc +Summary: Documentation for %{name} +BuildRequires: /usr/bin/sphinx-build + +%description doc +This package provides the documentation for %{pypi_name}. + + +%package -n python2-%{pypi_name} +Summary: %{summary} +BuildRequires: python-requests-mock +BuildRequires: python2-setuptools +BuildRequires: python2-devel +BuildRequires: python2-requests +BuildRequires: python-ipaddress +BuildRequires: python2-maxminddb +%{?python_provide:%python_provide python2-%{pypi_name}} +Requires: python2-maxminddb + +%description -n python2-%{pypi_name} +%{desc} + + +%package -n python3-%{pypi_name} +Summary: %{summary} +BuildRequires: python3-requests-mock +BuildRequires: python3-setuptools +BuildRequires: python3-devel +BuildRequires: python3-maxminddb +%{?python_provide:%python_provide python3-%{pypi_name}} +Requires: python3-maxminddb + +%description -n python3-%{pypi_name} +%{desc} + +%prep +%autosetup -n %{srcname}-%{version} -a 1 +rmdir tests/data +mv -f %{test_data}-%{test_data_rls} tests/data +rm -rf %{pypi_name}.egg-info + +%build +%py2_build +%py3_build +sphinx-build -b html docs html + +%install +%py2_install +%py3_install + +%check +PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} setup.py test +PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} setup.py test + +%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/ + +%files -n python3-%{pypi_name} +%doc README.rst +%license LICENSE +%{python3_sitelib}/%{pypi_name}/ +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ + +%changelog +* Wed Jun 15 2016 Lumir Balhar - 2.4.0-1 +- Initial package. diff --git a/sources b/sources index e69de29..038eed6 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +c802de1d40d0fde813962341d3d0230f GeoIP2-python-2.4.0.tar.gz +78c45e2ce64fc8e433297e1446e3bf03 MaxMind-DB-6678894eca7ccd42d6c1456735121d2ac3048e36.tar.gz