From ecb4f169f9eb08168d880b56ab1cce1bda9e6f84 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Oct 11 2018 08:44:59 +0000 Subject: Python2 binary package has been removed --- diff --git a/python-pypng.spec b/python-pypng.spec index 929b4e4..d8efd82 100644 --- a/python-pypng.spec +++ b/python-pypng.spec @@ -1,18 +1,8 @@ -%if 0%{?rhel} && 0%{?rhel} <= 6 -%{!?__python2: %global __python2 /usr/bin/python2} -%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%endif - -%if 0%{?fedora} -%global with_python3 1 -%endif - %global modname pypng Name: python-pypng Version: 0.0.18 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Pure Python PNG image encoder/decoder Group: Development/Libraries @@ -22,15 +12,9 @@ Source0: https://github.com/drj11/%{modname}/archive/%{modname}-%{ver BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python2-nose BuildRequires: /usr/bin/2to3 - -%if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-nose -BuildRequires: python2-tools -%endif %global _description\ PyPNG allows PNG image files to be read and written using pure Python.\ @@ -41,16 +25,9 @@ Documentation is kindly hosted by PyPI http://pythonhosted.org/pypng/ %description %_description -%package -n python2-pypng -Summary: %summary -%{?python_provide:%python_provide python2-pypng} - -%description -n python2-pypng %_description - -%if 0%{?with_python3} %package -n python3-pypng Summary: Pure Python PNG image encoder/decoder -Group: Development/Libraries +%{?python_provide:%python_provide python3-pypng} %description -n python3-pypng PyPNG allows PNG image files to be read and written using pure Python. @@ -58,7 +35,6 @@ PyPNG allows PNG image files to be read and written using pure Python. It's available from github.com https://github.com/drj11/pypng Documentation is kindly hosted by PyPI http://pythonhosted.org/pypng/ -%endif %prep %setup -q -n %{modname}-%{modname}-%{version} @@ -72,50 +48,28 @@ sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -2to3 --write --nobackups %{py3dir} -%endif +2to3 --write --nobackups . %build -%{__python2} setup.py build -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd -%endif +%py3_build %install -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root=%{buildroot} -popd -%endif -%{__python2} setup.py install -O1 --skip-build --root=%{buildroot} +%py3_install %check -nosetests code/png.py -%if 0%{?with_python3} -pushd %{py3dir} -nosetests-%{python3_version} code/png.py -popd -%endif - -%files -n python2-pypng -%doc README.txt LICENCE -%{python2_sitelib}/png.py* -%{python2_sitelib}/%{modname}-%{version}* +nosetests-3 code/png.py -%if 0%{?with_python3} %files -n python3-pypng %doc README.txt LICENCE %{python3_sitelib}/png.py* %{python3_sitelib}/__pycache__/png* %{python3_sitelib}/%{modname}-%{version}-* -%endif %changelog +* Thu Oct 11 2018 Miro Hrončok - 0.0.18-13 +- Python2 binary package has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + * Sat Jul 14 2018 Fedora Release Engineering - 0.0.18-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild