diff --git a/python-tw2-core.spec b/python-tw2-core.spec index d26329a..f56ddd4 100644 --- a/python-tw2-core.spec +++ b/python-tw2-core.spec @@ -1,60 +1,20 @@ -%if 0%{?rhel} && 0%{?rhel} <= 7 -%global with_python3 0 -%else -%global with_python3 1 -%endif - %global modname tw2.core Name: python-tw2-core Version: 2.2.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Web widget creation toolkit based on TurboGears widgets License: MIT URL: http://toscawidgets.org Source0: https://pypi.python.org/packages/source/t/%{modname}/%{modname}-%{version}.tar.gz -# python-markupsafe is too old in rhel6. -Patch0: python-tw2-core-escape_silent-is-too-new.patch - # python3.8 patch Patch1: python-tw2-core-py38.patch BuildArch: noarch # For building, generally -BuildRequires: python2-devel -BuildRequires: python2-setuptools -%if 0%{?rhel} && 0%{?rhel} <= 6 -BuildRequires: python-webob1.0 >= 0.9.7 -%else -BuildRequires: python2-webob >= 0.9.7 -%endif -BuildRequires: python2-simplejson >= 2.0 -BuildRequires: python2-decorator -BuildRequires: python2-markupsafe -BuildRequires: python2-speaklater -BuildRequires: python2-paste-deploy -BuildRequires: python2-six -BuildRequires: python2-nine - -# Specifically for the test suite -BuildRequires: python2-unittest2 -BuildRequires: python2-nose -BuildRequires: python2-coverage -BuildRequires: python2-formencode -BuildRequires: python2-webtest -BuildRequires: python2-sieve - -# Templating languages for the test suite -BuildRequires: python2-mako -BuildRequires: python2-genshi -BuildRequires: python2-chameleon -BuildRequires: python2-kajiki -BuildRequires: python2-jinja2 - -%if 0%{?with_python3} # General BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -81,11 +41,6 @@ BuildRequires: python3-genshi BuildRequires: python3-chameleon BuildRequires: python3-kajiki BuildRequires: python3-jinja2 -%endif - -%if 0%{?rhel} && 0%{?rhel} <= 6 -BuildRequires: python-ordereddict -%endif %description @@ -96,37 +51,6 @@ The tw2.core package is lightweight and intended for run-time use only; development tools are in tw2.devtools. -%package -n python2-tw2-core -Summary: %summary - -# Runtime requirements -%if 0%{?rhel} && 0%{?rhel} <= 6 -Requires: python-ordereddict -Requires: python-webob1.0 >= 0.9.7 -%else -Requires: python2-webob >= 0.9.7 -%endif -Requires: python2-simplejson >= 2.0 -Requires: python2-decorator -Requires: python2-markupsafe -Requires: python2-speaklater -Requires: python2-paste-deploy -Requires: python2-six -Requires: python2-nine - -%{?python_provide:%python_provide python2-tw2-core} - - -%description -n python2-tw2-core -ToscaWidgets is a web widget toolkit for Python to aid in the creation, -packaging and distribution of common view elements normally used in the web. - -The tw2.core package is lightweight and intended for run-time use only; -development tools are in tw2.devtools. - -This package contains the python2 version of the toolkit - -%if 0%{?with_python3} %package -n python3-tw2-core Summary: Web widget creation toolkit based on TurboGears widgets Requires: python3-webob >= 0.9.7 @@ -148,84 +72,34 @@ The tw2.core package is lightweight and intended for run-time use only; development tools are in tw2.devtools. This package contains the python3 version of the toolkit -%endif %prep %setup -q -n %{modname}-%{version} - -%if 0%{?rhel} && 0%{?rhel} <= 6 -%patch0 -p1 -# Old mako in el6 doesn't have "loop.last" -sed -i 's/for c in w.children/for i, c in enumerate(w.children)/' tw2/core/templates/display_children.mak -sed -i 's/loop.last/(i == len(w.children) - 1)/' tw2/core/templates/display_children.mak -%endif - -%if 0%{?rhel} && 0%{?rhel} <= 6 -# Make sure that epel/rhel picks up the correct version of webob -awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"WebOb>=1.0\"]; import pkg_resources"}1' setup.py > setup.py.tmp -mv setup.py.tmp setup.py - -# Remove all the fancy nosetests configuration for older python -rm setup.cfg - -%endif - -%if 0%{?with_python3} %patch1 -p1 -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif %build -# Fix shebang for python2 -sed -i '1s=^#!/usr/bin/\(python\|env python\)[0-9.]*=#!%{__python2}=' tw2/core/testbase/xhtmlify.py -%{__python2} setup.py build - -%if 0%{?with_python3} -pushd %{py3dir} # Fix shebang for python3 sed -i '1s=^#!/usr/bin/\(python\|env python\)[0-9.]*=#!%{__python3}=' tw2/core/testbase/xhtmlify.py %{__python3} setup.py build -popd -%endif %install -%{__python2} setup.py install --skip-build \ - --install-data=%{_datadir} --root=%{buildroot} - -%if 0%{?with_python3} -pushd %{py3dir} %{__python3} setup.py install --skip-build \ --install-data=%{_datadir} --root=%{buildroot} -popd -%endif %check -PYTHONPATH=$(pwd) %{__python2} setup.py test - -%if 0%{?with_python3} -pushd %{py3dir} PYTHONPATH=$(pwd) %{__python3} setup.py test -popd -%endif - -%files -n python2-tw2-core -%{!?_licensedir:%global license %%doc} -%license LICENSE.txt -%doc README.rst -%{python2_sitelib}/tw2 -%{python2_sitelib}/%{modname}-%{version}* -%if 0%{?with_python3} %files -n python3-tw2-core %{!?_licensedir:%global license %%doc} %license LICENSE.txt %doc README.rst %{python3_sitelib}/tw2 %{python3_sitelib}/%{modname}-%{version}* -%endif %changelog +* Thu Aug 29 2019 Ján ONDREJ (SAL) - 2.2.6-4 +- Removed python3 support + * Thu Aug 29 2019 Ján ONDREJ (SAL) - 2.2.6-3 - Updated source URL to https