From 861eb9550c83eff27e06e534c892ff7b751d4efe Mon Sep 17 00:00:00 2001 From: Luke Macken Date: Aug 10 2009 19:14:17 +0000 Subject: Get the test suite running --- diff --git a/python-repoze-what-release.patch b/python-repoze-what-release.patch new file mode 100644 index 0000000..a33d120 --- /dev/null +++ b/python-repoze-what-release.patch @@ -0,0 +1,14 @@ +--- repoze/what/release.py.orig 2009-08-10 10:36:03.000000000 -0400 ++++ repoze/what/release.py 2009-08-10 10:36:40.000000000 -0400 +@@ -24,10 +24,7 @@ + + import os + +-_here = os.path.abspath(os.path.dirname(__file__)) +-_root = os.path.dirname(os.path.dirname(_here)) +- +-version = open(os.path.join(_root, 'VERSION.txt')).readline().rstrip() ++version = '$VERSION' + + # The major version: If version=='3.0.2rc4', the major version is int(3). + major_version = int(version.split('.')[0]) diff --git a/python-repoze-what.spec b/python-repoze-what.spec index df08532..c978e1a 100644 --- a/python-repoze-what.spec +++ b/python-repoze-what.spec @@ -2,7 +2,7 @@ Name: python-repoze-what Version: 1.0.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Authorization for WSGI applications Group: Development/Languages @@ -10,6 +10,7 @@ License: BSD URL: http://pypi.python.org/pypi/repoze.what Source0: http://pypi.python.org/packages/source/r/repoze.what/repoze.what-%{version}.tar.gz Patch0: %{name}-setup.patch +Patch1: %{name}-release.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -56,7 +57,8 @@ This package contains documentation for the repoze.who module. %prep %setup -q -n repoze.what-%{version} %patch0 -b .setup - +%patch1 -b .release +%{__sed} -i -e 's|$VERSION|%{version}|' repoze/what/release.py %build %{__python} setup.py build @@ -67,16 +69,15 @@ This package contains documentation for the repoze.who module. rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT -# Needs repoze.who-testutil -#%check -#PYTHONPATH=`pwd` nosetests +%check +PYTHONPATH=`pwd` nosetests %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc README.txt +%doc README.txt VERSION.txt %{python_sitelib}/ %files docs @@ -84,6 +85,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Aug 10 2009 Luke Macken - 1.0.8-3 +- Get the test suite working + * Mon Jun 01 2009 Luke Macken - 1.0.8-2 - Fix the dependency in the docs subpackage