From d22acf07dab727e82f94d901b18f7663e97062f5 Mon Sep 17 00:00:00 2001 From: icp Date: Sat, 27 Aug 2022 00:48:39 +0530 Subject: [PATCH 1/5] New package: python3-tzdata-2022.2 --- srcpkgs/python3-tzdata/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/python3-tzdata/template diff --git a/srcpkgs/python3-tzdata/template b/srcpkgs/python3-tzdata/template new file mode 100644 index 000000000000..3841d0fa1ee5 --- /dev/null +++ b/srcpkgs/python3-tzdata/template @@ -0,0 +1,17 @@ +# Template file for 'python3-tzdata' +pkgname=python3-tzdata +version=2022.2 +revision=1 +wrksrc="tzdata-${version}" +build_style=python3-pep517 +hostmakedepends="python3-wheel" +depends="python3" +checkdepends="python3-pytest-subtests python3-pytest-xdist" +short_desc="Python package wrapping the IANA time zone database" +maintainer="icp " +license="Apache-2.0" +homepage="https://github.com/python/tzdata" +changelog="https://raw.githubusercontent.com/python/tzdata/master/NEWS.md" +distfiles="https://github.com/python/tzdata/archive/refs/tags/${version}.tar.gz" +checksum=7683412157d401fd9f2e1bb945a4f2e3971542d49623756ec66dcf09ec1f955e +make_check_pre="env PYTHONPATH=src" From 93963e85c785b68a1c21024c006c91cabd687f4d Mon Sep 17 00:00:00 2001 From: icp Date: Sat, 27 Aug 2022 00:48:47 +0530 Subject: [PATCH 2/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..864a84468d5e --- /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-tzdata" +checkdepends="${depends} python3-pytz python3-attrs python3-hypothesis python3-pytest-xdist" +short_desc="Shims to make deprecation of pytz easier" +maintainer="icp " +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 82e168ae6803e5f251ce1caa85431b0c8ae86a49 Mon Sep 17 00:00:00 2001 From: icp Date: Sat, 27 Aug 2022 00:49:02 +0530 Subject: [PATCH 3/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 " 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 66f57cc87058c6d0348fabc9b9ca3e1f1d07d372 Mon Sep 17 00:00:00 2001 From: icp Date: Sat, 27 Aug 2022 01:29:18 +0530 Subject: [PATCH 4/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 " license="GPL-3.0-only" From e39345ddf905f76cc16aa86b1471efc92f35a0e1 Mon Sep 17 00:00:00 2001 From: icp Date: Mon, 29 Aug 2022 01:09:27 +0530 Subject: [PATCH 5/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 " 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 +}