From 8a4852f506a395098ef7c4739faa79b0f7a86ad4 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Wed, 8 Aug 2012 15:09:18 -0400 Subject: [PATCH] Attempt a unified spec for both el6 and Fedora --- python-flask.spec | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/python-flask.spec b/python-flask.spec index c137da5..d706f2b 100644 --- a/python-flask.spec +++ b/python-flask.spec @@ -2,7 +2,7 @@ %global srcversion 0.9 Name: python-flask -Version: 0.9.0 +Version: 0.9 Release: 2%{?dist} Summary: A micro-framework for Python based on Werkzeug, Jinja 2 and good intentions @@ -12,11 +12,18 @@ URL: http://flask.pocoo.org/ Source0: http://pypi.python.org/packages/source/F/Flask/%{srcname}-%{srcversion}.tar.gz BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python-setuptools-devel -BuildRequires: python-jinja2 python-werkzeug python-sphinx +BuildRequires: python2-devel python-setuptools-devel python-werkzeug python-sphinx +Requires: python-werkzeug python-sphinx + +%if 0%{?rhel} +BuildRequires: python-jinja2-26 +Requires: python-jinja2-26 +%else +BuildRequires: python-jinja2 +Requires: python-jinja2 +%endif + -Requires: python-jinja2 python-werkzeug %description Flask is called a “micro-framework” because the idea to keep the core @@ -41,6 +48,9 @@ Documentation and examples for %{name}. %prep %setup -q -n %{srcname}-%{srcversion} +#%if 0%%{?rhel} +%{__sed} -i "1i __requires__ = ['Jinja2>=2.4']" setup.py +#%endif %build %{__python} setup.py build