summaryrefslogtreecommitdiffstats
path: root/healthcare/python-qrcode.spec
blob: 2104d57b05c226f7db7a0821785abd3509464c2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%global pkgname qrcode

Name:           python-%{pkgname}
Version:        2.4.1
Release:        2%{?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
Requires:       python-imaging

%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 $RPM_BUILD_ROOT
%{__mv} $RPM_BUILD_ROOT%{_bindir}/qr{,code}


%check
# in lieue of a real test suite
for m in $(find qrcode -name '*.py' \
    | grep -v __init__ \
    | 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


%changelog
* 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