0cd6790
%global srcname django-cacheops
c24af2a
%global desc %{expand: \
0cd6790
A slick app that supports automatic or manual queryset caching
0cd6790
and automatic granular event-driven invalidation.
0cd6790
0cd6790
It uses redis as backend for ORM cache and redis or filesystem
0cd6790
for simple time-invalidated one.
0cd6790
0cd6790
And there is more to it:
0cd6790
0cd6790
  * decorators to cache any user function or view as a queryset or by time
0cd6790
  * extensions for django and jinja2 templates
0cd6790
  * transparent transaction support
0cd6790
  * dog-pile prevention mechanism
0cd6790
  * a couple of hacks to make django faster}
0cd6790
c24af2a
Name:           python-%{srcname}
c24af2a
Version:        6.1
f0a2cc4
Release:        6%{?dist}
c24af2a
Summary:        ORM cache with automatic granular event-driven invalidation for Django
c24af2a
c24af2a
License:        BSD-3-Clause
c24af2a
URL:            https://github.com/Suor/%{srcname}
c24af2a
Source:         %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
c24af2a
c24af2a
BuildArch:      noarch
c24af2a
c24af2a
BuildRequires:	python3-devel
c24af2a
BuildRequires:	python3-pytest
c24af2a
BuildRequires:	python3-pytest-django
c24af2a
BuildRequires:	redis
c24af2a
c24af2a
%description %{desc}
0cd6790
0cd6790
%package     -n python3-%{srcname}
0cd6790
Summary:        %{summary}
0cd6790
c24af2a
%description -n python3-%{srcname} %{desc}
0cd6790
0cd6790
%prep
c24af2a
%autosetup -n %{srcname}-%{version}
c24af2a
c24af2a
%generate_buildrequires
c24af2a
%pyproject_buildrequires
0cd6790
0cd6790
%build
c24af2a
%pyproject_wheel
0cd6790
0cd6790
%install
c24af2a
%pyproject_install
c24af2a
%pyproject_save_files cacheops
c24af2a
c24af2a
%check
c24af2a
# Launching a redis server for the tests
c24af2a
mkdir -p data
c24af2a
pidfile=$PWD/redis.pid
c24af2a
%{_bindir}/redis-server \
c24af2a
    --bind 127.0.0.1 \
c24af2a
    --port 6379	\
c24af2a
    --daemonize yes \
c24af2a
    --logfile $PWD/redis.log \
c24af2a
    --dir $PWD/data \
c24af2a
    --pidfile $pidfile
c24af2a
c24af2a
export DJANGO_SETTINGS_MODULE=tests.settings
c24af2a
# skipping LockingTests because before_after is too old and not in Fedora
c24af2a
%pytest -v -k "not LockingTests"
c24af2a
c24af2a
# shutting down the server
c24af2a
if [ -f $pidfile ]; then
c24af2a
    %{_bindir}/redis-cli -p 6379 shutdown
c24af2a
fi
c24af2a
cat $PWD/redis.log
c24af2a
c24af2a
%files -n python3-%{srcname} -f %{pyproject_files}
0cd6790
%doc README.rst CHANGELOG
0cd6790
0cd6790
%changelog
f0a2cc4
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-6
f0a2cc4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
f0a2cc4
b429083
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-5
b429083
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
b429083
6d1940c
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-4
6d1940c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
6d1940c
f222f3e
* Sat Jul 01 2023 Python Maint <python-maint@redhat.com> - 6.1-3
f222f3e
- Rebuilt for Python 3.12
f222f3e
5689773
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-2
5689773
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
5689773
c24af2a
* Wed Sep 21 2022 Ali Erdinc Koroglu <aekoroglu@fedoraproject.org> - 6.1-1
c24af2a
- Update to 6.1 (RHBZ #2090960 + #2098886)
c24af2a
f66c879
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.0-5
f66c879
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
f66c879
127be92
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 6.0-4
127be92
- Rebuilt for Python 3.11
127be92
8997995
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.0-3
8997995
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
8997995
ba5a706
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.0-2
ba5a706
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
ba5a706
f5cc134
* Sun Jun 27 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 6.0-1
f5cc134
- Update to 6.0
f5cc134
91526cf
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 5.1-3
91526cf
- Rebuilt for Python 3.10
91526cf
3a80941
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.1-2
3a80941
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
3a80941
2596809
* Sat Dec 12 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 5.1-1
2596809
- Update to 5.1
2596809
432505d
* Sun Aug 30 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 5.0.1-1
432505d
- Update to 5.0.1
432505d
4bc9a39
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-4
4bc9a39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
4bc9a39
55a8b7c
* Tue May 26 2020 Miro HronĨok <mhroncok@redhat.com> - 4.1-3
55a8b7c
- Rebuilt for Python 3.9
55a8b7c
d1692bd
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-2
d1692bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
d1692bd
0cd6790
* Sat Aug 31 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.1-1
0cd6790
- Initial package