[datagrepper] Support for epel7.
Ralph Bean
ralph at fedoraproject.org
Wed Jul 9 21:27:14 UTC 2014
commit d2dfab38734ad252b41313cd1b0fd2256d885634
Author: Ralph Bean <rbean at redhat.com>
Date: Wed Jul 9 17:26:15 2014 -0400
Support for epel7.
datagrepper-patch-out-flask-sqlalchemy.patch | 48 ++++++++++++++++++++++++++
datagrepper.spec | 28 ++++++++++++---
2 files changed, 70 insertions(+), 6 deletions(-)
---
diff --git a/datagrepper-patch-out-flask-sqlalchemy.patch b/datagrepper-patch-out-flask-sqlalchemy.patch
new file mode 100644
index 0000000..c05eea7
--- /dev/null
+++ b/datagrepper-patch-out-flask-sqlalchemy.patch
@@ -0,0 +1,48 @@
+From 3d332a96f30675233f48b504a67c73a48e1f7cd2 Mon Sep 17 00:00:00 2001
+From: Ralph Bean <rbean at redhat.com>
+Date: Tue, 8 Jul 2014 14:35:22 -0400
+Subject: [PATCH] Patch out flask-sqlalchemy.
+
+---
+ datagrepper/app.py | 5 ++---
+ requirements.txt | 1 -
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/datagrepper/app.py b/datagrepper/app.py
+index 19c7aa5..b4f0164 100644
+--- a/datagrepper/app.py
++++ b/datagrepper/app.py
+@@ -17,7 +17,6 @@
+ import json
+ import flask
+ from flask.ext.openid import OpenID
+-from flask.ext.sqlalchemy import SQLAlchemy
+
+ from bunch import Bunch
+ import codecs
+@@ -57,8 +56,8 @@ app.config.from_envvar('DATAGREPPER_CONFIG')
+ app.secret_key = app.config['SECRET_KEY']
+
+ # Set up datagrepper database
+-db = SQLAlchemy(app)
+-from datagrepper.models import Job, STRSTATUS
++#db = SQLAlchemy(app)
++#from datagrepper.models import Job, STRSTATUS
+
+ # Set up OpenID
+ oid = OpenID(app)
+diff --git a/requirements.txt b/requirements.txt
+index 3717025..0b56dd4 100644
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -1,7 +1,6 @@
+ arrow
+ Flask
+ Flask-OpenID
+-Flask-SQLAlchemy
+ kitchen
+ datanommer.models>=0.6.0
+ fedmsg>=0.7.0
+--
+1.9.3
+
diff --git a/datagrepper.spec b/datagrepper.spec
index a02c6a0..31e27f7 100644
--- a/datagrepper.spec
+++ b/datagrepper.spec
@@ -5,12 +5,13 @@
Name: datagrepper
Version: 0.4.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A webapp to query fedmsg history
License: GPLv2+
URL: https://github.com/fedora-infra/datagrepper
Source0: https://pypi.python.org/packages/source/d/%{name}/%{name}-%{version}.tar.gz
+Patch0: datagrepper-patch-out-flask-sqlalchemy.patch
BuildArch: noarch
@@ -19,7 +20,7 @@ BuildRequires: python-setuptools
BuildRequires: python-freezegun
BuildRequires: python-nose
-%if %{?rhel}%{!?rhel:0} >= 6
+%if %{?rhel}%{!?rhel:0} <= 6
BuildRequires: python-sqlalchemy0.7
%else
BuildRequires: python-sqlalchemy
@@ -33,13 +34,12 @@ BuildRequires: python-docutils
BuildRequires: python-dogpile-cache
BuildRequires: python-flask
BuildRequires: python-flask-openid
-BuildRequires: python-flask-sqlalchemy
BuildRequires: python-lockfile
BuildRequires: python-kitchen
BuildRequires: python-arrow
BuildRequires: python-fedmsg-meta-fedora-infrastructure
-%if %{?rhel}%{!?rhel:0} >= 6
+%if %{?rhel}%{!?rhel:0} <= 6
Requires: python-sqlalchemy0.7
%else
Requires: python-sqlalchemy
@@ -53,12 +53,19 @@ Requires: python-docutils
Requires: python-dogpile-cache
Requires: python-flask
Requires: python-flask-openid
-Requires: python-flask-sqlalchemy
Requires: python-lockfile
Requires: python-kitchen
Requires: python-arrow
Requires: python-fedmsg-meta-fedora-infrastructure
+
+%if %{?rhel}%{!?rhel:0} == 7
+%else
+# This is temporarily patched out for rhel7
+BuildRequires: python-flask-sqlalchemy
+Requires: python-flask-sqlalchemy
+%endif
+
%description
A webapp to retrieve historical information about messages on the fedmsg
bus. It is a JSON api for the datanommer message store.
@@ -66,7 +73,12 @@ bus. It is a JSON api for the datanommer message store.
%prep
%setup -q
-%if %{?rhel}%{!?rhel:0} >= 6
+%if %{?rhel}%{!?rhel:0} == 7
+# Patch out flask-sqlalchemy
+%patch0 -p1
+%endif
+
+%if %{?rhel}%{!?rhel:0} <= 6
# Make sure that epel/rhel picks up the correct version of webob
awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"sqlalchemy>=0.7\"]; import pkg_resources"}1' setup.py > setup.py.tmp
mv setup.py.tmp setup.py
@@ -97,6 +109,10 @@ install -m 644 apache/%{modname}.cfg %{buildroot}%{_sysconfdir}/%{modname}/%{mod
%{python_sitelib}/%{eggname}-%{version}-py%{python_version}.egg-info/
%changelog
+* Tue Jul 08 2014 Ralph Bean <rbean at redhat.com> - 0.4.1-3
+- Fix rhel conditionals for rhel7.
+- Patch out flask-sqlalchemy for rhel7.
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list