diff --git a/python-tornado.changes b/python-tornado.changes index 80e6439..b3e1746 100644 --- a/python-tornado.changes +++ b/python-tornado.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Oct 17 11:45:08 UTC 2015 - mc@suse.com + +- fix macro +- use package name python-backports-ssl_match_hostname on rhel7 +- define py_ver where it does not exist + ------------------------------------------------------------------- Wed Sep 30 09:11:37 UTC 2015 - fcastelli@suse.com diff --git a/python-tornado.spec b/python-tornado.spec index 9b252e8..9442b23 100644 --- a/python-tornado.spec +++ b/python-tornado.spec @@ -25,13 +25,18 @@ License: Apache-2.0 Group: Development/Languages/Python Source: https://pypi.python.org/packages/source/t/tornado/tornado-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?rhel} >= 7 +BuildRequires: python-backports-ssl_match_hostname +Requires: python-backports-ssl_match_hostname +%else BuildRequires: python-backports.ssl_match_hostname +Requires: python-backports.ssl_match_hostname +%endif BuildRequires: python-devel BuildRequires: python-futures BuildRequires: python-pycurl BuildRequires: python-setuptools BuildRequires: python-simplejson -Requires: python-backports.ssl_match_hostname # Tornado requires python-certifi when the ssl module # does not provide the 'create_default_context' function. @@ -41,7 +46,7 @@ Requires: python-backports.ssl_match_hostname # optional. # Python 2.7.9 is availalbe on SLE12 Updates channel and is going # to be available also on openSUSE leap. -%if 0%{?sles_version} >= 12 || 0%{suse_version} > 1320 +%if 0%{?sles_version} >= 12 || 0%{?suse_version} > 1320 Requires: python >= 2.7.9 %else BuildRequires: python-certifi @@ -60,6 +65,7 @@ BuildRequires: fdupes %if 0%{?suse_version} <= 1110 %{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);")} %endif +%{!?py_ver: %global py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)} %description Tornado is an open source version of the scalable, non-blocking web server and