%global _empty_manifest_terminate_build 0
Name:		python-dateparser
Version:	1.5.1
Release:	1
Summary:	Date parsing library designed to parse dates from HTML pages
License:	BSD-3-Clause
URL:		https://github.com/scrapinghub/dateparser
Source0:	%{pypi_source dateparser}
BuildArch:	noarch

Requires:	python3-dateutil
Requires:	python3-pytz
Requires:	python3-regex
Requires:	python3-tzlocal
Requires:	python3-convertdate
Requires:	python3-hijri-converter
Requires:	python3-convertdate

%description
Date parsing library designed to parse dates from HTML pages

%package -n python3-dateparser
Summary:	Date parsing library designed to parse dates from HTML pages
Provides:	python-dateparser = %{version}-%{release}
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
%description -n python3-dateparser
Date parsing library designed to parse dates from HTML pages

%package help
Summary:	Development documents and examples for dateparser
Provides:	python3-dateparser-doc
%description help
Date parsing library designed to parse dates from HTML pages

%prep
%autosetup -n dateparser-%{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 .

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

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

%changelog
* Fri Nov 20 2026 Li Yangyang <dev01209@linx-info.com> - 1.5.1-1
- update to 1.5.1
- refresh source archive

* Tue Nov 17 2026 YangengLiu <dev01202@linx-info.com> - 1.5.0-1
- update to 1.5.0
- refresh source archive

* Tue Sep 15 2026 liudingyao <liudingyao@kylinos.cn> - 1.4.3-1
- Update to 1.4.3

* Wed Aug 05 2026 jinshuaiyu <jinshuaiyu@kylinos.cn> - 1.4.2-1
- update version to 1.4.2
- Add an IGNORE_SURROUNDING_TEXT setting that, when enabled, retries parsing after ignoring leading and trailing words
  the language does not recognize, so a date wrapped in extra text such as "Published on 16/04/2019" is parsed
- Add a strategy argument to search_dates() to choose the search strategy: the default "split" keeps the current
  behavior, while the new "ngram" strategy parses the longest sequences of tokens as dates for more predictable
  results on noisy text

* Wed Jun 17 2026 YangengLiu <dev01202@linx-info.com> - 1.4.1-1
- update version to 1.4.1
  * Make digit quantifiers possessive in the relative-date regexes to prevent quadratic backtracking (ReDoS) on long digit runs.
  * Use the parser-relative now for the current month when filling in incomplete dates so the month and day stay consistent.
  * Fix Norwegian Bokmål (nb) parsing of relative date expressions such as "3 måneder siden" and "om 2 måneder".
  * Preserve surrounding whitespace when removing skip tokens during translation to avoid spurious double spaces.
  * Add the USE_GIVEN_LANGUAGE_ORDER setting to try languages and locales in the order given rather than by frequency.

* Fri Mar 27 2026 YangengLiu <dev01202@linx-info.com> - 1.4.0-1
- update version to 1.4.0
  * Add support for expressions like "N {interval} from now" in English.
  * Add support for the en-US locale.
  * Fix parsing word-number relative phrases such as "two days later" 
  * Allow md5hash to work in FIPS environments
  * Honor REQUIRE_PARTS for ambiguous month-number inputs by retrying with a year-biased DATE_ORDER
  * Remove import-time loading of timezone offset data from pickle to prevent unsafe deserialization from packaged data.
  * Replace eval() use when parsing no_word_spacing with strict boolean parsing to prevent code execution from locale metadata.

* Fri Feb 27 2026 zhang_jian <zhang_jian7@hoperun.com> - 1.3.0-1
- Update package to version 1.3.0
  * Fixed year expectation issues in tests.
  * Assume the current year if not specified
  * Russian: Support compound ordinals

* Thu Aug 14 2025 Ge Wang <wang__ge@126.com> - 1.2.2-1
- Update package to version 1.2.2
  * Handle the Russian preposition "с"
  * Fix weekday search
  * Fix PytzUsageWarning
  * Fix date_parser with prefer_month_of_year wrong results
  * Fix skipped day when UTC and tz are different days

* Wed Aug 14 2024 lixiaoyong <lixiaoyong@kylinos.cn> - 1.2.0-1
- Upgrade package to version 1.2.0
- New ``PREFER_MONTH_OF_YEAR`` setting
- Absolute years in Russian are no longer being treated as a number of years in
  the past
- Removed the use of ``datetime.utcnow``, deprecated on Python 3.12
- Applied Black formatting to the code base
- Initial integration with OSSFuzz
- Extended test cases

* Fri Apr 07 2023 wulei <wu_lei@hoperun.com> - 1.1.8-1
- Upgrade package to version 1.1.8

* Wed Feb 8 2023 wubijie <wubijie@kylinos.cn> - 1.1.7-1
- Update package to version 1.1.7

* Thu Nov 24 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 1.1.4-1
- Update package to version 1.1.4

* Fri Aug 13 2021 Python_Bot <Python_Bot@openeuler.org> - 1.0.0-1
- Package Spec generated