14
0
Files
python-PyQRCode/python-PyQRCode.spec
Matej Cepl 008bab3129 - Update to 1.3.6:
- Code improvements / refactorings
  - Optimized generation of numerical QR Codes
  - MUCH faster PNG writing (approx. twice as fast)
  - Don't raise a UnicodeError if the user provided binary data
    and sets the mode explicitly to 'binary'. Fixed by Mathieu
    <https://github.com/albatros69> (PR #13)
  - The builder raises more specific exceptions like
    VersionError, MaskError, DataOverflowError. This change is
    backwards compatible since all exceptions are inherited from
    ValueError.
  - Added "designator" property to QRCode. This encodes the
    version number and error correction level, i.e. "1-H"
  - Fixed alphanumeric encoding. The bug was introduced in the
    1.3.4 release
  - Added more test cases
  - Added CLI docs
  - (Deprecated) QRCode.terminal() did not work. Fixed.
  - Initial release of PyQRCode NG (PyQRCode Next Generation)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyQRCode?expand=0&rev=14
2021-12-09 16:14:20 +00:00

77 lines
2.4 KiB
RPMSpec

#
# spec file for package python-PyQRCode
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%define modname PyQRCode
Name: python-PyQRCode
Version: 1.3.6
Release: 0
Summary: Python 3 module to generate QR Codes
License: MIT
URL: https://github.com/mnooner256/pyqrcode
# This is unofficial fork with some additional fixes, the canonical
# upstream repository is dead.
Source: https://github.com/pyqrcode/pyqrcodeNG/archive/refs/tags/%{version}.tar.gz#/pyqrcodeNG-%{version}.tar.gz
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module pypng}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages
%description
The PyQRCode module is a QR code generator that is simple to use and written in pure python. The module can automates most of the building process for creating QR codes. Most codes can be created using only two lines of code!
%prep
%autosetup -p1 -n pyqrcodeNG-%{version}
sed -i -e '1{\@^#!%{_bindir}/env python@d}' pyqrcodeng/{cli,qrspecial}.py
%build
%python_build
python3 setup.py build_sphinx -v
rm -rvf build/sphinx/html/.buildinfo
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/pyqr
%python_expand %fdupes %{buildroot}/%{$python_sitelib}
%check
%pytest
%post
%python_install_alternative pyqr
%postun
%python_uninstall_alternative pyqr
%files %{python_files}
%license LICENSE
%doc README.rst CHANGES.rst build/sphinx/html
%{_bindir}/pyqr-%{python_bin_suffix}
%python_alternative %{_bindir}/pyqr
%{python_sitelib}/*
%changelog