update code
This commit is contained in:
commit
b6e634dc52
BIN
beaker-1.10.0.tar.gz
Normal file
BIN
beaker-1.10.0.tar.gz
Normal file
Binary file not shown.
35
beaker-use-system-paste.patch
Normal file
35
beaker-use-system-paste.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
diff --git a/beaker/converters.py b/beaker/converters.py
|
||||||
|
index a8fb3c9..63c411c 100644
|
||||||
|
--- a/beaker/converters.py
|
||||||
|
+++ b/beaker/converters.py
|
||||||
|
@@ -1,29 +1 @@
|
||||||
|
-from beaker._compat import string_type
|
||||||
|
-
|
||||||
|
-# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
|
||||||
|
-# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
-def asbool(obj):
|
||||||
|
- if isinstance(obj, string_type):
|
||||||
|
- obj = obj.strip().lower()
|
||||||
|
- if obj in ['true', 'yes', 'on', 'y', 't', '1']:
|
||||||
|
- return True
|
||||||
|
- elif obj in ['false', 'no', 'off', 'n', 'f', '0']:
|
||||||
|
- return False
|
||||||
|
- else:
|
||||||
|
- raise ValueError(
|
||||||
|
- "String is not true/false: %r" % obj)
|
||||||
|
- return bool(obj)
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-def aslist(obj, sep=None, strip=True):
|
||||||
|
- if isinstance(obj, string_type):
|
||||||
|
- lst = obj.split(sep)
|
||||||
|
- if strip:
|
||||||
|
- lst = [v.strip() for v in lst]
|
||||||
|
- return lst
|
||||||
|
- elif isinstance(obj, (list, tuple)):
|
||||||
|
- return obj
|
||||||
|
- elif obj is None:
|
||||||
|
- return []
|
||||||
|
- else:
|
||||||
|
- return [obj]
|
||||||
|
+from paste.util.converters import asbool, aslist
|
||||||
110
python-beaker.spec
Normal file
110
python-beaker.spec
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
%bcond_with tests
|
||||||
|
|
||||||
|
Name: python-beaker
|
||||||
|
Version: 1.10.0
|
||||||
|
Release: 3
|
||||||
|
Summary: A web session and general caching library.
|
||||||
|
License: BSD and MIT
|
||||||
|
URL: http://beaker.readthedocs.io
|
||||||
|
Source0: https://github.com/bbangert/beaker/archive/%{version}/beaker-%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch6000: beaker-use-system-paste.patch
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
BuildRequires: %{_bindir}/mongod %{_bindir}/redis-server %{_bindir}/pkill %{_bindir}/netstat
|
||||||
|
|
||||||
|
%global _description\
|
||||||
|
Beaker is a caching library that includes Session and Cache objects\
|
||||||
|
built on Myghty's Container API used in MyghtyUtils. WSGI middleware\
|
||||||
|
is also included to manage Session objects and signed cookies.
|
||||||
|
|
||||||
|
%description %_description
|
||||||
|
|
||||||
|
%package -n python2-beaker
|
||||||
|
Summary: %summary
|
||||||
|
BuildRequires: python2-devel python2dist(cryptography) python2dist(funcsigs) python2dist(mock)
|
||||||
|
BuildRequires: python2dist(nose) python2dist(paste) python2dist(pycrypto) python2dist(pymongo)
|
||||||
|
BuildRequires: python2dist(redis) python2dist(setuptools) python2dist(sqlalchemy)
|
||||||
|
%if %{with tests}
|
||||||
|
BuildRequires: python2dist(webtest)
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Requires: python2dist(funcsigs) python2dist(paste)
|
||||||
|
Recommends: python2dist(cryptography) python2dist(pycrypto) python2dist(pycryptodome) python2dist(pycryptopp)
|
||||||
|
|
||||||
|
%{?python_provide:%python_provide python2-beaker}
|
||||||
|
Provides: %{name} = %{version}-%{release} %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
Obsoletes: %{name} < %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n python2-beaker
|
||||||
|
%_description
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python3-beaker
|
||||||
|
Summary: %summary
|
||||||
|
BuildRequires: python3-devel python3dist(cryptography) python3dist(funcsigs) python3dist(mock)
|
||||||
|
BuildRequires: python3dist(nose) python3dist(paste) python3dist(pycrypto) python3dist(pymongo)
|
||||||
|
BuildRequires: python3dist(redis) python3dist(setuptools) python3dist(sqlalchemy)
|
||||||
|
%if %{with tests}
|
||||||
|
BuildRequires: python3dist(webtest)
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Requires: python3dist(paste)
|
||||||
|
Recommends: python3dist(cryptography) python3dist(pycrypto) python3dist(pycryptodome) python3dist(pycryptopp)
|
||||||
|
|
||||||
|
%{?python_provide:%python_provide python3-beaker}
|
||||||
|
|
||||||
|
%description -n python3-beaker
|
||||||
|
%_description
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n beaker-%{version} -p1 -Sgit
|
||||||
|
|
||||||
|
%build
|
||||||
|
%py2_build
|
||||||
|
%py3_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%py2_install
|
||||||
|
%py3_install
|
||||||
|
|
||||||
|
%if %{with tests}
|
||||||
|
%check
|
||||||
|
redis-server &
|
||||||
|
if [ "$(netstat -ln | grep :27017)" != "" ]; then pkill mongod; fi
|
||||||
|
mkdir ./mongod
|
||||||
|
mongod --fork --dbpath ./mongod --logpath ./mongod/mongod.log
|
||||||
|
while [ "$(netstat -ln | grep :27017)" == "" ]; do sleep 1; done
|
||||||
|
|
||||||
|
rm -rf /tmp/beaker-tests
|
||||||
|
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m nose -v
|
||||||
|
|
||||||
|
rm -rf /tmp/beaker-tests
|
||||||
|
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m nose -v
|
||||||
|
|
||||||
|
pkill mongod
|
||||||
|
kill %1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files -n python2-beaker
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.* CHANGELOG
|
||||||
|
%{python2_sitelib}/beaker/
|
||||||
|
%{python2_sitelib}/Beaker*
|
||||||
|
|
||||||
|
%files -n python3-beaker
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.* CHANGELOG
|
||||||
|
%{python3_sitelib}/beaker/
|
||||||
|
%{python3_sitelib}/Beaker*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Oct 30 2019 hexiaowen <hexiaowen@huawei.com> - 1.10.0-3
|
||||||
|
- disable webtest
|
||||||
|
|
||||||
|
* Sat Oct 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.10.0-2
|
||||||
|
- Type:NA
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Package Init
|
||||||
Loading…
x
Reference in New Issue
Block a user