Blob Blame History Raw
%global srcname stdnum

Name:           python-%{srcname}
Version:        1.3
Release:        4%{?dist}
Summary:        Python module to handle standardized numbers and codes

License:        LGPLv2+
URL:            http://arthurdejong.org/python-stdnum/
Source0:        https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
BuildArch:      noarch
 
BuildRequires:  python-setuptools
BuildRequires:  python2-devel

BuildRequires:  python3-setuptools
BuildRequires:  python3-devel

# needed for tests
BuildRequires:  python-nose
BuildRequires:  python3-nose


%description
Parse, validate and reformat standard numbers and codes. This library offers
functions for parsing, validating and reformatting standard numbers and codes
in various formats like personal IDs, VAT numbers, IBAN and more.

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

%description -n python2-%{srcname}
Parse, validate and reformat standard numbers and codes. This library offers
functions for parsing, validating and reformatting standard numbers and codes
in various formats like personal IDs, VAT numbers, IBAN and more.

%package -n     python3-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
Parse, validate and reformat standard numbers and codes. This library offers
functions for parsing, validating and reformatting standard numbers and codes
in various formats like personal IDs, VAT numbers, IBAN and more.


%prep
%setup -q
# Remove bundled egg-info
rm -rf %{name}.egg-info


%build
%py2_build
%py3_build


%install
%py3_install
%py2_install


%check
LANG=C.utf-8 nosetests-%{python2_version} -v
LANG=C.utf-8 nosetests-%{python3_version} -v


%files -n python2-%{srcname}
%license COPYING
%doc NEWS README
%{python2_sitelib}/%{srcname}/
%{python2_sitelib}/python_%{srcname}-%{version}-py?.?.egg-info/

%files -n python3-%{srcname}
%license COPYING
%doc NEWS README
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/python_%{srcname}-%{version}-py?.?.egg-info/


%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

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

* Tue Jul 19 2016 Dan Horák <dan@danny.cz> - 1.3-2
- address comments from package review (#1357566)

* Mon Jul 18 2016 Dan Horák <dan@danny.cz> - 1.3-1
- Initial package.