diff --git a/python-kitchen.spec b/python-kitchen.spec index 9a6c331..d096fde 100644 --- a/python-kitchen.spec +++ b/python-kitchen.spec @@ -1,20 +1,6 @@ -%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 - -%global with_python3 1 - -%if 0%{?fedora} -%{!?python3_pkgversion: %global python3_pkgversion 3} -%else -%{!?python3_pkgversion: %global python3_pkgversion 34} -%endif - Name: python-kitchen Version: 1.2.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Small, useful pieces of code to make python coding easier License: LGPLv2+ @@ -23,28 +9,14 @@ Source0: https://github.com/fedora-infra/kitchen/archive/%{version}.tar.g BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python2-nose -# For the subprocess test -BuildRequires: python2-test - -%if 0%{?rhel} -BuildRequires: python-sphinx -%endif - -%if 0%{?fedora} || 0%{?rhel} > 6 -# At present, chardet isn't present in epel but it's a soft dep -BuildRequires: python2-chardet -Requires: python2-chardet -%endif - BuildRequires: langpacks-pt_BR -%if 0%{?with_python3} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-nose BuildRequires: python%{python3_pkgversion}-test BuildRequires: python%{python3_pkgversion}-chardet +%if 0%{?rhel} +BuildRequires: python%{python3_pkgversion}-sphinx %endif %description @@ -53,32 +25,6 @@ text easier (conversion with bytes, outputting xml, and calculating how many columns a string takes), and compatibility modules for writing code that uses python-2.7 modules but needs to run on python-2.3. -%package doc -Summary: API documentation for the Kitchen python2 module -# Currently discussing guidelines about doc subpackages Requiring the main package: -# https://lists.fedoraproject.org/pipermail/packaging/2013-June/009191.html -#Requires: python2-kitchen = %{version}-%{release} -%description doc -kitchen includes functions to make gettext easier to use, handling unicode -text easier (conversion with bytes, outputting xml, and calculating how many -columns a string takes), and compatibility modules for writing code that uses -python-2.7 modules but needs to run on python-2.3. - -This package contains the API documenation for programming with the -python-2 version of the kitchen library. - -%package -n python2-kitchen -Summary: Small, useful pieces of code to make python 2 coding easier -%{?python_provide:%python_provide python2-kitchen} - -%description -n python2-kitchen -kitchen includes functions to make gettext easier to use, handling unicode -text easier (conversion with bytes, outputting xml, and calculating how many -columns a string takes). - -This is the python2 version of the kitchen module. - -%if 0%{?with_python3} %package -n python%{python3_pkgversion}-kitchen Summary: Small, useful pieces of code to make python 3 coding easier %{?python_provide:%python_provide python%{python3_pkgversion}-kitchen} @@ -95,7 +41,7 @@ This is the python3 version of the kitchen module. %package -n python%{python3_pkgversion}-kitchen-doc Summary: API documentation for the Kitchen python3 module -#Requires: python2-kitchen = %{version}-%{release} +#Requires: python3-kitchen = %{version}-%{release} %description -n python%{python3_pkgversion}-kitchen-doc kitchen includes functions to make gettext easier to use, handling unicode text easier (conversion with bytes, outputting xml, and calculating how many @@ -103,8 +49,6 @@ columns a string takes). This package contains the API documenation for programming with the python-3 version of the kitchen library. -%endif - %prep %autosetup -p1 -n kitchen-%{version} @@ -112,19 +56,8 @@ python-3 version of the kitchen library. # Remove bundled egg info, if any. rm -rf *.egg* -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - %build -%{py2_build} - -%if 0%{?with_python3} -pushd %{py3dir} %{py3_build} -popd -%endif # Build docs %if 0%{?rhel} @@ -134,44 +67,15 @@ rm -rf html/.buildinfo %endif %install -%{py2_install} - -%if 0%{?with_python3} -pushd %{py3dir} %{py3_install} -popd -%endif # %check # # In current mock, the PATH isn't being reset. This causes failures in some # # subprocess tests as a check tests /root/bin/PROGRAM and fails with Permission # # Denied instead of File Not Found. reseting the PATH works around this. # PATH=/bin:/usr/bin -# %if 0%{?fedora} -# PYTHONPATH=.:kitchen2/ nosetests-%{python2_version} kitchen2/tests/ -# %else -# PYTHONPATH=.:kitchen2/ nosetests kitchen2/tests/ -# %endif -# -# %if 0%{?with_python3} -# pushd %{py3dir} # PYTHONPATH=.:kitchen3/ nosetests-%{python3_version} kitchen3/tests/ -# popd -# %endif -%files -n python2-kitchen -%doc README.rst NEWS.rst -%license COPYING COPYING.LESSER -%{python2_sitelib}/kitchen* - -%files doc -%doc kitchen2/docs/* -%license COPYING COPYING.LESSER -%if 0%{?rhel} -%doc html -%endif - -%if 0%{?with_python3} %files -n python%{python3_pkgversion}-kitchen %doc README.rst NEWS.rst %license COPYING COPYING.LESSER @@ -183,9 +87,12 @@ popd %if 0%{?rhel} %doc html %endif -%endif %changelog +* Sat Sep 14 2019 Miro Hrončok - 1.2.6-4 +- Subpackage python2-kitchen has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + * Sat Aug 17 2019 Miro Hrončok - 1.2.6-3 - Rebuilt for Python 3.8