Compare commits
No commits in common. "c8s-stream-DL1" and "imports/c9/python-qrcode-6.1-12.el9" have entirely different histories.
c8s-stream
...
imports/c9
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/qrcode-5.1.tar.gz
|
SOURCES/qrcode-6.1.tar.gz
|
||||||
|
@ -1 +1 @@
|
|||||||
686d017fb655fa2f1d600b1a8672f5ee538ec2d6 SOURCES/qrcode-5.1.tar.gz
|
1d21c20127c435c43e6365f4166857546fcac074 SOURCES/qrcode-6.1.tar.gz
|
||||||
|
@ -1,77 +1,47 @@
|
|||||||
%global pkgname qrcode
|
%global pkgname qrcode
|
||||||
|
|
||||||
%if 0%{?rhel} > 7
|
%if 0%{?rhel}
|
||||||
# Disable python2 build by default
|
# RHEL only ships qrcode-core and does not have pillow
|
||||||
%bcond_with python2
|
%bcond_without coreonly
|
||||||
%else
|
%else
|
||||||
%bcond_without python2
|
%bcond_with coreonly
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: python-%{pkgname}
|
Name: python-%{pkgname}
|
||||||
Version: 5.1
|
Version: 6.1
|
||||||
Release: 12%{?dist}
|
Release: 12%{?dist}
|
||||||
Summary: Python QR Code image generator
|
Summary: Python QR Code image generator
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://github.com/lincolnloop/python-qrcode
|
URL: https://github.com/lincolnloop/python-qrcode
|
||||||
Source0: http://pypi.python.org/packages/source/q/qrcode/qrcode-%{version}.tar.gz
|
Source0: https://pypi.python.org/packages/source/q/qrcode/qrcode-%{version}.tar.gz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%if %{with python2}
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python2-setuptools
|
|
||||||
BuildRequires: python2-imaging
|
|
||||||
BuildRequires: python2-six
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-imaging
|
|
||||||
BuildRequires: python3-six
|
BuildRequires: python3-six
|
||||||
|
%if %{without coreonly}
|
||||||
|
BuildRequires: python3-imaging
|
||||||
|
%endif
|
||||||
|
|
||||||
%global _description\
|
%global _description\
|
||||||
This module uses the Python Imaging Library (PIL) to allow for the\
|
This module uses the Python Imaging Library (PIL) to allow for the\
|
||||||
generation of QR Codes.\
|
generation of QR Codes.
|
||||||
|
|
||||||
|
|
||||||
%description %_description
|
%description %_description
|
||||||
|
|
||||||
%if %{with python2}
|
%if %{without coreonly}
|
||||||
%package -n python2-%{pkgname}
|
|
||||||
Summary: %summary
|
|
||||||
Requires: python2-imaging
|
|
||||||
Requires: python2-%{pkgname}-core = %{version}-%{release}
|
|
||||||
%{?python_provide:%python_provide python2-%{pkgname}}
|
|
||||||
|
|
||||||
%description -n python2-%{pkgname} %_description
|
|
||||||
|
|
||||||
%package -n python2-%{pkgname}-core
|
|
||||||
Requires: python-six
|
|
||||||
Conflicts: python-qrcode < 5.0
|
|
||||||
Summary: Python 2 QR Code image generator (core library)
|
|
||||||
%{?python_provide:%python_provide python2-%{pkgname}-core}
|
|
||||||
|
|
||||||
%description -n python2-%{pkgname}-core
|
|
||||||
Core Python 2 module for QR code generation. Does not contain image rendering.
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
|
|
||||||
%package -n python3-%{pkgname}
|
%package -n python3-%{pkgname}
|
||||||
Summary: Python QR Code image generator
|
Summary: Python QR Code image generator
|
||||||
Requires: python3-imaging
|
Requires: python3-imaging
|
||||||
# For entry point:
|
# For entry point:
|
||||||
%if 0%{?rhel} && 0%{?rhel} >= 8
|
|
||||||
Requires: platform-python-setuptools
|
|
||||||
%else
|
|
||||||
Requires: python3-setuptools
|
Requires: python3-setuptools
|
||||||
%endif
|
|
||||||
Requires: python3-%{pkgname}-core = %{version}-%{release}
|
Requires: python3-%{pkgname}-core = %{version}-%{release}
|
||||||
|
|
||||||
%description -n python3-%{pkgname}
|
%description -n python3-%{pkgname}
|
||||||
This module uses the Python Imaging Library (PIL) to allow for the
|
This module uses the Python Imaging Library (PIL) to allow for the
|
||||||
generation of QR Codes. Python 3 version.
|
generation of QR Codes. Python 3 version.
|
||||||
|
%endif
|
||||||
|
|
||||||
%package -n python3-%{pkgname}-core
|
%package -n python3-%{pkgname}-core
|
||||||
Requires: python3-six
|
Requires: python3-six
|
||||||
@ -80,59 +50,23 @@ Summary: Python 3 QR Code image generator (core library)
|
|||||||
%description -n python3-%{pkgname}-core
|
%description -n python3-%{pkgname}-core
|
||||||
Core Python 3 module for QR code generation. Does not contain image rendering.
|
Core Python 3 module for QR code generation. Does not contain image rendering.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qc
|
%autosetup -n qrcode-%{version}
|
||||||
|
|
||||||
%if %{with python2}
|
|
||||||
cp -a %{pkgname}-%{version} python2
|
|
||||||
|
|
||||||
# The pure plugin requires pymaging which is not packaged in Fedora.
|
# The pure plugin requires pymaging which is not packaged in Fedora.
|
||||||
rm python2/qrcode/image/pure.py*
|
rm qrcode/image/pure.py*
|
||||||
|
|
||||||
# Remove shebang
|
# Remove shebang
|
||||||
sed -i '1d' python2/qrcode/console_scripts.py
|
sed -i '1d' qrcode/console_scripts.py
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
cp -a %{pkgname}-%{version} python3
|
|
||||||
|
|
||||||
# The pure plugin requires pymaging which is not packaged in Fedora.
|
|
||||||
rm python3/qrcode/image/pure.py*
|
|
||||||
|
|
||||||
# Remove shebang
|
|
||||||
sed -i '1d' python3/qrcode/console_scripts.py
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with python2}
|
|
||||||
pushd python2
|
|
||||||
%py2_build
|
|
||||||
popd
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
pushd python3
|
|
||||||
%py3_build
|
%py3_build
|
||||||
popd
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with python2}
|
|
||||||
pushd python2
|
|
||||||
%py2_install
|
|
||||||
|
|
||||||
# Be sure binscripts are Python 3
|
|
||||||
rm %{buildroot}%{_bindir}/*
|
|
||||||
|
|
||||||
# Do not install tests
|
|
||||||
rm -r %{buildroot}%{python2_sitelib}/%{pkgname}/tests
|
|
||||||
popd
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
pushd python3
|
|
||||||
%py3_install
|
%py3_install
|
||||||
|
|
||||||
# Do not install tests
|
# Do not install tests
|
||||||
rm -r %{buildroot}%{python3_sitelib}/%{pkgname}/tests
|
rm -r %{buildroot}%{python3_sitelib}/%{pkgname}/tests
|
||||||
popd
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# In previous iterations of the package, the qr script had been
|
# In previous iterations of the package, the qr script had been
|
||||||
@ -142,82 +76,101 @@ popd
|
|||||||
#
|
#
|
||||||
ln -s qr %{buildroot}%{_bindir}/qrcode
|
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
|
%check
|
||||||
# in lieue of a real test suite
|
%if %{with coreonly}
|
||||||
modules=$(find qrcode -name '*.py' \
|
# test method requires PIL
|
||||||
| grep -v __init__ \
|
sed -i s/test_render_pil/disabled_render_pil/g qrcode/tests/test_qrcode.py
|
||||||
| sort \
|
%endif
|
||||||
| sed -e 's|/|.|g' \
|
PYTHONPATH=%{buildroot}%{python3_sitelib} \
|
||||||
| sed -e 's|.py$||g');
|
%{__python3} -m unittest -v qrcode.tests.test_qrcode.QRCodeTests
|
||||||
|
|
||||||
|
|
||||||
%if %{with python2}
|
|
||||||
pushd python2
|
|
||||||
for m in $modules;
|
|
||||||
do
|
|
||||||
%{__python2} -c "import $m"
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
pushd python3
|
|
||||||
for m in $modules;
|
|
||||||
do
|
|
||||||
%{__python3} -c "import $m"
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
|
|
||||||
|
|
||||||
%if %{with python2}
|
|
||||||
%files -n python2-%{pkgname}
|
|
||||||
%{python2_sitelib}/%{pkgname}/image/svg.py*
|
|
||||||
%{python2_sitelib}/%{pkgname}/image/pil.py*
|
|
||||||
|
|
||||||
|
|
||||||
%files -n python2-%{pkgname}-core
|
|
||||||
%doc python2/README.rst python2/CHANGES.rst
|
|
||||||
%license python2/LICENSE
|
|
||||||
%dir %{python2_sitelib}/%{pkgname}/
|
|
||||||
%dir %{python2_sitelib}/%{pkgname}/image
|
|
||||||
%{python2_sitelib}/%{pkgname}*.egg-info
|
|
||||||
%{python2_sitelib}/%{pkgname}/*.py*
|
|
||||||
%{python2_sitelib}/%{pkgname}/image/__init__.py*
|
|
||||||
%{python2_sitelib}/%{pkgname}/image/base.py*
|
|
||||||
%endif # with python2
|
|
||||||
|
|
||||||
|
|
||||||
|
%if %{without coreonly}
|
||||||
%files -n python3-%{pkgname}
|
%files -n python3-%{pkgname}
|
||||||
%{_bindir}/qr
|
%{_bindir}/qr
|
||||||
%{_bindir}/qrcode
|
%{_bindir}/qrcode
|
||||||
%{_mandir}/man1/qr.1*
|
%{_mandir}/man1/qr.1*
|
||||||
%{python3_sitelib}/%{pkgname}/image/svg.py*
|
%pycached %{python3_sitelib}/%{pkgname}/image/svg.py
|
||||||
%{python3_sitelib}/%{pkgname}/image/pil.py*
|
%pycached %{python3_sitelib}/%{pkgname}/image/pil.py
|
||||||
%{python3_sitelib}/%{pkgname}/image/__pycache__/svg.*
|
%endif
|
||||||
%{python3_sitelib}/%{pkgname}/image/__pycache__/pil.*
|
|
||||||
|
|
||||||
|
%files -n python3-%{pkgname}-core
|
||||||
%files -n python3-%{pkgname}-core
|
%doc README.rst CHANGES.rst
|
||||||
%doc python3/README.rst python3/CHANGES.rst
|
%license LICENSE
|
||||||
%license python3/LICENSE
|
%{python3_sitelib}/%{pkgname}
|
||||||
%dir %{python3_sitelib}/%{pkgname}/
|
|
||||||
%dir %{python3_sitelib}/%{pkgname}/image
|
|
||||||
%dir %{python3_sitelib}/%{pkgname}/image/__pycache__
|
|
||||||
%{python3_sitelib}/%{pkgname}*.egg-info
|
%{python3_sitelib}/%{pkgname}*.egg-info
|
||||||
%{python3_sitelib}/%{pkgname}/*.py*
|
|
||||||
%{python3_sitelib}/%{pkgname}/__pycache__
|
%if %{without coreonly}
|
||||||
%{python3_sitelib}/%{pkgname}/image/__init__.py*
|
%pycached %exclude %{python3_sitelib}/%{pkgname}/image/svg.py
|
||||||
%{python3_sitelib}/%{pkgname}/image/base.py*
|
%pycached %exclude %{python3_sitelib}/%{pkgname}/image/pil.py
|
||||||
%{python3_sitelib}/%{pkgname}/image/__pycache__/__init__.*
|
%endif
|
||||||
%{python3_sitelib}/%{pkgname}/image/__pycache__/base.*
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Nov 28 2018 Tomas Orsava <torsava@redhat.com> - 5.1-12
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 6.1-12
|
||||||
- Require platform-python-setuptools instead of python3-setuptools
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
- Resolves: rhbz#1654457, rhbz#1654458
|
Related: rhbz#1991688
|
||||||
|
|
||||||
* Fri Jun 22 2018 Charalampos Stratakis <cstratak@redhat.com> - 5.1-11
|
* Thu Apr 22 2021 Christian Heimes <cheimes@redhat.com> - 6.1-11
|
||||||
- Conditionalize the python2 subpackage
|
- Build only python3-qrcode-core on RHEL
|
||||||
|
- Related: #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
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 6.1-6
|
||||||
|
- Rebuilt for Python 3.9
|
||||||
|
|
||||||
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 6.1-4
|
||||||
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||||
|
|
||||||
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 6.1-3
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun May 26 2019 Fabian Affolter <mail@fabian-affolter.ch> - 6.1-1
|
||||||
|
- Update to latest upstream release 6.1
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1-15
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Oct 11 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 5.1-14
|
||||||
|
- Python2 binary package has been removed
|
||||||
|
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.1-13
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 5.1-12
|
||||||
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
|
* Fri Mar 23 2018 Iryna Shcherbina <ishcherb@redhat.com> - 5.1-11
|
||||||
|
- Update Python 2 dependency declarations to new packaging standards
|
||||||
|
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||||
|
|
||||||
* Tue Mar 20 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 5.1-10
|
* Tue Mar 20 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 5.1-10
|
||||||
- Also rename python-qrcode-core to python2-qrcode-core
|
- Also rename python-qrcode-core to python2-qrcode-core
|
||||||
|
Loading…
Reference in New Issue
Block a user