2020-08-19 19:08:07 +08:00
|
|
|
%global _empty_manifest_terminate_build 0
|
|
|
|
|
Name: python-tzlocal
|
2024-02-26 10:15:04 +08:00
|
|
|
Version: 5.2
|
2020-08-19 19:08:07 +08:00
|
|
|
Release: 1
|
|
|
|
|
Summary: tzinfo object for the local timezone
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/regebro/tzlocal
|
2024-02-26 10:15:04 +08:00
|
|
|
Source0: https://files.pythonhosted.org/packages/04/d3/c19d65ae67636fe63953b20c2e4a8ced4497ea232c43ff8d01db16de8dc0/tzlocal-5.2.tar.gz
|
2020-08-19 19:08:07 +08:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
Requires: python3-pytz
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
This Python module returns a ``tzinfo`` object with the local timezone information under Unix and Win-32.
|
|
|
|
|
It requires ``pytz``, and returns ``pytz`` ``tzinfo`` objects.
|
|
|
|
|
This module attempts to fix a glaring hole in ``pytz``, that there is no way to
|
|
|
|
|
get the local timezone information, unless you know the zoneinfo name, and
|
|
|
|
|
under several Linux distros that's hard or impossible to figure out.
|
|
|
|
|
Also, with Windows different timezone system using pytz isn't of much use
|
|
|
|
|
unless you separately configure the zoneinfo timezone name.
|
|
|
|
|
With ``tzlocal`` you only need to call ``get_localzone()`` and you will get a
|
|
|
|
|
``tzinfo`` object with the local time zone info. On some Unices you will still
|
|
|
|
|
not get to know what the timezone name is, but you don't need that when you
|
|
|
|
|
have the tzinfo file. However, if the timezone name is readily available it
|
|
|
|
|
will be used.
|
|
|
|
|
|
|
|
|
|
%package -n python3-tzlocal
|
|
|
|
|
Summary: tzinfo object for the local timezone
|
|
|
|
|
Provides: python-tzlocal
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
2024-02-26 10:15:04 +08:00
|
|
|
BuildRequires: python3-pip
|
|
|
|
|
BuildRequires: python3-wheel
|
2020-08-19 19:08:07 +08:00
|
|
|
%description -n python3-tzlocal
|
|
|
|
|
This Python module returns a ``tzinfo`` object with the local timezone information under Unix and Win-32.
|
|
|
|
|
It requires ``pytz``, and returns ``pytz`` ``tzinfo`` objects.
|
|
|
|
|
This module attempts to fix a glaring hole in ``pytz``, that there is no way to
|
|
|
|
|
get the local timezone information, unless you know the zoneinfo name, and
|
|
|
|
|
under several Linux distros that's hard or impossible to figure out.
|
|
|
|
|
Also, with Windows different timezone system using pytz isn't of much use
|
|
|
|
|
unless you separately configure the zoneinfo timezone name.
|
|
|
|
|
With ``tzlocal`` you only need to call ``get_localzone()`` and you will get a
|
|
|
|
|
``tzinfo`` object with the local time zone info. On some Unices you will still
|
|
|
|
|
not get to know what the timezone name is, but you don't need that when you
|
|
|
|
|
have the tzinfo file. However, if the timezone name is readily available it
|
|
|
|
|
will be used.
|
|
|
|
|
|
|
|
|
|
%package help
|
|
|
|
|
Summary: Development documents and examples for tzlocal
|
|
|
|
|
Provides: python3-tzlocal-doc
|
|
|
|
|
%description help
|
|
|
|
|
This Python module returns a ``tzinfo`` object with the local timezone information under Unix and Win-32.
|
|
|
|
|
It requires ``pytz``, and returns ``pytz`` ``tzinfo`` objects.
|
|
|
|
|
This module attempts to fix a glaring hole in ``pytz``, that there is no way to
|
|
|
|
|
get the local timezone information, unless you know the zoneinfo name, and
|
|
|
|
|
under several Linux distros that's hard or impossible to figure out.
|
|
|
|
|
Also, with Windows different timezone system using pytz isn't of much use
|
|
|
|
|
unless you separately configure the zoneinfo timezone name.
|
|
|
|
|
With ``tzlocal`` you only need to call ``get_localzone()`` and you will get a
|
|
|
|
|
``tzinfo`` object with the local time zone info. On some Unices you will still
|
|
|
|
|
not get to know what the timezone name is, but you don't need that when you
|
|
|
|
|
have the tzinfo file. However, if the timezone name is readily available it
|
|
|
|
|
will be used.
|
|
|
|
|
|
|
|
|
|
%prep
|
2023-04-27 14:27:04 +08:00
|
|
|
%autosetup -n tzlocal-%{version}
|
2020-08-19 19:08:07 +08:00
|
|
|
|
|
|
|
|
%build
|
2024-02-26 10:15:04 +08:00
|
|
|
%pyproject_build
|
2020-08-19 19:08:07 +08:00
|
|
|
|
|
|
|
|
%install
|
2024-02-26 10:15:04 +08:00
|
|
|
%pyproject_install
|
2020-08-19 19:08:07 +08:00
|
|
|
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 .
|
|
|
|
|
|
2024-02-26 10:15:04 +08:00
|
|
|
%files -n python3-tzlocal
|
|
|
|
|
%{python3_sitelib}/*
|
2020-08-19 19:08:07 +08:00
|
|
|
|
2024-02-26 10:15:04 +08:00
|
|
|
%files help
|
2020-08-19 19:08:07 +08:00
|
|
|
%{_docdir}/*
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-02-26 10:15:04 +08:00
|
|
|
* Mon Feb 26 2024 wangjunqi <wangjunqi@kylinos.cn> - 5.2-1
|
|
|
|
|
- Update package to version 5.2
|
|
|
|
|
Added a pre-commit config
|
|
|
|
|
Updated python versions [hugovk]
|
|
|
|
|
Added type hints for the public functions
|
|
|
|
|
Moved to using pyproject.toml for project config.
|
|
|
|
|
|
2023-07-04 07:06:26 +08:00
|
|
|
* Wed Jul 05 2023 chenzixuan <chenzixuan@kylinos.cn> - 5.0.1-1
|
|
|
|
|
- Update to version 4.3
|
|
|
|
|
|
2023-04-27 14:27:04 +08:00
|
|
|
* Fri Apr 07 2023 Ge Wang <wang__ge@126.com> - 4.3-1
|
|
|
|
|
- Update to version 4.3
|
|
|
|
|
|
2023-12-26 09:24:41 +00:00
|
|
|
* Tue Aug 18 2020 Python_Bot <Python_Bot@openeuler.org> - 2.1-1
|
2020-08-19 19:08:07 +08:00
|
|
|
- Package Spec generated
|