|
|
|
@ -1,26 +1,34 @@
|
|
|
|
|
%global modname dateutil
|
|
|
|
|
|
|
|
|
|
Name: python-%{modname}
|
|
|
|
|
Version: 2.8.1
|
|
|
|
|
Release: 7%{?dist}
|
|
|
|
|
Version: 2.8.2
|
|
|
|
|
Release: 14%{?dist}
|
|
|
|
|
Epoch: 1
|
|
|
|
|
Summary: Powerful extensions to the standard datetime module
|
|
|
|
|
|
|
|
|
|
License: BSD
|
|
|
|
|
# According to the LICENSE file:
|
|
|
|
|
# - Apache-2.0 applies to all contributions after 2017-12-01, as well as
|
|
|
|
|
# all contributions that have been re-licensed.
|
|
|
|
|
# - BSD-3-Clause applies to all code, even that also covered by Apache-2.0
|
|
|
|
|
License: (Apache-2.0 AND BSD-3-Clause) OR BSD-3-Clause
|
|
|
|
|
|
|
|
|
|
URL: https://github.com/dateutil/dateutil
|
|
|
|
|
Source: %{pypi_source}
|
|
|
|
|
|
|
|
|
|
# Mitigate CVE-2007-4559 (tarfile directory traversal).
|
|
|
|
|
# `dateutil.zoneinfo.rebuild` handles "pure data" tarballs,
|
|
|
|
|
# here we disable tar features that are potentially unsafe.
|
|
|
|
|
# Submitted upstream, but rejected because they're removing this
|
|
|
|
|
# code entirely.
|
|
|
|
|
# BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2203905
|
|
|
|
|
Patch1: https://github.com/dateutil/dateutil/pull/1295.patch
|
|
|
|
|
# Remove deprecated pytest.warns(None) from test_internals.py
|
|
|
|
|
#
|
|
|
|
|
# Fixes:
|
|
|
|
|
# python-dateutil fails to build with pytest 7
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2059950
|
|
|
|
|
Patch1: %{url}/commit/2bdd63158b7f981fc6d70a869680451bdfd8d848.patch
|
|
|
|
|
|
|
|
|
|
# Backport the replacement for the deprecated in Python 3.12
|
|
|
|
|
# datetime.datetime.utcfromtimestamp()
|
|
|
|
|
Patch2: %{url}/commit/f2293200747fb03d56c6c5997bfebeabe703576f.patch
|
|
|
|
|
|
|
|
|
|
# Disable tests to avoid pulling in test dependencies on RHEL9
|
|
|
|
|
# Specify --with tests to run the tests e.g. on EPEL
|
|
|
|
|
%bcond_with tests
|
|
|
|
|
# when bootstrapping dateutil-freezegun, we cannot run tests
|
|
|
|
|
# on RHEL, we do not have or want all test dependencies
|
|
|
|
|
%bcond tests %{undefined rhel}
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: make
|
|
|
|
@ -38,11 +46,12 @@ Summary: %summary
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: python3-setuptools_scm
|
|
|
|
|
# Runtime deps
|
|
|
|
|
BuildRequires: python3-six
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python3-freezegun
|
|
|
|
|
BuildRequires: python3-hypothesis
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
BuildRequires: python3-six
|
|
|
|
|
%endif
|
|
|
|
|
Requires: tzdata
|
|
|
|
|
%{?python_provide:%python_provide python3-%{modname}}
|
|
|
|
@ -55,7 +64,13 @@ Summary: API documentation for python-dateutil
|
|
|
|
|
This package contains %{summary}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p1
|
|
|
|
|
%autosetup -N
|
|
|
|
|
# the tests were moved outside of %%{modname} directory upstream after 2.8.2
|
|
|
|
|
# so we apply the patch with new paths from within it
|
|
|
|
|
pushd %{modname}/test
|
|
|
|
|
%patch -P1 -p2
|
|
|
|
|
popd
|
|
|
|
|
%patch -P2 -p2
|
|
|
|
|
iconv --from=ISO-8859-1 --to=UTF-8 NEWS > NEWS.new
|
|
|
|
|
mv NEWS.new NEWS
|
|
|
|
|
|
|
|
|
@ -66,9 +81,11 @@ make -C docs html
|
|
|
|
|
%install
|
|
|
|
|
%py3_install
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%{__python3} -m pytest -W ignore::pytest.PytestUnknownMarkWarning
|
|
|
|
|
%else
|
|
|
|
|
%py3_check_import dateutil dateutil.easter dateutil.parser dateutil.relativedelta dateutil.rrule dateutil.tz dateutil.utils dateutil.zoneinfo
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{modname}
|
|
|
|
@ -82,19 +99,63 @@ make -C docs html
|
|
|
|
|
%doc docs/_build/html
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Jul 12 2023 Petr Viktorin <pviktori@redhat.com> - 1:2.8.1-7
|
|
|
|
|
- Mitigate CVE-2007-4559 (tarfile directory traversal).
|
|
|
|
|
Resolves: rhbz#2203905
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:2.8.2-14
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.2-13
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.2-12
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Nov 05 2023 Miro Hrončok <mhroncok@redhat.com> - 1:2.8.2-11
|
|
|
|
|
- Clarify the SPDX License tag
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.2-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jul 04 2023 Karolina Surma <ksurma@redhat.com> - 1:2.8.2-9
|
|
|
|
|
- Backport replacement for deprecated datetime.datetime.utcfromtimestamp()
|
|
|
|
|
|
|
|
|
|
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 1:2.8.2-8
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 1:2.8.2-7
|
|
|
|
|
- Bootstrap for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Wed Mar 01 2023 Gwyn Ciesla <gwync@protonmail.com> - 1:2.8.2-6
|
|
|
|
|
- migrated to SPDX license
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.2-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.2-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1:2.8.2-3
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1:2.8.2-2
|
|
|
|
|
- Bootstrap for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Thu Mar 10 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1:2.8.2-1
|
|
|
|
|
- Update to 3.8.2 (fix RHBZ#1982169)
|
|
|
|
|
- Backport 2bdd631: remove deprecated pytest.warns(None) (fix RHBZ#2059950)
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.1-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.1-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1:2.8.1-6
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1:2.8.1-6
|
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:2.8.1-5
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 1:2.8.1-5
|
|
|
|
|
- Bootstrap for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Mon Mar 08 2021 Charalampos Stratakis <cstratak@redhat.com> - 1:2.8.1-4
|
|
|
|
|
- Disable tests on RHEL9 to remove the test dependencies
|
|
|
|
|
* Wed Jun 02 2021 Petr Viktorin <pviktori@redhat.com> - 1:2.8.1-4
|
|
|
|
|
- Add the ASL 2.0 license
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.1-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|