[packages/python3-ago] Up to 0.1.0

arekm arekm at pld-linux.org
Sun May 4 14:08:38 CEST 2025


commit d7c13abd2a86fd4dd5d18ae45ec9b9f589b10722
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun May 4 13:20:40 2025 +0200

    Up to 0.1.0

 ago-python3.patch |  17 ---------
 python-ago.spec   | 101 ------------------------------------------------------
 python3-ago.spec  |  49 ++++++++++++++++++++++++++
 3 files changed, 49 insertions(+), 118 deletions(-)
---
diff --git a/python-ago.spec b/python-ago.spec
deleted file mode 100644
index 40c4591..0000000
--- a/python-ago.spec
+++ /dev/null
@@ -1,101 +0,0 @@
-#
-# Conditional build:
-%bcond_without	python2		# Python 2.x module
-%bcond_without	python3		# Python 3.x module
-#
-%define	module	ago
-#
-Summary:	Makes customizable human readable timedeltas
-Summary(pl.UTF-8):	Konfigurowalne, czytelne dla człowieka różnice czasu
-Name:		python-ago
-Version:	0.0.6
-Release:	17
-License:	Public Domain
-Group:		Libraries/Python
-#Source0Download: https://pypi.org/simple/ago/
-Source0:	https://files.pythonhosted.org/packages/source/a/ago/ago-%{version}.tar.gz
-# Source0-md5:	e2fdc21fb922b4fc21ec19c6eac6bd46
-Patch0:		ago-python3.patch
-URL:		https://bitbucket.org/russellballestrini/ago/overview
-%if %{with python2}
-BuildRequires:	python-devel
-BuildRequires:	python-modules
-BuildRequires:	python-setuptools
-%endif
-%if %{with python3}
-BuildRequires:	python3-2to3
-BuildRequires:	python3-devel
-BuildRequires:	python3-modules
-BuildRequires:	python3-setuptools
-%endif
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-Requires:	python-modules
-BuildArch:	noarch
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-Makes customizable human readable timedeltas.
-
-%description -l pl.UTF-8
-Konfigurowalne, czytelne dla człowieka różnice czasu.
-
-%package -n python3-%{module}
-Summary:	Makes customizable human readable timedeltas
-Summary(pl.UTF-8):	Konfigurowalne, czytelne dla człowieka różnice czasu
-Group:		Libraries/Python
-Requires:	python3-modules
-
-%description -n python3-%{module}
-Makes customizable human readable timedeltas.
-
-%description -n python3-%{module} -l pl.UTF-8
-Konfigurowalne, czytelne dla człowieka różnice czasu.
-
-%prep
-%setup -q -n ago-%{version}
-%patch -P 0 -p1
-
-%build
-%if %{with python2}
-%py_build
-%endif
-
-%if %{with python3}
-%py3_build
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
-%py_install
-%endif
-
-%if %{with python3}
-install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
-%py3_install
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc PKG-INFO README.rst
-%{_examplesdir}/python-%{module}-%{version}
-%{py_sitescriptdir}/%{module}.py*
-%{py_sitescriptdir}/*egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc PKG-INFO README.rst
-%{_examplesdir}/python3-%{module}-%{version}
-%{py3_sitescriptdir}/%{module}.py*
-%{py3_sitescriptdir}/__pycache__/ago.cpython-*.py*
-%{py3_sitescriptdir}/*egg-info
-%endif
diff --git a/python3-ago.spec b/python3-ago.spec
new file mode 100644
index 0000000..cd686e4
--- /dev/null
+++ b/python3-ago.spec
@@ -0,0 +1,49 @@
+%define	module	ago
+#
+Summary:	Makes customizable human readable timedeltas
+Summary(pl.UTF-8):	Konfigurowalne, czytelne dla człowieka różnice czasu
+Name:		python3-ago
+Version:	0.1.0
+Release:	1
+License:	Public Domain
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/ago/
+Source0:	https://files.pythonhosted.org/packages/source/a/ago/ago-%{version}.tar.gz
+# Source0-md5:	669635e6283b6aa9334184684ca2f062
+URL:		https://bitbucket.org/russellballestrini/ago/overview
+BuildRequires:	python3-devel
+BuildRequires:	python3-modules
+BuildRequires:	python3-setuptools
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	python3-modules
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Makes customizable human readable timedeltas.
+
+%description -l pl.UTF-8
+Konfigurowalne, czytelne dla człowieka różnice czasu.
+
+%prep
+%setup -q -n ago-%{version}
+
+%build
+%py3_build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc PKG-INFO README.rst
+%{_examplesdir}/python3-%{module}-%{version}
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/*egg-info
diff --git a/ago-python3.patch b/ago-python3.patch
deleted file mode 100644
index ce030a4..0000000
--- a/ago-python3.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -urN ago-0.0.6.org/ago.py ago-0.0.6/ago.py
---- ago-0.0.6.org/ago.py	2014-02-25 17:44:03.000000000 +0100
-+++ ago-0.0.6/ago.py	2014-04-10 21:19:49.563889851 +0200
-@@ -5,10 +5,10 @@
-     """Accepts a delta, returns a dictionary of units"""
-     delta = abs( delta )
-     return { 
--        'year'   : int(delta.days / 365),
-+        'year'   : int(delta.days // 365),
-         'day'    : int(delta.days % 365),
--        'hour'   : int(delta.seconds / 3600),
--        'minute' : int(delta.seconds / 60) % 60,
-+        'hour'   : int(delta.seconds // 3600),
-+        'minute' : int(delta.seconds // 60) % 60,
-         'second' : delta.seconds % 60,
-         'microsecond' : delta.microseconds
-     }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-ago.git/commitdiff/d7c13abd2a86fd4dd5d18ae45ec9b9f589b10722



More information about the pld-cvs-commit mailing list