Github messages for voidlinux
 help / color / mirror / Atom feed
From: icp1994 <icp1994@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] python3-tzlocal: update to 4.2; fix revdeps
Date: Mon, 29 Aug 2022 21:39:45 +0200	[thread overview]
Message-ID: <20220829193945.gaJWt3OMiXv7Ab1VE9sGdNoB4z1yIjL9iIb15fkORTc@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38961@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

There is an updated pull request by icp1994 against master on the void-packages repository

https://github.com/icp1994/void-packages python3-tzlocal
https://github.com/void-linux/void-packages/pull/38961

python3-tzlocal: update to 4.2; fix revdeps
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

#### Rev dep checks
- [x] jrnl
- [x] khal (unrelated test failures, [reported upstream](https://github.com/pimutils/khal/issues/1180))
- [x] remhind (revbumped to add dep, fix tests)
- [x] ripe-atlas-tools (updated to fix tests)
- [x] python3-tasklib
- [x] python3-dateparser (works on top of https://github.com/void-linux/void-packages/pull/38833)

A patch file from https://github.com/void-linux/void-packages/pull/38961.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-python3-tzlocal-38961.patch --]
[-- Type: text/x-diff, Size: 8192 bytes --]

From b41341cf0866089e83bae3df04bfa8a879420bf4 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 27 Aug 2022 00:48:47 +0530
Subject: [PATCH 1/5] New package: python3-pytz_deprecation_shim-0.1.0

---
 srcpkgs/python3-pytz_deprecation_shim/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/python3-pytz_deprecation_shim/template

diff --git a/srcpkgs/python3-pytz_deprecation_shim/template b/srcpkgs/python3-pytz_deprecation_shim/template
new file mode 100644
index 000000000000..04368a25c89e
--- /dev/null
+++ b/srcpkgs/python3-pytz_deprecation_shim/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-pytz_deprecation_shim'
+pkgname=python3-pytz_deprecation_shim
+version=0.1.0
+revision=1
+wrksrc="pytz-deprecation-shim-${version}"
+build_style=python3-pep517
+hostmakedepends="python3-wheel"
+depends="python3"
+checkdepends="python3-pytz python3-attrs python3-hypothesis python3-pytest-xdist"
+short_desc="Shims to make deprecation of pytz easier"
+maintainer="icp <pangolin@vivaldi.net>"
+license="Apache-2.0"
+homepage="https://github.com/pganssle/pytz-deprecation-shim"
+distfiles="https://github.com/pganssle/pytz-deprecation-shim/archive/refs/tags/${version}.tar.gz"
+checksum=b72ff0470c084d70e93174e9881443aba274ef6ec3cc6c4bd88bd0ba64ea8bdd
+make_check_pre="env PYTHONPATH=src"

From 5c404e6b54b9ad138e449a498b054496b8c03551 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 27 Aug 2022 00:49:02 +0530
Subject: [PATCH 2/5] python3-tzlocal: update to 4.2.

---
 .../python3-tzlocal/patches/fix-test.patch    | 12 +++++++++
 srcpkgs/python3-tzlocal/template              | 26 +++++++------------
 2 files changed, 21 insertions(+), 17 deletions(-)
 create mode 100644 srcpkgs/python3-tzlocal/patches/fix-test.patch

diff --git a/srcpkgs/python3-tzlocal/patches/fix-test.patch b/srcpkgs/python3-tzlocal/patches/fix-test.patch
new file mode 100644
index 000000000000..7b5623df6960
--- /dev/null
+++ b/srcpkgs/python3-tzlocal/patches/fix-test.patch
@@ -0,0 +1,12 @@
+--- a/tests/test_tzlocal.py
++++ b/tests/test_tzlocal.py
+@@ -205,6 +205,9 @@
+ 
+ 
+ def test_win32_no_dst(mocker):
++    sys.modules["winreg"] = MagicMock()
++    import tzlocal.win32
++
+     mocker.patch("tzlocal.utils.assert_tz_offset")
+     valuesmock = mocker.patch("tzlocal.win32.valuestodict")
+ 
diff --git a/srcpkgs/python3-tzlocal/template b/srcpkgs/python3-tzlocal/template
index bc7ddacaf321..7b40a12dfe4a 100644
--- a/srcpkgs/python3-tzlocal/template
+++ b/srcpkgs/python3-tzlocal/template
@@ -1,28 +1,20 @@
 # Template file for 'python3-tzlocal'
 pkgname=python3-tzlocal
-version=2.1
-revision=4
+version=4.2
+revision=1
 wrksrc="tzlocal-${version}"
-build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-pytz"
-checkdepends="python3-pytz python3-mock"
+build_style=python3-pep517
+hostmakedepends="python3-wheel"
+depends="python3-pytz_deprecation_shim"
+checkdepends="${depends} python3-pytest-mock python3-pytest-xdist"
 short_desc="Return the tzinfo object for the local timezone (Python 3)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/regebro/tzlocal"
 changelog="https://raw.githubusercontent.com/regebro/tzlocal/master/CHANGES.txt"
-distfiles="${PYPI_SITE}/t/tzlocal/tzlocal-${version}.tar.gz"
-checksum=643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44
-
-post_patch() {
-	# In tzlocal development tree, below file is a symlink
-	# Hence, the check correctly report its value
-	rm -f tests/test_data/symlink_localtime/etc/localtime
-	ln -s ../usr/share/zoneinfo/Africa/Harare \
-		tests/test_data/symlink_localtime/etc/localtime
-}
+distfiles="https://github.com/regebro/tzlocal/archive/refs/tags/${version}.tar.gz"
+checksum=9bbfaedb6083467003bd1a622a412a7b2f1608f45b2d9132bf936f55fe72d65e
 
 post_install() {
-	vlicense LICENSE.txt LICENSE
+	vlicense LICENSE.txt
 }

From 5716af566cf61243f71a66f74b7a54a215e615e0 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 27 Aug 2022 01:29:18 +0530
Subject: [PATCH 3/5] remhind: add missing dep, enable tests

---
 srcpkgs/remhind/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/remhind/template b/srcpkgs/remhind/template
index fc490d8f96bb..95822e0a45c7 100644
--- a/srcpkgs/remhind/template
+++ b/srcpkgs/remhind/template
@@ -1,11 +1,12 @@
 # Template file for 'remhind'
 pkgname=remhind
 version=0.1.1
-revision=3
+revision=4
 build_style=python3-module
 hostmakedepends="python3-setuptools python3-gobject-devel python3-cairo-devel"
 depends="python3-icalendar python3-dateutil python3-gobject python3-toml
- python3-tzlocal python3-xdg-variables python3-inotify python3-aionotify"
+ python3-tzlocal python3-xdg-variables python3-inotify python3-aionotify libnotify"
+checkdepends="${depends} python3-freezegun python3-pytest-xdist"
 short_desc="Notification daemon of events stored in directories"
 maintainer="Stacy Harper <contact@stacyharper.net>"
 license="GPL-3.0-only"

From f157f96db624014add5165b256b5a3e13896792e Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Mon, 29 Aug 2022 01:09:27 +0530
Subject: [PATCH 4/5] ripe-atlas-tools: update to 3.0.2.

---
 srcpkgs/ripe-atlas-tools/template | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/ripe-atlas-tools/template b/srcpkgs/ripe-atlas-tools/template
index dee72787f622..c7f6b72002f4 100644
--- a/srcpkgs/ripe-atlas-tools/template
+++ b/srcpkgs/ripe-atlas-tools/template
@@ -1,22 +1,27 @@
 # Template file for 'ripe-atlas-tools'
 pkgname=ripe-atlas-tools
-version=2.3.0
-revision=4
+version=3.0.2
+revision=1
 build_style=python3-module
-pycompile_module="ripe/atlas/tools"
 hostmakedepends="python3-setuptools"
-depends="
- python3-tzlocal python3-yaml python3-six python3-dateutil python3-openssl
- python3-ripe-atlas-sagan python3-ripe-atlas-cousteau python3-IPy"
-short_desc="The official command-line client for RIPE Atlas"
+depends="python3-tzlocal python3-yaml python3-dateutil python3-openssl
+ python3-ripe-atlas-sagan python3-ripe-atlas-cousteau python3-IPy python3-requests"
+checkdepends="${depends} python3-Sphinx python3-pytest"
+short_desc="Official command-line client for RIPE Atlas"
 maintainer="johannes <johannes.brechtmann@gmail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/ripe-ncc/ripe-atlas-tools"
-distfiles="https://github.com/ripe-ncc/${pkgname}/archive/v${version}.tar.gz"
-checksum=29d90c12b27f339cfb4f03d5cb758541f2c67060b1f619079d338b85d8c50931
+changelog="https://raw.githubusercontent.com/RIPE-NCC/ripe-atlas-tools/master/CHANGES.rst"
+distfiles="https://github.com/RIPE-NCC/ripe-atlas-tools/archive/refs/tags/v${version}.tar.gz"
+checksum=9bc4f17ad77cc3c7b64ca05c18395bc0f2f46fd2d4fde6e14e60c3e02fe1a119
+make_check_pre="env PYTHONPATH=. PATH=scripts:${PATH}"
 
-post_install() {
-	vinstall ripe-atlas-bash-completion.sh 644 \
-		usr/share/bash-completion/completions ripe-atlas-tools
+pre_check() {
+	# hack to make pytest work with namespace packages
+	rm ripe/atlas/__init__.py
+	rm ripe/__init__.py
 }
 
+post_install() {
+	vcompletion ripe-atlas-bash-completion.sh bash ripe-atlas
+}

From af2624ccaa8bcdf959caa79d55da4c526745dc20 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Mon, 29 Aug 2022 19:10:34 +0530
Subject: [PATCH 5/5] python3-tasklib: enable tests

---
 srcpkgs/python3-tasklib/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/python3-tasklib/template b/srcpkgs/python3-tasklib/template
index 3787fdc764af..6a843cd148d7 100644
--- a/srcpkgs/python3-tasklib/template
+++ b/srcpkgs/python3-tasklib/template
@@ -4,9 +4,10 @@ version=2.4.3
 revision=1
 wrksrc="${pkgname#*-}-${version}"
 build_style=python3-module
+make_check_target="tasklib/tests.py"
 hostmakedepends="python3-setuptools"
 depends="task python3-tzlocal python3-pytz"
-checkdepends="$depends"
+checkdepends="${depends} python3-pytest-xdist"
 short_desc="Library for interacting with taskwarrior databases (Python3)"
 maintainer="Cullen Ross <cullenrss@gmail.com>"
 license="BSD-3-Clause"

  parent reply	other threads:[~2022-08-29 19:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-28 20:00 [PR PATCH] " icp1994
2022-08-29  3:42 ` [PR REVIEW] " sgn
2022-08-29  5:29 ` icp1994
2022-08-29 12:32 ` sgn
2022-08-29 12:32 ` sgn
2022-08-29 12:34 ` sgn
2022-08-29 19:39 ` icp1994
2022-08-29 19:39 ` icp1994 [this message]
2022-09-06 10:58 ` sgn
2022-09-06 11:36 ` [PR PATCH] [Closed]: " sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220829193945.gaJWt3OMiXv7Ab1VE9sGdNoB4z1yIjL9iIb15fkORTc@z \
    --to=icp1994@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).