File python-qrcode.spec of Package python-qrcode

%global pkgname qrcode

Name:           python-%{pkgname}
Version:        4.0.1
Release:        1%{?dist}
Summary:        Python QR Code image generator

License:        BSD
URL:            https://github.com/lincolnloop/python-qrcode
Source0:        http://pypi.python.org/packages/source/q/qrcode/qrcode-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-imaging
BuildRequires:  python-six
Requires:       python-imaging
Requires:       python-six

%description
This module uses the Python Imaging Library (PIL) to allow for the
generation of QR Codes.


%prep
%setup -q -n %{pkgname}-%{version}


%build
%{__python} setup.py build


%install
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%{__mv} %{buildroot}%{_bindir}/qr{,code}


%check
# in lieue of a real test suite
for m in $(find qrcode -name '*.py' \
    | grep -v __init__ \
    | grep -v "qrcode.image.pure" \
    | grep -v "qrcode.tests" \
    | sort \
    | sed -e 's|/|.|g' \
    | sed -e 's|.py$||g');
do
    %{__python} -c "import $m"
done


%files
%doc LICENSE README.rst CHANGES.rst
%{python_sitelib}/*
%{_bindir}/qrcode
%{_mandir}/man1/qr.1.gz


%changelog
* Fri Oct 18 2013 Abel Luck <abel@outcomedubious.im> - 4.0.1-1
- Version bump
 
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Wed Jun  6 2012 Michel Salim <salimma@fedoraproject.org> - 2.4.1-2
- Clean up spec, removing unnecessary declarations
- Rename tool in %%{_bindir} to the less ambiguous qrcode

* Sat Jun  2 2012 Michel Salim <salimma@fedoraproject.org> - 2.4.1-1
- Initial package
openSUSE Build Service is sponsored by