Blob Blame History Raw
%if 0%{?fedora} || 0%{?rhel} >= 8
%bcond_without python3
%else
%bcond_with python3
%endif

%global srcname vatnumber
%global sum Python module to validate VAT numbers

# test requires network connection to an outside server
%global with_check 0

Name:           python-%{srcname}
Version:        1.2
Release:        7%{?dist}
Summary:        %{sum}

License:        GPLv3+
URL:            https://pypi.python.org/pypi/vatnumber
Source0:        http://pypi.python.org/packages/source/v/%{srcname}/%{srcname}-%{version}.tar.gz
Patch0:         %{srcname}-1.2-py3.patch

BuildArch:      noarch

%description
%{sum}.


%package -n python2-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python2-%{srcname}}

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
%if 0%{?with_check}
BuildRequires:  python-suds
%endif

Requires:       python-suds

%description -n python2-%{srcname}
%{sum}.


%if %{with python3}
%package -n python3-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python3-%{srcname}}

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
%if 0%{?with_check}
BuildRequires:  python3-suds
%endif

Requires:       python3-suds

%description -n python3-%{srcname}
%{sum}.
%endif # with python3


%prep
%setup -q -n %{srcname}-%{version}
%patch0 -p1


%build
%py2_build
%if %{with python3}
%py3_build
%endif # with python3


%install
%py2_install
%if %{with python3}
%py3_install
%endif # with python3


%if 0%{?with_check}
%check
%{__python2} setup.py test
%if %{with python3}
%{__python3} setup.py test
%endif # with python3
%endif


%files -n python2-%{srcname}
%license COPYRIGHT LICENSE
%doc CHANGELOG README
%{python2_sitelib}/*

%if %{with python3}
%files -n python3-%{srcname}
%license COPYRIGHT LICENSE
%doc CHANGELOG README
%{python3_sitelib}/*
%endif # with python3


%changelog
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.2-4
- Rebuild for Python 3.6

* Sat Oct 08 2016 Björn Esser <fedora@besser82.io> - 1.2-3
- add contional for building on epel7
- use %%license
- move BuildRequires to sub-packages
- fix BuildRequires for epel7
- drop obsolete Group-tag, not needed since rhel6+

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Fri Apr 22 2016 Dan Horák <dan[at]danny.cz> - 1.2-1
- update to version 1.2
- introduce python3 variant (#1309263)

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Sun Oct 23 2011 Dan Horák <dan[at]danny.cz> - 1.0-1
- update to version 1.0

* Wed Jun 08 2011 Dan Horák <dan[at]danny.cz> - 0.9-1
- initial Fedora version