From a53385baa7e9c8db71a301bb424a676046c08cf09392e93d1e37eb9ae4b745a7 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 20 Apr 2022 06:22:08 +0000 Subject: [PATCH] - Clean up of the SPEC file. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyQRCode?expand=0&rev=16 --- python-PyQRCode.changes | 5 +++++ python-PyQRCode.spec | 24 ++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/python-PyQRCode.changes b/python-PyQRCode.changes index d2dbd71..7d7e972 100644 --- a/python-PyQRCode.changes +++ b/python-PyQRCode.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 20 06:19:11 UTC 2022 - Matej Cepl + +- Clean up of the SPEC file. + ------------------------------------------------------------------- Wed Feb 2 13:12:20 UTC 2022 - Bernhard Wiedemann diff --git a/python-PyQRCode.spec b/python-PyQRCode.spec index 6aa9df6..3169545 100644 --- a/python-PyQRCode.spec +++ b/python-PyQRCode.spec @@ -1,7 +1,7 @@ # # spec file for package python-PyQRCode # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,16 +24,18 @@ Version: 1.3.6 Release: 0 Summary: Python 3 module to generate QR Codes License: MIT -URL: https://github.com/mnooner256/pyqrcode +URL: https://github.com/pyqrcode/pyqrcodeNG # 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 # PATCH-FIX-UPSTREAM https://github.com/pyqrcode/pyqrcodeNG/pull/18 Patch0: reproducible.patch BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pypng} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires(post): update-alternatives @@ -44,18 +46,24 @@ BuildArch: noarch %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! +%package -n %{name}-doc +Summary: Documentation files for %{name} + +%description -n %{name}-doc +HTML Documentation for %{name}. + %prep %autosetup -p1 -n pyqrcodeNG-%{version} sed -i -e '1{\@^#!%{_bindir}/env python@d}' pyqrcodeng/{cli,qrspecial}.py %build -%python_build +%pyproject_wheel python3 setup.py build_sphinx -v rm -rvf build/sphinx/html/.buildinfo %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/pyqr %python_expand %fdupes %{buildroot}/%{$python_sitelib} @@ -70,9 +78,13 @@ rm -rvf build/sphinx/html/.buildinfo %files %{python_files} %license LICENSE -%doc README.rst CHANGES.rst build/sphinx/html +%doc README.rst CHANGES.rst %{_bindir}/pyqr-%{python_bin_suffix} %python_alternative %{_bindir}/pyqr -%{python_sitelib}/* +%{python_sitelib}/PyQRCodeNG-%{version}*-info +%{python_sitelib}/pyqrcodeng + +%files -n %{name}-doc +%doc build/sphinx/html %changelog