3 %bcond_without tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
8 Summary: QR Code image generator
13 Group: Libraries/Python
14 Source0: https://github.com/lincolnloop/python-qrcode/archive/v5.3/%{name}-%{version}.tar.gz
15 # Source0-md5: 81e3670f61bdf186ded61d6bafa847ec
16 URL: https://pypi.python.org/pypi/qrcode
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.714
20 BuildRequires: python-setuptools
22 BuildRequires: python-pillow
23 BuildRequires: python-six
27 BuildRequires: python3-setuptools
29 BuildRequires: python3-pillow
30 BuildRequires: python3-six
33 Requires: python-pillow
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 QR Code image generator.
41 %package -n python3-%{module}
42 Summary: QR Code image generator
43 Group: Libraries/Python
44 Requires: python3-pillow
47 %description -n python3-%{module}
48 QR Code image generator.
55 %py_build %{?with_tests:test -s qrcode.tests.test_qrcode}
59 %py3_build %{?with_tests:test -s qrcode.tests.test_qrcode}
63 rm -rf $RPM_BUILD_ROOT
76 rm -rf $RPM_BUILD_ROOT
80 %defattr(644,root,root,755)
81 %doc CHANGES.rst README.rst
82 %{py_sitescriptdir}/%{module}
83 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
87 %files -n python3-%{module}
88 %defattr(644,root,root,755)
89 %doc CHANGES.rst README.rst
90 %{py3_sitescriptdir}/%{module}
91 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
93 %attr(755,root,root) %{_bindir}/qr