|
|
|
@ -1,69 +1,72 @@
|
|
|
|
|
## START: Set by rpmautospec
|
|
|
|
|
## (rpmautospec version 0.6.5)
|
|
|
|
|
## RPMAUTOSPEC: autorelease, autochangelog
|
|
|
|
|
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
|
|
|
|
release_number = 13;
|
|
|
|
|
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
|
|
|
|
print(release_number + base_release_number - 1);
|
|
|
|
|
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
|
|
|
|
## END: Set by rpmautospec
|
|
|
|
|
|
|
|
|
|
%global pkgname qrcode
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
|
# RHEL only ships qrcode-core and does not have pillow
|
|
|
|
|
%bcond_without coreonly
|
|
|
|
|
%else
|
|
|
|
|
%bcond_with coreonly
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: python-%{pkgname}
|
|
|
|
|
Version: 7.4.2
|
|
|
|
|
Release: %autorelease
|
|
|
|
|
Version: 6.1
|
|
|
|
|
Release: 12%{?dist}
|
|
|
|
|
Summary: Python QR Code image generator
|
|
|
|
|
|
|
|
|
|
License: BSD-3-Clause
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: https://github.com/lincolnloop/python-qrcode
|
|
|
|
|
Source0: %{pypi_source qrcode}
|
|
|
|
|
Source0: https://pypi.python.org/packages/source/q/qrcode/qrcode-%{version}.tar.gz
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: python3-six
|
|
|
|
|
%if %{without coreonly}
|
|
|
|
|
BuildRequires: python3-imaging
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Comment out failing test
|
|
|
|
|
Patch0: qrcode_test.patch
|
|
|
|
|
# Fix failure with Python3.12
|
|
|
|
|
Patch1: qrcode_assert-has-calls.patch
|
|
|
|
|
# Make pypng requirement optional
|
|
|
|
|
# https://github.com/lincolnloop/python-qrcode/pull/338
|
|
|
|
|
Patch2: qrcode-optional-pypng.patch
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
%global _description\
|
|
|
|
|
This module uses the Python Imaging Library (PIL) to allow for the\
|
|
|
|
|
generation of QR Codes.
|
|
|
|
|
|
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
|
|
%if %{without coreonly}
|
|
|
|
|
%package -n python3-%{pkgname}
|
|
|
|
|
Summary: Python QR Code image generator
|
|
|
|
|
Obsoletes: python3-qrcode-core < 7.4.2-2
|
|
|
|
|
Provides: python3-qrcode-core = %{version}-%{release}
|
|
|
|
|
Requires: python3-imaging
|
|
|
|
|
# For entry point:
|
|
|
|
|
Requires: python3-setuptools
|
|
|
|
|
Requires: python3-%{pkgname}-core = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{pkgname}
|
|
|
|
|
This module uses the Python Imaging Library (PIL) to allow for the
|
|
|
|
|
generation of QR Codes. Python 3 version.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%package -n python3-%{pkgname}-core
|
|
|
|
|
Requires: python3-six
|
|
|
|
|
Summary: Python 3 QR Code image generator (core library)
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
# RHEL does not include the extra test dependencies (coverage, pillow)
|
|
|
|
|
%pyproject_buildrequires %{?!rhel:-x test -x pil -x png}
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{pkgname}-core
|
|
|
|
|
Core Python 3 module for QR code generation. Does not contain image rendering.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n qrcode-%{version} -p1
|
|
|
|
|
%autosetup -n qrcode-%{version}
|
|
|
|
|
|
|
|
|
|
# The pure plugin requires pymaging which is not packaged in Fedora.
|
|
|
|
|
rm qrcode/image/pure.py*
|
|
|
|
|
|
|
|
|
|
# Remove shebang
|
|
|
|
|
sed -i '1d' qrcode/console_scripts.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%pyproject_install
|
|
|
|
|
%pyproject_save_files qrcode
|
|
|
|
|
%py3_install
|
|
|
|
|
|
|
|
|
|
# Do not install tests
|
|
|
|
|
rm -r %{buildroot}%{python3_sitelib}/%{pkgname}/tests
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# In previous iterations of the package, the qr script had been
|
|
|
|
@ -73,74 +76,60 @@ sed -i '1d' qrcode/console_scripts.py
|
|
|
|
|
#
|
|
|
|
|
ln -s qr %{buildroot}%{_bindir}/qrcode
|
|
|
|
|
|
|
|
|
|
%if %{with coreonly}
|
|
|
|
|
# remove files that were part of python3-qrcode package and not shipped in
|
|
|
|
|
# python3-qrcode-core
|
|
|
|
|
rm %{buildroot}%{_bindir}/qr
|
|
|
|
|
rm %{buildroot}%{_bindir}/qrcode
|
|
|
|
|
rm %{buildroot}%{_mandir}/man1/qr.1*
|
|
|
|
|
%pycached rm %{buildroot}%{python3_sitelib}/%{pkgname}/image/svg.py
|
|
|
|
|
%pycached rm %{buildroot}%{python3_sitelib}/%{pkgname}/image/pil.py
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%pytest -v
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{pkgname} -f %{pyproject_files}
|
|
|
|
|
%doc README.rst CHANGES.rst
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%if %{with coreonly}
|
|
|
|
|
# test method requires PIL
|
|
|
|
|
sed -i s/test_render_pil/disabled_render_pil/g qrcode/tests/test_qrcode.py
|
|
|
|
|
%endif
|
|
|
|
|
PYTHONPATH=%{buildroot}%{python3_sitelib} \
|
|
|
|
|
%{__python3} -m unittest -v qrcode.tests.test_qrcode.QRCodeTests
|
|
|
|
|
|
|
|
|
|
%if %{without coreonly}
|
|
|
|
|
%files -n python3-%{pkgname}
|
|
|
|
|
%{_bindir}/qr
|
|
|
|
|
%{_bindir}/qrcode
|
|
|
|
|
%{_mandir}/man1/qr.1*
|
|
|
|
|
%pycached %{python3_sitelib}/%{pkgname}/image/svg.py
|
|
|
|
|
%pycached %{python3_sitelib}/%{pkgname}/image/pil.py
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
## START: Generated by rpmautospec
|
|
|
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 7.4.2-13
|
|
|
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
|
|
|
|
|
|
* Wed Jul 03 2024 Sudhir Menon <sumenon@redhat.com> - 7.4.2-12
|
|
|
|
|
- Added gating.yaml and tests for python-qrcode
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 7.4.2-11
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 7.4.2-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 7.4.2-9
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Aug 23 2023 Florence Blanc-Renaud <frenaud@redhat.com> - 7.4.2-8
|
|
|
|
|
- migrated to SPDX license
|
|
|
|
|
|
|
|
|
|
* Tue Jul 25 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 7.4.2-7
|
|
|
|
|
- Make pypng requirement optional
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.4.2-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 7.4.2-5
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Tue May 23 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 7.4.2-4
|
|
|
|
|
- Migrate from tox to pytest, avoid unwanted deps in RHEL builds
|
|
|
|
|
%files -n python3-%{pkgname}-core
|
|
|
|
|
%doc README.rst CHANGES.rst
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{python3_sitelib}/%{pkgname}
|
|
|
|
|
%{python3_sitelib}/%{pkgname}*.egg-info
|
|
|
|
|
|
|
|
|
|
* Fri May 12 2023 Sandro Mani <manisandro@gmail.com> - 7.4.2-3
|
|
|
|
|
- Add patch to fix test failures with py3.12
|
|
|
|
|
%if %{without coreonly}
|
|
|
|
|
%pycached %exclude %{python3_sitelib}/%{pkgname}/image/svg.py
|
|
|
|
|
%pycached %exclude %{python3_sitelib}/%{pkgname}/image/pil.py
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
* Mon May 01 2023 Sandro Mani <manisandro@gmail.com> - 7.4.2-2
|
|
|
|
|
- Switch to pyproject macros
|
|
|
|
|
|
|
|
|
|
* Mon May 01 2023 Sandro Mani <manisandro@gmail.com> - 7.4.2-1
|
|
|
|
|
- Update to 7.4.2
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 6.1-12
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Tue Jan 04 2022 Michel Alexandre Salim <salimma@fedoraproject.org> - 7.3.1-3
|
|
|
|
|
- Opt in to rpmautospec
|
|
|
|
|
* Thu Apr 22 2021 Christian Heimes <cheimes@redhat.com> - 6.1-11
|
|
|
|
|
- Build only python3-qrcode-core on RHEL
|
|
|
|
|
- Related: #1935839
|
|
|
|
|
|
|
|
|
|
* Tue Jan 04 2022 Christian Heimes <cheimes@redhat.com> - 7.3.1-2
|
|
|
|
|
- Remove python-imaging build requirements for RHEL (#1935839)
|
|
|
|
|
* Thu Apr 22 2021 Christian Heimes <cheimes@redhat.com> - 6.1-10
|
|
|
|
|
- Resolves: #1935839 Remove python-imaging build requirements for RHEL
|
|
|
|
|
- Run unit tests during build
|
|
|
|
|
|
|
|
|
|
* Thu Dec 09 2021 Sandro Mani <manisandro@gmail.com> - 7.3.1-1
|
|
|
|
|
- Update to 7.3.1
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 6.1-9
|
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 6.1-9
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
@ -246,5 +235,3 @@ ln -s qr %{buildroot}%{_bindir}/qrcode
|
|
|
|
|
|
|
|
|
|
* Sat Jun 2 2012 Michel Salim <salimma@fedoraproject.org> - 2.4.1-1
|
|
|
|
|
- Initial package
|
|
|
|
|
|
|
|
|
|
## END: Generated by rpmautospec
|
|
|
|
|