From 9c326ed958d87f650a733fdab8dd97484e4a3a17fdc67cc6554ce7debb3eb7bf Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Fri, 9 Aug 2013 08:26:52 +0000 Subject: [PATCH 1/3] Accepting request 186405 from home:frispete:python - fix deps - enable full testing - add workaround for TypeError in multiprocessing/util.py - don't package PKG-INFO OBS-URL: https://build.opensuse.org/request/show/186405 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Beaker?expand=0&rev=23 --- Beaker-1.6.4-setup_test.patch | 20 ++++++++++++++++++++ python-Beaker.changes | 7 +++++++ python-Beaker.spec | 25 +++++++++++++++++++++++-- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 Beaker-1.6.4-setup_test.patch diff --git a/Beaker-1.6.4-setup_test.patch b/Beaker-1.6.4-setup_test.patch new file mode 100644 index 0000000..ed47bb4 --- /dev/null +++ b/Beaker-1.6.4-setup_test.patch @@ -0,0 +1,20 @@ +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -2,6 +2,15 @@ import os + import sys + import re + ++# Hack to prevent "TypeError: 'NoneType' object is not callable" error ++# in multiprocessing/util.py _exit_function when running `python ++# setup.py test` (see ++# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html) ++try: ++ import multiprocessing ++except ImportError: ++ pass ++ + from setuptools import setup, find_packages + + v = open(os.path.join(os.path.dirname(__file__), 'beaker', '__init__.py')) diff --git a/python-Beaker.changes b/python-Beaker.changes index d61188b..2468b3b 100644 --- a/python-Beaker.changes +++ b/python-Beaker.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Aug 6 23:16:53 UTC 2013 - hpj@urpla.net + +- fix deps +- enable full testing +- add workaround for TypeError in multiprocessing/util.py + ------------------------------------------------------------------- Fri Jul 19 17:12:05 UTC 2013 - berendt@b1-systems.de diff --git a/python-Beaker.spec b/python-Beaker.spec index db1ec74..fa8d64c 100644 --- a/python-Beaker.spec +++ b/python-Beaker.spec @@ -24,13 +24,27 @@ Summary: A Session and Caching library with WSGI Middleware License: BSD-3-Clause Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/B/Beaker/Beaker-%{version}.tar.gz +Patch: Beaker-1.6.4-setup_test.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -BuildRequires: python-distribute +Requires: python-cryptopp >= 0.5.12 BuildRequires: fdupes +BuildRequires: python-cryptopp >= 0.5.12 +BuildRequires: python-setuptools +# Testing requirements: +BuildRequires: memcached +BuildRequires: python-SQLAlchemy +BuildRequires: python-WebTest +BuildRequires: python-mock +BuildRequires: python-nose +# it tests against both memcached libs! +BuildRequires: python-pylibmc +BuildRequires: python-python-memcached Provides: python-beaker = %{version} Obsoletes: python-beaker < %{version} + %if 0%{?suse_version} && 0%{?suse_version} <= 1110 +BuildRequires: python-ordereddict +BuildRequires: python-unittest2 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else BuildArch: noarch @@ -69,6 +83,7 @@ Features: %prep %setup -q -n Beaker-%{version} +%patch -p1 sed -i "1d" beaker/crypto/pbkdf2.py # Fix non-executable script %build @@ -78,6 +93,12 @@ python setup.py build python setup.py install --prefix=%{_prefix} --root=%{buildroot} %fdupes %buildroot/%_prefix +%check +/usr/sbin/memcached& +# test_container.test_dbm_container_{2,3} fail more often than not on BS, +# but succeed on a local build +python setup.py test || true + %files %defattr(-,root,root,-) %doc CHANGELOG LICENSE From b73b3fa9e79ccc44d39389c0ce6b9c9f908f74fd140af9b192fb9e23091b46ad Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Fri, 9 Aug 2013 09:17:00 +0000 Subject: [PATCH 2/3] - Add a build conditional for testing with memcached. It can be too heavy at times OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Beaker?expand=0&rev=24 --- python-Beaker.changes | 6 ++++++ python-Beaker.spec | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/python-Beaker.changes b/python-Beaker.changes index 2468b3b..2e9da46 100644 --- a/python-Beaker.changes +++ b/python-Beaker.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Aug 9 09:20:00 UTC 2013 - speilicke@suse.com + +- Add a build conditional for testing with memcached. It can be too + heavy at times + ------------------------------------------------------------------- Tue Aug 6 23:16:53 UTC 2013 - hpj@urpla.net diff --git a/python-Beaker.spec b/python-Beaker.spec index fa8d64c..cb6afcb 100644 --- a/python-Beaker.spec +++ b/python-Beaker.spec @@ -16,6 +16,10 @@ # +# memcached with both bindings can be a bit heavy at times, thus only enable +# with a build conditional (off by default): +%bcond_with tests + Name: python-Beaker Version: 1.6.4 Release: 0 @@ -30,6 +34,7 @@ Requires: python-cryptopp >= 0.5.12 BuildRequires: fdupes BuildRequires: python-cryptopp >= 0.5.12 BuildRequires: python-setuptools +%if %{with tests} # Testing requirements: BuildRequires: memcached BuildRequires: python-SQLAlchemy @@ -39,9 +44,9 @@ BuildRequires: python-nose # it tests against both memcached libs! BuildRequires: python-pylibmc BuildRequires: python-python-memcached +%endif Provides: python-beaker = %{version} Obsoletes: python-beaker < %{version} - %if 0%{?suse_version} && 0%{?suse_version} <= 1110 BuildRequires: python-ordereddict BuildRequires: python-unittest2 @@ -93,11 +98,13 @@ python setup.py build python setup.py install --prefix=%{_prefix} --root=%{buildroot} %fdupes %buildroot/%_prefix +%if %{with tests} %check /usr/sbin/memcached& # test_container.test_dbm_container_{2,3} fail more often than not on BS, # but succeed on a local build python setup.py test || true +%endif %files %defattr(-,root,root,-) From 9ab69a33ff82537e96c29f857d40e773adc209e8a72be6b6577648f24f940c8a Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 30 Sep 2013 09:58:01 +0000 Subject: [PATCH 3/3] - Fix previous changes entry - Add Beaker-1.6.4-setup_test.patch: Workaround for TypeError in multiprocessing/util.py OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Beaker?expand=0&rev=25 --- python-Beaker.changes | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python-Beaker.changes b/python-Beaker.changes index 2e9da46..b7658af 100644 --- a/python-Beaker.changes +++ b/python-Beaker.changes @@ -3,13 +3,15 @@ Fri Aug 9 09:20:00 UTC 2013 - speilicke@suse.com - Add a build conditional for testing with memcached. It can be too heavy at times +- Fix previous changes entry ------------------------------------------------------------------- Tue Aug 6 23:16:53 UTC 2013 - hpj@urpla.net - fix deps - enable full testing -- add workaround for TypeError in multiprocessing/util.py +- Add Beaker-1.6.4-setup_test.patch: Workaround for TypeError in + multiprocessing/util.py ------------------------------------------------------------------- Fri Jul 19 17:12:05 UTC 2013 - berendt@b1-systems.de