66 lines
2.0 KiB
RPMSpec
66 lines
2.0 KiB
RPMSpec
Name: python-qrcode
|
|
Version: 6.1
|
|
Release: 2
|
|
Summary: Python QR Code image generator
|
|
License: BSD
|
|
URL: https://github.com/lincolnloop/python-qrcode
|
|
Source0: https://pypi.python.org/packages/source/q/qrcode/qrcode-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
BuildRequires: python3-devel python3-setuptools python3-imaging python3-six
|
|
%description
|
|
Python module for generating QR Codes.
|
|
|
|
%package -n python3-qrcode
|
|
Summary: Python QR Code image generator
|
|
Requires: python3-imaging python3-setuptools
|
|
Requires: python3-qrcode-core = %{version}-%{release}
|
|
%description -n python3-qrcode
|
|
Python module for generating QR Codes. Python 3 version.
|
|
|
|
%package -n python3-qrcode-core
|
|
Requires: python3-six
|
|
Summary: Python 3 QR Code image generator (core library)
|
|
%description -n python3-qrcode-core
|
|
Core Python 3 module for QR code generation. Does not contain image rendering.
|
|
|
|
%prep
|
|
%autosetup -n qrcode-%{version} -p1
|
|
rm qrcode/image/pure.py*
|
|
sed -i '1d' qrcode/console_scripts.py
|
|
|
|
%build
|
|
%py3_build
|
|
|
|
%install
|
|
%py3_install
|
|
ln -s qr %{buildroot}%{_bindir}/qrcode
|
|
|
|
%check
|
|
modules=$(find qrcode -name '*.py' \
|
|
| grep -v __init__ \
|
|
| sort \
|
|
| sed -e 's|/|.|g' \
|
|
| sed -e 's|.py$||g');
|
|
for m in $modules;
|
|
do
|
|
%{__python3} -c "import $m"
|
|
done
|
|
|
|
%files -n python3-qrcode
|
|
%{_bindir}/{qr,qrcode}
|
|
%{_mandir}/man1/qr.1*
|
|
%{python3_sitelib}/qrcode/image/{svg.py*,pil.py*}
|
|
%{python3_sitelib}/qrcode/image/__pycache__/{svg.*,pil.*}
|
|
|
|
%files -n python3-qrcode-core
|
|
%doc README.rst CHANGES.rst LICENSE
|
|
%{python3_sitelib}/qrcode*.egg-info
|
|
%{python3_sitelib}/qrcode/{*.py*,__pycache__}
|
|
%{python3_sitelib}/qrcode/image/{__init__.py*,base.py*}
|
|
%{python3_sitelib}/qrcode/image/__pycache__/{__init__.*,base.*}
|
|
%exclude %{python3_sitelib}/qrcode/tests
|
|
|
|
%changelog
|
|
* Thu May 14 2020 yanan li <liyanan032@huawei.com> - 6.1-2
|
|
- Package init
|