[packages/python-aniso8601] - new
qboosh
qboosh at pld-linux.org
Sun Dec 21 10:02:18 CET 2025
commit ecd2662835aae06ffe4f7fc60230b75d3f1b9ebd
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Dec 21 10:02:37 2025 +0100
- new
python-aniso8601.spec | 155 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 155 insertions(+)
---
diff --git a/python-aniso8601.spec b/python-aniso8601.spec
new file mode 100644
index 0000000..153fcb7
--- /dev/null
+++ b/python-aniso8601.spec
@@ -0,0 +1,155 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+Summary: Another ISO 8601 parser for Python
+Summary(pl.UTF-8): Jeszcze jeden parser ISO 8601 dla Pythona
+Name: python-aniso8601
+Version: 10.0.1
+Release: 1
+License: BSD
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/aniso8601/
+Source0: https://files.pythonhosted.org/packages/source/a/aniso8601/aniso8601-%{version}.tar.gz
+# Source0-md5: ea9bb2b816aa448078d91aea3ce43d55
+URL: https://pypi.org/project/aniso8601/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-mock >= 2.0.0
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.9
+BuildRequires: python3-setuptools
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires: python-modules >= 1:2.7
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Another ISO 8601 parser for Python. Features:
+- Pure Python implementation
+- Logical behavior:
+ - Parse a time, get a "datetime.time"
+ - Parse a date, get a "datetime.date"
+ - Parse a datetime, get a "datetime.datetime"
+ - Parse a duration, get a "datetime.timedelta"
+ - Parse an interval, get a tuple of dates or datetimes
+ - Parse a repeating interval, get a date or datetime generator
+- UTC offset represented as fixed-offset tzinfo
+- Parser separate from representation, allowing parsing to different
+ datetime representations
+- No regular expressions
+
+%description -l pl.UTF-8
+Jeszcze jeden parser ISO 8601 dla Pythona. Cechy:
+- implementacja w czystym Pythonie
+- logiczne zachowanie:
+ - analiza czasu zwraca obiekt "datetime.time"
+ - analiza daty zwraca obiekt "datetime.date"
+ - analiza daty z czasem zwraca obiekt "datetime.datetime"
+ - analiza okresu zwraca obiekt "datetime.timedelta"
+ - analiza przedziału czasu zwraca krotkę obiektów date lub datetime
+ - analiza ciągu przedziałów zwraca generator obiektów date lub
+ datetime
+- przesunięcie względem UTC reprezentowane jako tzinfo ze stałym
+ przesunięciem
+- parser oddzielony od reprezentacji, pozwalający na analizę różnych
+ reprezentacji datetime
+- brak wyrażeń regularnych
+
+%package -n python3-aniso8601
+Summary: Another ISO 8601 parser for Python
+Summary(pl.UTF-8): Jeszcze jeden parser ISO 8601 dla Pythona
+Group: Libraries/Python
+Requires: python3-modules >= 1:3.9
+
+%description -n python3-aniso8601
+Another ISO 8601 parser for Python. Features:
+- Pure Python implementation
+- Logical behavior:
+ - Parse a time, get a "datetime.time"
+ - Parse a date, get a "datetime.date"
+ - Parse a datetime, get a "datetime.datetime"
+ - Parse a duration, get a "datetime.timedelta"
+ - Parse an interval, get a tuple of dates or datetimes
+ - Parse a repeating interval, get a date or datetime generator
+- UTC offset represented as fixed-offset tzinfo
+- Parser separate from representation, allowing parsing to different
+ datetime representations
+- No regular expressions
+
+%description -n python3-aniso8601 -l pl.UTF-8
+Jeszcze jeden parser ISO 8601 dla Pythona. Cechy:
+- implementacja w czystym Pythonie
+- logiczne zachowanie:
+ - analiza czasu zwraca obiekt "datetime.time"
+ - analiza daty zwraca obiekt "datetime.date"
+ - analiza daty z czasem zwraca obiekt "datetime.datetime"
+ - analiza okresu zwraca obiekt "datetime.timedelta"
+ - analiza przedziału czasu zwraca krotkę obiektów date lub datetime
+ - analiza ciągu przedziałów zwraca generator obiektów date lub
+ datetime
+- przesunięcie względem UTC reprezentowane jako tzinfo ze stałym
+ przesunięciem
+- parser oddzielony od reprezentacji, pozwalający na analizę różnych
+ reprezentacji datetime
+- brak wyrażeń regularnych
+
+%prep
+%setup -q -n aniso8601-%{version}
+
+%build
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+%{__python} -m unittest discover -s aniso8601
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+%{__python3} -m unittest discover -s aniso8601
+%endif
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.rst
+%{py_sitescriptdir}/aniso8601
+%{py_sitescriptdir}/aniso8601-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-aniso8601
+%defattr(644,root,root,755)
+%doc LICENSE README.rst
+%{py3_sitescriptdir}/aniso8601
+%{py3_sitescriptdir}/aniso8601-%{version}-py*.egg-info
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-aniso8601.git/commitdiff/ecd2662835aae06ffe4f7fc60230b75d3f1b9ebd
More information about the pld-cvs-commit
mailing list