]> git.pld-linux.org Git - packages/python-qrcode.git/blob - python-qrcode.spec
4f229d69d050f269565a8758dc11b2336fa73039
[packages/python-qrcode.git] / python-qrcode.spec
1 #
2 # Conditional build:
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
6
7 %define         module          qrcode
8 Summary:        QR Code image generator
9 Name:           python-%{module}
10 Version:        5.3
11 Release:        6
12 License:        BSD
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
19 %if %{with python2}
20 BuildRequires:  python-setuptools
21 %if %{with tests}
22 BuildRequires:  python-pillow
23 BuildRequires:  python-six
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-setuptools
28 %if %{with tests}
29 BuildRequires:  python3-pillow
30 BuildRequires:  python3-six
31 %endif
32 %endif
33 Requires:       python-pillow
34 Requires:       python-six
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 QR Code image generator.
40
41 %package -n python3-%{module}
42 Summary:        QR Code image generator
43 Group:          Libraries/Python
44 Requires:       python3-pillow
45 Requires:       python3-six
46
47 %description -n python3-%{module}
48 QR Code image generator.
49
50 %prep
51 %setup -q
52
53 %build
54 %if %{with python2}
55 %py_build %{?with_tests:test -s qrcode.tests.test_qrcode}
56 %endif
57
58 %if %{with python3}
59 %py3_build %{?with_tests:test -s qrcode.tests.test_qrcode}
60 %endif
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64
65 %if %{with python2}
66 %py_install
67
68 %py_postclean
69 %endif
70
71 %if %{with python3}
72 %py3_install
73 %endif
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %if %{with python2}
79 %files
80 %defattr(644,root,root,755)
81 %doc CHANGES.rst README.rst
82 %{py_sitescriptdir}/%{module}
83 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
84 %endif
85
86 %if %{with python3}
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
92
93 %attr(755,root,root) %{_bindir}/qr
94 %{_mandir}/man1/qr.1*
95 %endif
This page took 0.070039 seconds and 2 git commands to generate.