%bcond_with tests

Name: python-beaker
Version: 1.14.1
Release: 1
Summary: A web session and general caching library.
License: BSD and MIT
URL: http://beaker.readthedocs.io
Source0: https://github.com/bbangert/beaker/archive/refs/tags/1.14.1.tar.gz

BuildArch: noarch

BuildRequires:   %{_bindir}/redis-server  %{_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 python3-beaker
Summary: %summary
BuildRequires: python3-devel python3dist(cryptography) python3dist(funcsigs) python3dist(mock)
BuildRequires: python3dist(paste) 
BuildRequires: python3dist(redis) python3dist(setuptools) python3dist(sqlalchemy)
%if %{with tests}
BuildRequires: python3dist(webtest)
%endif

Requires: python3dist(paste)
Recommends: python3dist(cryptography) python3dist(pycryptodome) python3dist(pycryptopp)

%{?python_provide:%python_provide python3-beaker}

%description -n python3-beaker 
%_description


%prep
%autosetup -n beaker-%{version} -p1

%build
echo 'from setuptools import setup; setup()' > setup.py
%py3_build

%install
%py3_install

%if %{with tests}
%check
redis-server &

rm -rf /tmp/beaker-tests
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m nose -v

kill %1
%endif

%files -n python3-beaker
%license LICENSE
%doc README.* 
%{python3_sitelib}/beaker/
%{python3_sitelib}/Beaker*

%changelog
* Sat Jul 25 2026 anyunhao <anyunhao@kylinos.cn> - 1.14.1-1
- Update to version 1.14.1
- Removed support for nsscrypto, pycryptopp, and pylibmc
- Removed Python 2 and Jython support
- Fixed an error when using json encoder with cookie based sessions
- Removed beaker-use-system-paste.patch, no longer needed after upstream refactored converters.py

* Tue May 28 2024 zhangxingrong <zhangxingrong@uniontech.com> - 1.13.0-1
- Update to version 1.13.0

* Mon Jun  5 2023 dillon chen<dillon.chen@gmail.com> 1.12.1-1
- upgrade package version to 1.12.1

* Thu Jun  1 2023 dillon chen<dillon.chen@gmail.com> 1.12.0-3
- remove python-crypto(EOL)

* Thu Feb 02 2023 wangjunqi <wangjunqi@kylinos.cn> - 1.12.0-2
- fix build problem

* Wed Jan 18 2023 wangjunqi <wangjunqi@kylinos.cn> - 1.12.0-1
- upgrade package version to 1.12.0

* Mon Jun 13 2022 guozhaorui <guozhaorui1@h-partners.com> - 1.11.0-3
- DESC: remove python3-nose

* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.11.0-2
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git

* Tue Feb 2 2021 wangjie<wangjie294@huawei.com> -1.11.0-1
- upgrade 1.11

* Sat Dec 12 2020 tianwei <tianwei12@huawei.com> - 1.10.0-6
- remove mongod

* Wed Aug 5 2020 tianwei <tianwei12@huawei.com> - 1.10.0-5
- delete python2.

* Thu Nov 21 2019 fangyufa <fangyufa1@huawei.com> - 1.10.0-4
- add buildrequires of git for x86_64 build

* 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