diff --git a/python-qrcode.spec b/python-qrcode.spec index 5209ebf..ef72cee 100644 --- a/python-qrcode.spec +++ b/python-qrcode.spec @@ -2,7 +2,7 @@ Name: python-%{pkgname} Version: 5.1 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Python QR Code image generator License: BSD @@ -11,11 +11,6 @@ Source0: http://pypi.python.org/packages/source/q/qrcode/qrcode-%{version BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-imaging -BuildRequires: python2-six - BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-imaging @@ -23,29 +18,10 @@ BuildRequires: python3-six %global _description\ This module uses the Python Imaging Library (PIL) to allow for the\ -generation of QR Codes.\ - +generation of QR Codes. %description %_description -%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: python2-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. - - %package -n python3-%{pkgname} Summary: Python QR Code image generator Requires: python3-imaging @@ -67,45 +43,22 @@ Core Python 3 module for QR code generation. Does not contain image rendering. %prep -%setup -qc - -mv %{pkgname}-%{version} python2 +%setup -q -n qrcode-%{version} # The pure plugin requires pymaging which is not packaged in Fedora. -rm python2/qrcode/image/pure.py* +rm qrcode/image/pure.py* # Remove shebang -sed -i '1d' python2/qrcode/console_scripts.py - -cp -a python{2,3} - +sed -i '1d' qrcode/console_scripts.py %build -pushd python2 -%{__python2} setup.py build -popd - -pushd python3 -%{__python3} setup.py build -popd +%py3_build %install -pushd python2 -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} - -# Be sure binscripts are Python 3 -rm %{buildroot}%{_bindir}/* - -# Do not install tests -rm -r %{buildroot}%{python2_sitelib}/%{pkgname}/tests -popd - -pushd python3 -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +%py3_install # Do not install tests rm -r %{buildroot}%{python3_sitelib}/%{pkgname}/tests -popd # # In previous iterations of the package, the qr script had been @@ -124,36 +77,10 @@ modules=$(find qrcode -name '*.py' \ | sed -e 's|.py$||g'); -pushd python2 -for m in $modules; -do - %{__python2} -c "import $m" -done -popd - -pushd python3 for m in $modules; do %{__python3} -c "import $m" done -popd - - - -%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* %files -n python3-%{pkgname} @@ -167,8 +94,8 @@ popd %files -n python3-%{pkgname}-core -%doc python3/README.rst python3/CHANGES.rst -%license python3/LICENSE +%doc README.rst CHANGES.rst +%license LICENSE %dir %{python3_sitelib}/%{pkgname}/ %dir %{python3_sitelib}/%{pkgname}/image %dir %{python3_sitelib}/%{pkgname}/image/__pycache__ @@ -182,6 +109,10 @@ popd %changelog +* Thu Oct 11 2018 Zbigniew Jędrzejewski-Szmek - 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 - 5.1-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild