[arch-commits] Commit in python-jinja-time/repos/community-staging-any (4 files)

Evangelos Foutras foutrelis at gemini.archlinux.org
Thu Dec 2 21:38:09 UTC 2021


    Date: Thursday, December 2, 2021 @ 21:38:09
  Author: foutrelis
Revision: 1062632

archrelease: copy trunk to community-staging-any

Added:
  python-jinja-time/repos/community-staging-any/PKGBUILD
    (from rev 1062631, python-jinja-time/trunk/PKGBUILD)
  python-jinja-time/repos/community-staging-any/python-jinja-time-0.2.0-arrow_shift.patch
    (from rev 1062631, python-jinja-time/trunk/python-jinja-time-0.2.0-arrow_shift.patch)
Deleted:
  python-jinja-time/repos/community-staging-any/PKGBUILD
  python-jinja-time/repos/community-staging-any/python-jinja-time-0.2.0-arrow_shift.patch

-------------------------------------------+
 PKGBUILD                                  |   96 ++++++++++++++--------------
 python-jinja-time-0.2.0-arrow_shift.patch |   76 +++++++++++-----------
 2 files changed, 86 insertions(+), 86 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-02 21:38:04 UTC (rev 1062631)
+++ PKGBUILD	2021-12-02 21:38:09 UTC (rev 1062632)
@@ -1,48 +0,0 @@
-# Maintainer: David Runge <dvzrv at archlinux.org>
-
-_name=jinja2-time
-pkgname=python-jinja-time
-pkgver=0.2.0
-pkgrel=6
-pkgdesc="Jinja2 Extension for Dates and Times"
-arch=('any')
-url="https://github.com/hackebrot/jinja2-time"
-license=('MIT')
-depends=('python-arrow' 'python-jinja')
-makedepends=('python-setuptools')
-checkdepends=('python-freezegun' 'python-pytest')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
-        "${pkgname}-0.2.0-arrow_shift.patch")
-sha512sums=('8ac4686312cde689f7a431001833d5d477030c4f5e9470d949bd07a40fcb9521f6ddcde37a72468093121ff9451e352a0bb43d20a796d7a204cf94e8a7545f2c'
-            '0286a608702bb445cf29da7900ec04f5b1f64d1e9658b84f9a90018adf5fce5cc959832abff73fa017afcaf0a0f6be85060e52a79038bf770b8b37d8c96a5e7d')
-
-prepare() {
-  mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
-  cd "$pkgname-$pkgver"
-  # fixing the way python-arrow is used:
-  # https://github.com/hackebrot/jinja2-time/issues/15
-  patch -Np1 -i "../${pkgname}-0.2.0-arrow_shift.patch"
-}
-
-build() {
-  cd "$pkgname-$pkgver"
-  python setup.py build
-}
-
-check() {
-  cd "$pkgname-$pkgver"
-  export PYTHONPATH="build:${PYTHONPATH}"
-  pytest -v
-#  python setup.py test
-}
-
-package() {
-  cd "$pkgname-$pkgver"
-  python setup.py install --skip-build \
-    --optimize=1 \
-    --prefix=/usr \
-    --root="${pkgdir}"
-  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -vDm 644 {CONTRIBUTING,CONTRIBUTORS,HISTORY,README}.rst \
-    -t "${pkgdir}/usr/share/doc/${pkgname}"
-}

Copied: python-jinja-time/repos/community-staging-any/PKGBUILD (from rev 1062631, python-jinja-time/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-12-02 21:38:09 UTC (rev 1062632)
@@ -0,0 +1,48 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=jinja2-time
+pkgname=python-jinja-time
+pkgver=0.2.0
+pkgrel=7
+pkgdesc="Jinja2 Extension for Dates and Times"
+arch=('any')
+url="https://github.com/hackebrot/jinja2-time"
+license=('MIT')
+depends=('python-arrow' 'python-jinja')
+makedepends=('python-setuptools')
+checkdepends=('python-freezegun' 'python-pytest')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
+        "${pkgname}-0.2.0-arrow_shift.patch")
+sha512sums=('8ac4686312cde689f7a431001833d5d477030c4f5e9470d949bd07a40fcb9521f6ddcde37a72468093121ff9451e352a0bb43d20a796d7a204cf94e8a7545f2c'
+            '0286a608702bb445cf29da7900ec04f5b1f64d1e9658b84f9a90018adf5fce5cc959832abff73fa017afcaf0a0f6be85060e52a79038bf770b8b37d8c96a5e7d')
+
+prepare() {
+  mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
+  cd "$pkgname-$pkgver"
+  # fixing the way python-arrow is used:
+  # https://github.com/hackebrot/jinja2-time/issues/15
+  patch -Np1 -i "../${pkgname}-0.2.0-arrow_shift.patch"
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  python setup.py build
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+  export PYTHONPATH="build:${PYTHONPATH}"
+  pytest -v
+#  python setup.py test
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  python setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="${pkgdir}"
+  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -vDm 644 {CONTRIBUTING,CONTRIBUTORS,HISTORY,README}.rst \
+    -t "${pkgdir}/usr/share/doc/${pkgname}"
+}

Deleted: python-jinja-time-0.2.0-arrow_shift.patch
===================================================================
--- python-jinja-time-0.2.0-arrow_shift.patch	2021-12-02 21:38:04 UTC (rev 1062631)
+++ python-jinja-time-0.2.0-arrow_shift.patch	2021-12-02 21:38:09 UTC (rev 1062632)
@@ -1,38 +0,0 @@
-From aa4af9af0a0a5111a8ad21bc1b43bbdb586ee8af Mon Sep 17 00:00:00 2001
-From: Vincent Bernat <vincent at bernat.ch>
-Date: Sun, 3 Nov 2019 07:48:08 +0100
-Subject: [PATCH] Use shift() instead of replace() to modify dates
-
-Previously, the `replace()` method from arrow was shifting the date
-when the arguments were using the plural form. Since Arrow 0.9.0, this
-has been deprecated in favor of a `shift()` method. Arrow 0.14.5
-completely removed the ability for `replace()` to shift dates. This
-leads to errors like `AttributeError: unknown attribute: "hours"` when
-using plural form.
-
-This commit replace the use of `replace()` by `shift()` since the
-intent is always to shift the current date.
----
- jinja2_time/jinja2_time.py | 6 +++---
- setup.py                   | 4 ++--
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/jinja2_time/jinja2_time.py b/jinja2_time/jinja2_time.py
-index ce713cb..717c8a0 100755
---- a/jinja2_time/jinja2_time.py
-+++ b/jinja2_time/jinja2_time.py
-@@ -19,11 +19,11 @@ def _datetime(self, timezone, operator, offset, datetime_format):
-         d = arrow.now(timezone)
- 
-         # Parse replace kwargs from offset and include operator
--        replace_params = {}
-+        shift_params = {}
-         for param in offset.split(','):
-             interval, value = param.split('=')
--            replace_params[interval.strip()] = float(operator + value.strip())
--        d = d.replace(**replace_params)
-+            shift_params[interval.strip()] = float(operator + value.strip())
-+        d = d.shift(**shift_params)
- 
-         if datetime_format is None:
-             datetime_format = self.environment.datetime_format

Copied: python-jinja-time/repos/community-staging-any/python-jinja-time-0.2.0-arrow_shift.patch (from rev 1062631, python-jinja-time/trunk/python-jinja-time-0.2.0-arrow_shift.patch)
===================================================================
--- python-jinja-time-0.2.0-arrow_shift.patch	                        (rev 0)
+++ python-jinja-time-0.2.0-arrow_shift.patch	2021-12-02 21:38:09 UTC (rev 1062632)
@@ -0,0 +1,38 @@
+From aa4af9af0a0a5111a8ad21bc1b43bbdb586ee8af Mon Sep 17 00:00:00 2001
+From: Vincent Bernat <vincent at bernat.ch>
+Date: Sun, 3 Nov 2019 07:48:08 +0100
+Subject: [PATCH] Use shift() instead of replace() to modify dates
+
+Previously, the `replace()` method from arrow was shifting the date
+when the arguments were using the plural form. Since Arrow 0.9.0, this
+has been deprecated in favor of a `shift()` method. Arrow 0.14.5
+completely removed the ability for `replace()` to shift dates. This
+leads to errors like `AttributeError: unknown attribute: "hours"` when
+using plural form.
+
+This commit replace the use of `replace()` by `shift()` since the
+intent is always to shift the current date.
+---
+ jinja2_time/jinja2_time.py | 6 +++---
+ setup.py                   | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/jinja2_time/jinja2_time.py b/jinja2_time/jinja2_time.py
+index ce713cb..717c8a0 100755
+--- a/jinja2_time/jinja2_time.py
++++ b/jinja2_time/jinja2_time.py
+@@ -19,11 +19,11 @@ def _datetime(self, timezone, operator, offset, datetime_format):
+         d = arrow.now(timezone)
+ 
+         # Parse replace kwargs from offset and include operator
+-        replace_params = {}
++        shift_params = {}
+         for param in offset.split(','):
+             interval, value = param.split('=')
+-            replace_params[interval.strip()] = float(operator + value.strip())
+-        d = d.replace(**replace_params)
++            shift_params[interval.strip()] = float(operator + value.strip())
++        d = d.shift(**shift_params)
+ 
+         if datetime_format is None:
+             datetime_format = self.environment.datetime_format



More information about the arch-commits mailing list