abac1956Add on Jun 21, 2025History
%global _empty_manifest_terminate_build 0
Name:           python-croniter
Version:        6.0.0
Release:        1
Summary:        croniter provides iteration for datetime object with cron like format
License:        MIT
URL:            http://github.com/kiorky/croniter
Source0:        https://files.pythonhosted.org/packages/ad/2f/44d1ae153a0e27be56be43465e5cb39b9650c781e001e7864389deb25090/croniter-6.0.0.tar.gz
BuildArch:      noarch
%description
croniter provides iteration for the datetime object with a cron like format.

%package -n python3-croniter
Summary:        croniter provides iteration for datetime object with cron like format
Provides:       python-croniter
# Base build requires
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pbr
BuildRequires:  python3-pip
BuildRequires:  python3-wheel
BuildRequires:  python3-pytz python3-pytest python3-pytest-mock python3-hatchling python3-hatch-vcs
# General requires
BuildRequires:  python3-dateutil
# General requires
Requires:       python3-dateutil
Requires:       python3-pytz
%description -n python3-croniter
croniter provides iteration for the datetime object with a cron like format.

%package help
Summary:        croniter provides iteration for datetime object with cron like format
Provides:       python3-croniter-doc
%description help
croniter provides iteration for the datetime object with a cron like format.

%prep
%autosetup -n croniter-%{version}

%build
%py3_build

%install
%py3_install

install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
    find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
    find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
    find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
    find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
    find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%check
%{__python3} -m pytest

%files -n python3-croniter -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Wed Jun 18 2025 chenwei <chenwei@teligen.net> - 6.0.0-1
- Update package to version 6.0.0

* Thu Feb 20 2025 wangjing <wangjing@uniontech.com> - 4.0.0-2
- add buildRequires python-pytz

* Thu Oct 31 2024 liutao1 <liutao1@kylinos.cn> - 4.0.0-1
- Update package to version 4.0.0
  Remove DayOfWeek alias 7 to DayOfWeek 0 to stick to standard cron
  Fix DOW ranges calculations when lastday is a Sunday.

* Thu Oct 31 2024 liutao1 <liutao1@kylinos.cn> - 3.0.4-1
- Update package to version 3.0.4:
  Fix overflow on 32bits systems
  Fix python2 testing (related to #93)
  Modernize packaging.

* Wed Aug 21 2024 guochao <guochao@kylinos.cn> - 3.0.3-1
- Update package to version 3.0.3
- Fix start_time not respected in get_next/get_prev/all_next/all_prev 
- support year field
- Fix hashed expressions omitting some entries

* Wed May 22 2024 lilu <lilu@kylinos.cn> - 2.0.5-1
- Update package to version 2.0.5
- Support hashid strings in is_valid
- Avoid over-optimization in crontab expansions

* Tue Mar 26 2024 wangqiang <wangqiang1@kylinos.cn> - 2.0.3-1
- Update package to version 2.0.3

* Wed Jul 19 2023 Dongxing Wang <dxwangk@isoftstone.com> - 1.4.1-1
- Update package to version 1.4.1

* Wed Dec 07 2022 dingdingaaaaa <dingziwei@kylinos.cn> - 1.3.8-1
- Upgrade version to 1.3.8

* Wed Aug 3 2022 wenzhiwei <wenzhiwei@kylinos.cn> - 1.3.5-1
- Update to 1.3.5

* Wed Jun 01 2022 OpenStack_SIG <openstack@openeuler.org> - 1.3.4-1
- Init package python3-croniter of version 1.3.4