Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Update urlwatch & Add python3-jq
@ 2022-02-14  4:51 RunningDroid
  2022-02-14  8:16 ` [PR REVIEW] " paper42
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: RunningDroid @ 2022-02-14  4:51 UTC (permalink / raw)
  To: ml

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

There is a new pull request by RunningDroid against master on the void-packages repository

https://github.com/RunningDroid/void-packages update_urlwatch
https://github.com/void-linux/void-packages/pull/35605

Update urlwatch & Add python3-jq
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

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

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

From 7d973f56f3723e13937113a9bad949855ae90c69 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 13 Feb 2022 23:08:59 -0500
Subject: [PATCH 1/2] New Package: python3-jq-1.2.2

---
 srcpkgs/python3-jq/patches/jq-py-setup.patch | 143 +++++++++++++++++++
 srcpkgs/python3-jq/template                  |  22 +++
 2 files changed, 165 insertions(+)
 create mode 100644 srcpkgs/python3-jq/patches/jq-py-setup.patch
 create mode 100644 srcpkgs/python3-jq/template

diff --git a/srcpkgs/python3-jq/patches/jq-py-setup.patch b/srcpkgs/python3-jq/patches/jq-py-setup.patch
new file mode 100644
index 000000000000..1eb4f28e7aa9
--- /dev/null
+++ b/srcpkgs/python3-jq/patches/jq-py-setup.patch
@@ -0,0 +1,143 @@
+From bef841b73ba7c9a79211146798ac888fce9bb55a Mon Sep 17 00:00:00 2001
+From: "Robert T. McGibbon" <rmcgibbo@gmail.com>
+Date: Fri, 7 May 2021 19:14:20 -0400
+Subject: [PATCH 1/1] Vastly simplify setup.py for distro compatibility
+
+---
+ setup.py | 98 +-------------------------------------------------------
+ 1 file changed, 1 insertion(+), 97 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 663792c..3ebcabe 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,113 +1,19 @@
+ #!/usr/bin/env python
+ 
+ import os
+-import subprocess
+-import tarfile
+-import shutil
+-import sysconfig
+ 
+-import requests
+ from setuptools import setup
+-from setuptools.command.build_ext import build_ext
+ from setuptools.extension import Extension
+ 
+ 
+-def urlretrieve(source_url, destination_path):
+-    response = requests.get(source_url, stream=True)
+-    if response.status_code != 200:
+-        raise Exception("status code was: {}".format(response.status_code))
+-
+-    with open(destination_path, "wb") as fileobj:
+-        for chunk in response.iter_content(chunk_size=128):
+-            fileobj.write(chunk)
+-
+-def path_in_dir(relative_path):
+-    return os.path.abspath(os.path.join(os.path.dirname(__file__), relative_path))
+-
+-def dependency_path(relative_path):
+-    return os.path.join(path_in_dir("_deps"), relative_path)
+-
+ def read(fname):
+     return open(os.path.join(os.path.dirname(__file__), fname)).read()
+ 
+ 
+-jq_lib_tarball_path = dependency_path("jq-lib-1.6.tar.gz")
+-jq_lib_dir = dependency_path("jq-1.6")
+-
+-oniguruma_version = "6.9.4"
+-oniguruma_lib_tarball_path = dependency_path("onig-{}.tar.gz".format(oniguruma_version))
+-oniguruma_lib_build_dir = dependency_path("onig-{}".format(oniguruma_version))
+-oniguruma_lib_install_dir = dependency_path("onig-install-{}".format(oniguruma_version))
+-
+-class jq_build_ext(build_ext):
+-    def run(self):
+-        if not os.path.exists(dependency_path(".")):
+-            os.makedirs(dependency_path("."))
+-        self._build_oniguruma()
+-        self._build_libjq()
+-        build_ext.run(self)
+-
+-    def _build_oniguruma(self):
+-        self._build_lib(
+-            source_url="https://github.com/kkos/oniguruma/releases/download/v{0}/onig-{0}.tar.gz".format(oniguruma_version),
+-            tarball_path=oniguruma_lib_tarball_path,
+-            lib_dir=oniguruma_lib_build_dir,
+-            commands=[
+-                ["./configure", "CFLAGS=-fPIC", "--prefix=" + oniguruma_lib_install_dir],
+-                ["make"],
+-                ["make", "install"],
+-            ])
+-
+-
+-    def _build_libjq(self):
+-        self._build_lib(
+-            source_url="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz",
+-            tarball_path=jq_lib_tarball_path,
+-            lib_dir=jq_lib_dir,
+-            commands=[
+-                ["./configure", "CFLAGS=-fPIC -pthread", "--disable-maintainer-mode", "--with-oniguruma=" + oniguruma_lib_install_dir],
+-                ["make"],
+-            ])
+-
+-    def _build_lib(self, source_url, tarball_path, lib_dir, commands):
+-        self._download_tarball(
+-            source_url=source_url,
+-            tarball_path=tarball_path,
+-            lib_dir=lib_dir,
+-        )
+-
+-        macosx_deployment_target = sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET")
+-        if macosx_deployment_target:
+-            os.environ['MACOSX_DEPLOYMENT_TARGET'] = str(macosx_deployment_target)
+-
+-        def run_command(args):
+-            print("Executing: %s" % ' '.join(args))
+-            subprocess.check_call(args, cwd=lib_dir)
+-
+-        for command in commands:
+-            run_command(command)
+-
+-    def _download_tarball(self, source_url, tarball_path, lib_dir):
+-        if os.path.exists(tarball_path):
+-            os.unlink(tarball_path)
+-        print("Downloading {}".format(source_url))
+-        urlretrieve(source_url, tarball_path)
+-        print("Downloaded {}".format(source_url))
+-
+-        if os.path.exists(lib_dir):
+-            shutil.rmtree(lib_dir)
+-        tarfile.open(tarball_path, "r:gz").extractall(dependency_path("."))
+-
+-
+ jq_extension = Extension(
+     "jq",
+     sources=["jq.c"],
+-    include_dirs=[os.path.join(jq_lib_dir, "src")],
+-    extra_link_args=["-lm"],
+-    extra_objects=[
+-        os.path.join(jq_lib_dir, ".libs/libjq.a"),
+-        os.path.join(oniguruma_lib_install_dir, "lib/libonig.a"),
+-    ],
++    libraries=["jq"]
+ )
+ 
+ setup(
+@@ -120,7 +26,6 @@ setup(
+     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
+     license='BSD 2-Clause',
+     ext_modules = [jq_extension],
+-    cmdclass={"build_ext": jq_build_ext},
+     classifiers=[
+         'Development Status :: 5 - Production/Stable',
+         'Intended Audience :: Developers',
+@@ -137,4 +42,3 @@ setup(
+         'Programming Language :: Python :: 3.9',
+     ],
+ )
+-
+-- 
+2.29.3
diff --git a/srcpkgs/python3-jq/template b/srcpkgs/python3-jq/template
new file mode 100644
index 000000000000..ed9548b45a5f
--- /dev/null
+++ b/srcpkgs/python3-jq/template
@@ -0,0 +1,22 @@
+# Template file for 'python3-jq'
+pkgname=python3-jq
+version=1.2.2
+revision=1
+wrksrc="${pkgname#*-}.py-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-devel jq-devel"
+short_desc="Python bindings for jq"
+maintainer="RunningDroid <runningdroid@zoho.com>"
+license="BSD-2-Clause"
+homepage="https://pypi.org/project/jq/"
+distfiles="https://github.com/mwilliamson/jq.py/archive/${version}.tar.gz"
+checksum=0b926078855b6daee6e8ae5366ebf11c06911195abae643a7cdd37fce087fa0e
+
+pre_build() {
+	cython jq.pyx
+}
+
+post_install() {
+	vlicense LICENSE
+}

From 83462ad00eea4c014d85d9105ff20b62aeb41111 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 13 Feb 2022 23:09:28 -0500
Subject: [PATCH 2/2] urlwatch: update to 2.24.

---
 srcpkgs/urlwatch/patches/test_handler.patch | 14 ++++++++++++++
 srcpkgs/urlwatch/template                   | 10 +++++-----
 2 files changed, 19 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/urlwatch/patches/test_handler.patch

diff --git a/srcpkgs/urlwatch/patches/test_handler.patch b/srcpkgs/urlwatch/patches/test_handler.patch
new file mode 100644
index 000000000000..73f301e49f9f
--- /dev/null
+++ b/srcpkgs/urlwatch/patches/test_handler.patch
@@ -0,0 +1,14 @@
+Work around https://github.com/thp/urlwatch/issues/677
+
+diff --git a/lib/urlwatch/tests/test_handler.py b/lib/urlwatch/tests/test_handler.py
+index 736536a..fac9449 100644
+--- a/lib/urlwatch/tests/test_handler.py
++++ b/lib/urlwatch/tests/test_handler.py
+@@ -89,6 +89,7 @@ def test_pep8_conformance():
+ 
+ class ConfigForTest(CommandConfig):
+     def __init__(self, config, urls, cache, hooks, verbose):
++        sys.argv = sys.argv[:1]
+         (prefix, bindir) = os.path.split(os.path.dirname(os.path.abspath(sys.argv[0])))
+         super().__init__('urlwatch', os.path.dirname(__file__), bindir, prefix, config, urls, hooks, cache, verbose)
+ 
diff --git a/srcpkgs/urlwatch/template b/srcpkgs/urlwatch/template
index a10260a19af1..2e7c1eed51ee 100644
--- a/srcpkgs/urlwatch/template
+++ b/srcpkgs/urlwatch/template
@@ -1,7 +1,7 @@
 # Template file for 'urlwatch'
 pkgname=urlwatch
-version=2.23
-revision=2
+version=2.24
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools"
 depends="python3-appdirs python3-keyring python3-minidb python3-requests
@@ -9,18 +9,18 @@ depends="python3-appdirs python3-keyring python3-minidb python3-requests
 # Check the Docs for optional packages:
 # https://urlwatch.readthedocs.io/en/latest/dependencies.html#optional-packages
 checkdepends="python3-pytest python3-pycodestyle python3-docutils
- python3-Pygments ${depends}"
+ python3-Pygments python3-jq ${depends}"
 short_desc="Tool for monitoring webpages for updates"
 maintainer="RunningDroid <runningdroid@zoho.com>"
 license="BSD-3-Clause"
 homepage="https://thp.io/2008/urlwatch/"
 distfiles="${PYPI_SITE}/u/urlwatch/urlwatch-${version}.tar.gz"
-checksum=73a29efbef80c02bc8c285fca427793979c0e4bef40bc084df5de5436378b842
+checksum=f0b36db4bccd38923b178b66408c0d80d3103b7257f286b78e87d991283b86d7
 
 do_check() {
 	# skip the tests that require python modules that aren't packaged
 	# (pdftotext & pytesseract)
-	pytest -k "not (pdf or ocr or json)" -v
+	pytest -k 'not (pdf or ocr)' -v
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR REVIEW] Update urlwatch & Add python3-jq
  2022-02-14  4:51 [PR PATCH] Update urlwatch & Add python3-jq RunningDroid
@ 2022-02-14  8:16 ` paper42
  2022-02-15  1:56 ` RunningDroid
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paper42 @ 2022-02-14  8:16 UTC (permalink / raw)
  To: ml

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

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/35605#discussion_r805591956

Comment:
`$depends` is missing

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR REVIEW] Update urlwatch & Add python3-jq
  2022-02-14  4:51 [PR PATCH] Update urlwatch & Add python3-jq RunningDroid
  2022-02-14  8:16 ` [PR REVIEW] " paper42
@ 2022-02-15  1:56 ` RunningDroid
  2022-02-15  1:57 ` [PR PATCH] [Updated] " RunningDroid
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: RunningDroid @ 2022-02-15  1:56 UTC (permalink / raw)
  To: ml

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

New review comment by RunningDroid on void-packages repository

https://github.com/void-linux/void-packages/pull/35605#discussion_r806384332

Comment:
While checking the runtime deps I noticed that the library that python3-jq links against is provided by jq-devel, not jq. Should I change jq's template so those files aren't moved into jq-devel?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Updated] Update urlwatch & Add python3-jq
  2022-02-14  4:51 [PR PATCH] Update urlwatch & Add python3-jq RunningDroid
  2022-02-14  8:16 ` [PR REVIEW] " paper42
  2022-02-15  1:56 ` RunningDroid
@ 2022-02-15  1:57 ` RunningDroid
  2022-02-15 23:52 ` [PR REVIEW] " paper42
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: RunningDroid @ 2022-02-15  1:57 UTC (permalink / raw)
  To: ml

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

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

https://github.com/RunningDroid/void-packages update_urlwatch
https://github.com/void-linux/void-packages/pull/35605

Update urlwatch & Add python3-jq
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

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

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

From 027a2c5b022a6d259c2134558faf9985c88ef90e Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 13 Feb 2022 23:08:59 -0500
Subject: [PATCH 1/2] New Package: python3-jq-1.2.2

---
 srcpkgs/python3-jq/patches/jq-py-setup.patch | 143 +++++++++++++++++++
 srcpkgs/python3-jq/template                  |  23 +++
 2 files changed, 166 insertions(+)
 create mode 100644 srcpkgs/python3-jq/patches/jq-py-setup.patch
 create mode 100644 srcpkgs/python3-jq/template

diff --git a/srcpkgs/python3-jq/patches/jq-py-setup.patch b/srcpkgs/python3-jq/patches/jq-py-setup.patch
new file mode 100644
index 000000000000..1eb4f28e7aa9
--- /dev/null
+++ b/srcpkgs/python3-jq/patches/jq-py-setup.patch
@@ -0,0 +1,143 @@
+From bef841b73ba7c9a79211146798ac888fce9bb55a Mon Sep 17 00:00:00 2001
+From: "Robert T. McGibbon" <rmcgibbo@gmail.com>
+Date: Fri, 7 May 2021 19:14:20 -0400
+Subject: [PATCH 1/1] Vastly simplify setup.py for distro compatibility
+
+---
+ setup.py | 98 +-------------------------------------------------------
+ 1 file changed, 1 insertion(+), 97 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 663792c..3ebcabe 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,113 +1,19 @@
+ #!/usr/bin/env python
+ 
+ import os
+-import subprocess
+-import tarfile
+-import shutil
+-import sysconfig
+ 
+-import requests
+ from setuptools import setup
+-from setuptools.command.build_ext import build_ext
+ from setuptools.extension import Extension
+ 
+ 
+-def urlretrieve(source_url, destination_path):
+-    response = requests.get(source_url, stream=True)
+-    if response.status_code != 200:
+-        raise Exception("status code was: {}".format(response.status_code))
+-
+-    with open(destination_path, "wb") as fileobj:
+-        for chunk in response.iter_content(chunk_size=128):
+-            fileobj.write(chunk)
+-
+-def path_in_dir(relative_path):
+-    return os.path.abspath(os.path.join(os.path.dirname(__file__), relative_path))
+-
+-def dependency_path(relative_path):
+-    return os.path.join(path_in_dir("_deps"), relative_path)
+-
+ def read(fname):
+     return open(os.path.join(os.path.dirname(__file__), fname)).read()
+ 
+ 
+-jq_lib_tarball_path = dependency_path("jq-lib-1.6.tar.gz")
+-jq_lib_dir = dependency_path("jq-1.6")
+-
+-oniguruma_version = "6.9.4"
+-oniguruma_lib_tarball_path = dependency_path("onig-{}.tar.gz".format(oniguruma_version))
+-oniguruma_lib_build_dir = dependency_path("onig-{}".format(oniguruma_version))
+-oniguruma_lib_install_dir = dependency_path("onig-install-{}".format(oniguruma_version))
+-
+-class jq_build_ext(build_ext):
+-    def run(self):
+-        if not os.path.exists(dependency_path(".")):
+-            os.makedirs(dependency_path("."))
+-        self._build_oniguruma()
+-        self._build_libjq()
+-        build_ext.run(self)
+-
+-    def _build_oniguruma(self):
+-        self._build_lib(
+-            source_url="https://github.com/kkos/oniguruma/releases/download/v{0}/onig-{0}.tar.gz".format(oniguruma_version),
+-            tarball_path=oniguruma_lib_tarball_path,
+-            lib_dir=oniguruma_lib_build_dir,
+-            commands=[
+-                ["./configure", "CFLAGS=-fPIC", "--prefix=" + oniguruma_lib_install_dir],
+-                ["make"],
+-                ["make", "install"],
+-            ])
+-
+-
+-    def _build_libjq(self):
+-        self._build_lib(
+-            source_url="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz",
+-            tarball_path=jq_lib_tarball_path,
+-            lib_dir=jq_lib_dir,
+-            commands=[
+-                ["./configure", "CFLAGS=-fPIC -pthread", "--disable-maintainer-mode", "--with-oniguruma=" + oniguruma_lib_install_dir],
+-                ["make"],
+-            ])
+-
+-    def _build_lib(self, source_url, tarball_path, lib_dir, commands):
+-        self._download_tarball(
+-            source_url=source_url,
+-            tarball_path=tarball_path,
+-            lib_dir=lib_dir,
+-        )
+-
+-        macosx_deployment_target = sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET")
+-        if macosx_deployment_target:
+-            os.environ['MACOSX_DEPLOYMENT_TARGET'] = str(macosx_deployment_target)
+-
+-        def run_command(args):
+-            print("Executing: %s" % ' '.join(args))
+-            subprocess.check_call(args, cwd=lib_dir)
+-
+-        for command in commands:
+-            run_command(command)
+-
+-    def _download_tarball(self, source_url, tarball_path, lib_dir):
+-        if os.path.exists(tarball_path):
+-            os.unlink(tarball_path)
+-        print("Downloading {}".format(source_url))
+-        urlretrieve(source_url, tarball_path)
+-        print("Downloaded {}".format(source_url))
+-
+-        if os.path.exists(lib_dir):
+-            shutil.rmtree(lib_dir)
+-        tarfile.open(tarball_path, "r:gz").extractall(dependency_path("."))
+-
+-
+ jq_extension = Extension(
+     "jq",
+     sources=["jq.c"],
+-    include_dirs=[os.path.join(jq_lib_dir, "src")],
+-    extra_link_args=["-lm"],
+-    extra_objects=[
+-        os.path.join(jq_lib_dir, ".libs/libjq.a"),
+-        os.path.join(oniguruma_lib_install_dir, "lib/libonig.a"),
+-    ],
++    libraries=["jq"]
+ )
+ 
+ setup(
+@@ -120,7 +26,6 @@ setup(
+     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
+     license='BSD 2-Clause',
+     ext_modules = [jq_extension],
+-    cmdclass={"build_ext": jq_build_ext},
+     classifiers=[
+         'Development Status :: 5 - Production/Stable',
+         'Intended Audience :: Developers',
+@@ -137,4 +42,3 @@ setup(
+         'Programming Language :: Python :: 3.9',
+     ],
+ )
+-
+-- 
+2.29.3
diff --git a/srcpkgs/python3-jq/template b/srcpkgs/python3-jq/template
new file mode 100644
index 000000000000..48e6c8e08729
--- /dev/null
+++ b/srcpkgs/python3-jq/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-jq'
+pkgname=python3-jq
+version=1.2.2
+revision=1
+wrksrc="${pkgname#*-}.py-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-devel jq-devel"
+depends="jq-devel"
+short_desc="Python bindings for jq"
+maintainer="RunningDroid <runningdroid@zoho.com>"
+license="BSD-2-Clause"
+homepage="https://pypi.org/project/jq/"
+distfiles="https://github.com/mwilliamson/jq.py/archive/${version}.tar.gz"
+checksum=0b926078855b6daee6e8ae5366ebf11c06911195abae643a7cdd37fce087fa0e
+
+pre_build() {
+	cython jq.pyx
+}
+
+post_install() {
+	vlicense LICENSE
+}

From 3260071dfbcebb023b5ffa5d3c15998140f58fdc Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 13 Feb 2022 23:09:28 -0500
Subject: [PATCH 2/2] urlwatch: update to 2.24.

---
 srcpkgs/urlwatch/patches/test_handler.patch | 14 ++++++++++++++
 srcpkgs/urlwatch/template                   | 10 +++++-----
 2 files changed, 19 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/urlwatch/patches/test_handler.patch

diff --git a/srcpkgs/urlwatch/patches/test_handler.patch b/srcpkgs/urlwatch/patches/test_handler.patch
new file mode 100644
index 000000000000..73f301e49f9f
--- /dev/null
+++ b/srcpkgs/urlwatch/patches/test_handler.patch
@@ -0,0 +1,14 @@
+Work around https://github.com/thp/urlwatch/issues/677
+
+diff --git a/lib/urlwatch/tests/test_handler.py b/lib/urlwatch/tests/test_handler.py
+index 736536a..fac9449 100644
+--- a/lib/urlwatch/tests/test_handler.py
++++ b/lib/urlwatch/tests/test_handler.py
+@@ -89,6 +89,7 @@ def test_pep8_conformance():
+ 
+ class ConfigForTest(CommandConfig):
+     def __init__(self, config, urls, cache, hooks, verbose):
++        sys.argv = sys.argv[:1]
+         (prefix, bindir) = os.path.split(os.path.dirname(os.path.abspath(sys.argv[0])))
+         super().__init__('urlwatch', os.path.dirname(__file__), bindir, prefix, config, urls, hooks, cache, verbose)
+ 
diff --git a/srcpkgs/urlwatch/template b/srcpkgs/urlwatch/template
index a10260a19af1..2e7c1eed51ee 100644
--- a/srcpkgs/urlwatch/template
+++ b/srcpkgs/urlwatch/template
@@ -1,7 +1,7 @@
 # Template file for 'urlwatch'
 pkgname=urlwatch
-version=2.23
-revision=2
+version=2.24
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools"
 depends="python3-appdirs python3-keyring python3-minidb python3-requests
@@ -9,18 +9,18 @@ depends="python3-appdirs python3-keyring python3-minidb python3-requests
 # Check the Docs for optional packages:
 # https://urlwatch.readthedocs.io/en/latest/dependencies.html#optional-packages
 checkdepends="python3-pytest python3-pycodestyle python3-docutils
- python3-Pygments ${depends}"
+ python3-Pygments python3-jq ${depends}"
 short_desc="Tool for monitoring webpages for updates"
 maintainer="RunningDroid <runningdroid@zoho.com>"
 license="BSD-3-Clause"
 homepage="https://thp.io/2008/urlwatch/"
 distfiles="${PYPI_SITE}/u/urlwatch/urlwatch-${version}.tar.gz"
-checksum=73a29efbef80c02bc8c285fca427793979c0e4bef40bc084df5de5436378b842
+checksum=f0b36db4bccd38923b178b66408c0d80d3103b7257f286b78e87d991283b86d7
 
 do_check() {
 	# skip the tests that require python modules that aren't packaged
 	# (pdftotext & pytesseract)
-	pytest -k "not (pdf or ocr or json)" -v
+	pytest -k 'not (pdf or ocr)' -v
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR REVIEW] Update urlwatch & Add python3-jq
  2022-02-14  4:51 [PR PATCH] Update urlwatch & Add python3-jq RunningDroid
                   ` (2 preceding siblings ...)
  2022-02-15  1:57 ` [PR PATCH] [Updated] " RunningDroid
@ 2022-02-15 23:52 ` paper42
  2022-02-18  2:55 ` [PR PATCH] [Updated] " RunningDroid
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paper42 @ 2022-02-15 23:52 UTC (permalink / raw)
  To: ml

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

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/35605#discussion_r807415694

Comment:
I meant that python3 is missing from $depends, but that's a good catch. cc @leahneukirchen 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Updated] Update urlwatch & Add python3-jq
  2022-02-14  4:51 [PR PATCH] Update urlwatch & Add python3-jq RunningDroid
                   ` (3 preceding siblings ...)
  2022-02-15 23:52 ` [PR REVIEW] " paper42
@ 2022-02-18  2:55 ` RunningDroid
  2022-03-27  5:30 ` RunningDroid
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: RunningDroid @ 2022-02-18  2:55 UTC (permalink / raw)
  To: ml

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

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

https://github.com/RunningDroid/void-packages update_urlwatch
https://github.com/void-linux/void-packages/pull/35605

Update urlwatch & Add python3-jq
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

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

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

From 288dd73996adc146e46686ff748f1f6a01871816 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 13 Feb 2022 23:08:59 -0500
Subject: [PATCH 1/2] New Package: python3-jq-1.2.2

---
 srcpkgs/python3-jq/patches/jq-py-setup.patch | 143 +++++++++++++++++++
 srcpkgs/python3-jq/template                  |  23 +++
 2 files changed, 166 insertions(+)
 create mode 100644 srcpkgs/python3-jq/patches/jq-py-setup.patch
 create mode 100644 srcpkgs/python3-jq/template

diff --git a/srcpkgs/python3-jq/patches/jq-py-setup.patch b/srcpkgs/python3-jq/patches/jq-py-setup.patch
new file mode 100644
index 000000000000..1eb4f28e7aa9
--- /dev/null
+++ b/srcpkgs/python3-jq/patches/jq-py-setup.patch
@@ -0,0 +1,143 @@
+From bef841b73ba7c9a79211146798ac888fce9bb55a Mon Sep 17 00:00:00 2001
+From: "Robert T. McGibbon" <rmcgibbo@gmail.com>
+Date: Fri, 7 May 2021 19:14:20 -0400
+Subject: [PATCH 1/1] Vastly simplify setup.py for distro compatibility
+
+---
+ setup.py | 98 +-------------------------------------------------------
+ 1 file changed, 1 insertion(+), 97 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 663792c..3ebcabe 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,113 +1,19 @@
+ #!/usr/bin/env python
+ 
+ import os
+-import subprocess
+-import tarfile
+-import shutil
+-import sysconfig
+ 
+-import requests
+ from setuptools import setup
+-from setuptools.command.build_ext import build_ext
+ from setuptools.extension import Extension
+ 
+ 
+-def urlretrieve(source_url, destination_path):
+-    response = requests.get(source_url, stream=True)
+-    if response.status_code != 200:
+-        raise Exception("status code was: {}".format(response.status_code))
+-
+-    with open(destination_path, "wb") as fileobj:
+-        for chunk in response.iter_content(chunk_size=128):
+-            fileobj.write(chunk)
+-
+-def path_in_dir(relative_path):
+-    return os.path.abspath(os.path.join(os.path.dirname(__file__), relative_path))
+-
+-def dependency_path(relative_path):
+-    return os.path.join(path_in_dir("_deps"), relative_path)
+-
+ def read(fname):
+     return open(os.path.join(os.path.dirname(__file__), fname)).read()
+ 
+ 
+-jq_lib_tarball_path = dependency_path("jq-lib-1.6.tar.gz")
+-jq_lib_dir = dependency_path("jq-1.6")
+-
+-oniguruma_version = "6.9.4"
+-oniguruma_lib_tarball_path = dependency_path("onig-{}.tar.gz".format(oniguruma_version))
+-oniguruma_lib_build_dir = dependency_path("onig-{}".format(oniguruma_version))
+-oniguruma_lib_install_dir = dependency_path("onig-install-{}".format(oniguruma_version))
+-
+-class jq_build_ext(build_ext):
+-    def run(self):
+-        if not os.path.exists(dependency_path(".")):
+-            os.makedirs(dependency_path("."))
+-        self._build_oniguruma()
+-        self._build_libjq()
+-        build_ext.run(self)
+-
+-    def _build_oniguruma(self):
+-        self._build_lib(
+-            source_url="https://github.com/kkos/oniguruma/releases/download/v{0}/onig-{0}.tar.gz".format(oniguruma_version),
+-            tarball_path=oniguruma_lib_tarball_path,
+-            lib_dir=oniguruma_lib_build_dir,
+-            commands=[
+-                ["./configure", "CFLAGS=-fPIC", "--prefix=" + oniguruma_lib_install_dir],
+-                ["make"],
+-                ["make", "install"],
+-            ])
+-
+-
+-    def _build_libjq(self):
+-        self._build_lib(
+-            source_url="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz",
+-            tarball_path=jq_lib_tarball_path,
+-            lib_dir=jq_lib_dir,
+-            commands=[
+-                ["./configure", "CFLAGS=-fPIC -pthread", "--disable-maintainer-mode", "--with-oniguruma=" + oniguruma_lib_install_dir],
+-                ["make"],
+-            ])
+-
+-    def _build_lib(self, source_url, tarball_path, lib_dir, commands):
+-        self._download_tarball(
+-            source_url=source_url,
+-            tarball_path=tarball_path,
+-            lib_dir=lib_dir,
+-        )
+-
+-        macosx_deployment_target = sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET")
+-        if macosx_deployment_target:
+-            os.environ['MACOSX_DEPLOYMENT_TARGET'] = str(macosx_deployment_target)
+-
+-        def run_command(args):
+-            print("Executing: %s" % ' '.join(args))
+-            subprocess.check_call(args, cwd=lib_dir)
+-
+-        for command in commands:
+-            run_command(command)
+-
+-    def _download_tarball(self, source_url, tarball_path, lib_dir):
+-        if os.path.exists(tarball_path):
+-            os.unlink(tarball_path)
+-        print("Downloading {}".format(source_url))
+-        urlretrieve(source_url, tarball_path)
+-        print("Downloaded {}".format(source_url))
+-
+-        if os.path.exists(lib_dir):
+-            shutil.rmtree(lib_dir)
+-        tarfile.open(tarball_path, "r:gz").extractall(dependency_path("."))
+-
+-
+ jq_extension = Extension(
+     "jq",
+     sources=["jq.c"],
+-    include_dirs=[os.path.join(jq_lib_dir, "src")],
+-    extra_link_args=["-lm"],
+-    extra_objects=[
+-        os.path.join(jq_lib_dir, ".libs/libjq.a"),
+-        os.path.join(oniguruma_lib_install_dir, "lib/libonig.a"),
+-    ],
++    libraries=["jq"]
+ )
+ 
+ setup(
+@@ -120,7 +26,6 @@ setup(
+     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
+     license='BSD 2-Clause',
+     ext_modules = [jq_extension],
+-    cmdclass={"build_ext": jq_build_ext},
+     classifiers=[
+         'Development Status :: 5 - Production/Stable',
+         'Intended Audience :: Developers',
+@@ -137,4 +42,3 @@ setup(
+         'Programming Language :: Python :: 3.9',
+     ],
+ )
+-
+-- 
+2.29.3
diff --git a/srcpkgs/python3-jq/template b/srcpkgs/python3-jq/template
new file mode 100644
index 000000000000..fa8c8638a562
--- /dev/null
+++ b/srcpkgs/python3-jq/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-jq'
+pkgname=python3-jq
+version=1.2.2
+revision=1
+wrksrc="${pkgname#*-}.py-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-devel jq-devel"
+depends="python3 jq"
+short_desc="Python bindings for jq"
+maintainer="RunningDroid <runningdroid@zoho.com>"
+license="BSD-2-Clause"
+homepage="https://pypi.org/project/jq/"
+distfiles="https://github.com/mwilliamson/jq.py/archive/${version}.tar.gz"
+checksum=0b926078855b6daee6e8ae5366ebf11c06911195abae643a7cdd37fce087fa0e
+
+pre_build() {
+	cython jq.pyx
+}
+
+post_install() {
+	vlicense LICENSE
+}

From aef55b0c733a98926077db2d060ce9766dd5394c Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 13 Feb 2022 23:09:28 -0500
Subject: [PATCH 2/2] urlwatch: update to 2.24.

---
 srcpkgs/urlwatch/patches/test_handler.patch | 14 ++++++++++++++
 srcpkgs/urlwatch/template                   | 10 +++++-----
 2 files changed, 19 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/urlwatch/patches/test_handler.patch

diff --git a/srcpkgs/urlwatch/patches/test_handler.patch b/srcpkgs/urlwatch/patches/test_handler.patch
new file mode 100644
index 000000000000..73f301e49f9f
--- /dev/null
+++ b/srcpkgs/urlwatch/patches/test_handler.patch
@@ -0,0 +1,14 @@
+Work around https://github.com/thp/urlwatch/issues/677
+
+diff --git a/lib/urlwatch/tests/test_handler.py b/lib/urlwatch/tests/test_handler.py
+index 736536a..fac9449 100644
+--- a/lib/urlwatch/tests/test_handler.py
++++ b/lib/urlwatch/tests/test_handler.py
+@@ -89,6 +89,7 @@ def test_pep8_conformance():
+ 
+ class ConfigForTest(CommandConfig):
+     def __init__(self, config, urls, cache, hooks, verbose):
++        sys.argv = sys.argv[:1]
+         (prefix, bindir) = os.path.split(os.path.dirname(os.path.abspath(sys.argv[0])))
+         super().__init__('urlwatch', os.path.dirname(__file__), bindir, prefix, config, urls, hooks, cache, verbose)
+ 
diff --git a/srcpkgs/urlwatch/template b/srcpkgs/urlwatch/template
index a10260a19af1..2e7c1eed51ee 100644
--- a/srcpkgs/urlwatch/template
+++ b/srcpkgs/urlwatch/template
@@ -1,7 +1,7 @@
 # Template file for 'urlwatch'
 pkgname=urlwatch
-version=2.23
-revision=2
+version=2.24
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools"
 depends="python3-appdirs python3-keyring python3-minidb python3-requests
@@ -9,18 +9,18 @@ depends="python3-appdirs python3-keyring python3-minidb python3-requests
 # Check the Docs for optional packages:
 # https://urlwatch.readthedocs.io/en/latest/dependencies.html#optional-packages
 checkdepends="python3-pytest python3-pycodestyle python3-docutils
- python3-Pygments ${depends}"
+ python3-Pygments python3-jq ${depends}"
 short_desc="Tool for monitoring webpages for updates"
 maintainer="RunningDroid <runningdroid@zoho.com>"
 license="BSD-3-Clause"
 homepage="https://thp.io/2008/urlwatch/"
 distfiles="${PYPI_SITE}/u/urlwatch/urlwatch-${version}.tar.gz"
-checksum=73a29efbef80c02bc8c285fca427793979c0e4bef40bc084df5de5436378b842
+checksum=f0b36db4bccd38923b178b66408c0d80d3103b7257f286b78e87d991283b86d7
 
 do_check() {
 	# skip the tests that require python modules that aren't packaged
 	# (pdftotext & pytesseract)
-	pytest -k "not (pdf or ocr or json)" -v
+	pytest -k 'not (pdf or ocr)' -v
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Updated] Update urlwatch & Add python3-jq
  2022-02-14  4:51 [PR PATCH] Update urlwatch & Add python3-jq RunningDroid
                   ` (4 preceding siblings ...)
  2022-02-18  2:55 ` [PR PATCH] [Updated] " RunningDroid
@ 2022-03-27  5:30 ` RunningDroid
  2022-03-27  5:41 ` RunningDroid
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: RunningDroid @ 2022-03-27  5:30 UTC (permalink / raw)
  To: ml

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

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

https://github.com/RunningDroid/void-packages update_urlwatch
https://github.com/void-linux/void-packages/pull/35605

Update urlwatch & Add python3-jq
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

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

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

From 6f9cd09045cb75094a4d4ce335470cff02ac6429 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 13 Feb 2022 23:08:59 -0500
Subject: [PATCH 1/3] New Package: python3-jq-1.2.2

---
 srcpkgs/python3-jq/patches/jq-py-setup.patch | 143 +++++++++++++++++++
 srcpkgs/python3-jq/template                  |  23 +++
 2 files changed, 166 insertions(+)
 create mode 100644 srcpkgs/python3-jq/patches/jq-py-setup.patch
 create mode 100644 srcpkgs/python3-jq/template

diff --git a/srcpkgs/python3-jq/patches/jq-py-setup.patch b/srcpkgs/python3-jq/patches/jq-py-setup.patch
new file mode 100644
index 000000000000..1eb4f28e7aa9
--- /dev/null
+++ b/srcpkgs/python3-jq/patches/jq-py-setup.patch
@@ -0,0 +1,143 @@
+From bef841b73ba7c9a79211146798ac888fce9bb55a Mon Sep 17 00:00:00 2001
+From: "Robert T. McGibbon" <rmcgibbo@gmail.com>
+Date: Fri, 7 May 2021 19:14:20 -0400
+Subject: [PATCH 1/1] Vastly simplify setup.py for distro compatibility
+
+---
+ setup.py | 98 +-------------------------------------------------------
+ 1 file changed, 1 insertion(+), 97 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 663792c..3ebcabe 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,113 +1,19 @@
+ #!/usr/bin/env python
+ 
+ import os
+-import subprocess
+-import tarfile
+-import shutil
+-import sysconfig
+ 
+-import requests
+ from setuptools import setup
+-from setuptools.command.build_ext import build_ext
+ from setuptools.extension import Extension
+ 
+ 
+-def urlretrieve(source_url, destination_path):
+-    response = requests.get(source_url, stream=True)
+-    if response.status_code != 200:
+-        raise Exception("status code was: {}".format(response.status_code))
+-
+-    with open(destination_path, "wb") as fileobj:
+-        for chunk in response.iter_content(chunk_size=128):
+-            fileobj.write(chunk)
+-
+-def path_in_dir(relative_path):
+-    return os.path.abspath(os.path.join(os.path.dirname(__file__), relative_path))
+-
+-def dependency_path(relative_path):
+-    return os.path.join(path_in_dir("_deps"), relative_path)
+-
+ def read(fname):
+     return open(os.path.join(os.path.dirname(__file__), fname)).read()
+ 
+ 
+-jq_lib_tarball_path = dependency_path("jq-lib-1.6.tar.gz")
+-jq_lib_dir = dependency_path("jq-1.6")
+-
+-oniguruma_version = "6.9.4"
+-oniguruma_lib_tarball_path = dependency_path("onig-{}.tar.gz".format(oniguruma_version))
+-oniguruma_lib_build_dir = dependency_path("onig-{}".format(oniguruma_version))
+-oniguruma_lib_install_dir = dependency_path("onig-install-{}".format(oniguruma_version))
+-
+-class jq_build_ext(build_ext):
+-    def run(self):
+-        if not os.path.exists(dependency_path(".")):
+-            os.makedirs(dependency_path("."))
+-        self._build_oniguruma()
+-        self._build_libjq()
+-        build_ext.run(self)
+-
+-    def _build_oniguruma(self):
+-        self._build_lib(
+-            source_url="https://github.com/kkos/oniguruma/releases/download/v{0}/onig-{0}.tar.gz".format(oniguruma_version),
+-            tarball_path=oniguruma_lib_tarball_path,
+-            lib_dir=oniguruma_lib_build_dir,
+-            commands=[
+-                ["./configure", "CFLAGS=-fPIC", "--prefix=" + oniguruma_lib_install_dir],
+-                ["make"],
+-                ["make", "install"],
+-            ])
+-
+-
+-    def _build_libjq(self):
+-        self._build_lib(
+-            source_url="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz",
+-            tarball_path=jq_lib_tarball_path,
+-            lib_dir=jq_lib_dir,
+-            commands=[
+-                ["./configure", "CFLAGS=-fPIC -pthread", "--disable-maintainer-mode", "--with-oniguruma=" + oniguruma_lib_install_dir],
+-                ["make"],
+-            ])
+-
+-    def _build_lib(self, source_url, tarball_path, lib_dir, commands):
+-        self._download_tarball(
+-            source_url=source_url,
+-            tarball_path=tarball_path,
+-            lib_dir=lib_dir,
+-        )
+-
+-        macosx_deployment_target = sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET")
+-        if macosx_deployment_target:
+-            os.environ['MACOSX_DEPLOYMENT_TARGET'] = str(macosx_deployment_target)
+-
+-        def run_command(args):
+-            print("Executing: %s" % ' '.join(args))
+-            subprocess.check_call(args, cwd=lib_dir)
+-
+-        for command in commands:
+-            run_command(command)
+-
+-    def _download_tarball(self, source_url, tarball_path, lib_dir):
+-        if os.path.exists(tarball_path):
+-            os.unlink(tarball_path)
+-        print("Downloading {}".format(source_url))
+-        urlretrieve(source_url, tarball_path)
+-        print("Downloaded {}".format(source_url))
+-
+-        if os.path.exists(lib_dir):
+-            shutil.rmtree(lib_dir)
+-        tarfile.open(tarball_path, "r:gz").extractall(dependency_path("."))
+-
+-
+ jq_extension = Extension(
+     "jq",
+     sources=["jq.c"],
+-    include_dirs=[os.path.join(jq_lib_dir, "src")],
+-    extra_link_args=["-lm"],
+-    extra_objects=[
+-        os.path.join(jq_lib_dir, ".libs/libjq.a"),
+-        os.path.join(oniguruma_lib_install_dir, "lib/libonig.a"),
+-    ],
++    libraries=["jq"]
+ )
+ 
+ setup(
+@@ -120,7 +26,6 @@ setup(
+     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
+     license='BSD 2-Clause',
+     ext_modules = [jq_extension],
+-    cmdclass={"build_ext": jq_build_ext},
+     classifiers=[
+         'Development Status :: 5 - Production/Stable',
+         'Intended Audience :: Developers',
+@@ -137,4 +42,3 @@ setup(
+         'Programming Language :: Python :: 3.9',
+     ],
+ )
+-
+-- 
+2.29.3
diff --git a/srcpkgs/python3-jq/template b/srcpkgs/python3-jq/template
new file mode 100644
index 000000000000..fa8c8638a562
--- /dev/null
+++ b/srcpkgs/python3-jq/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-jq'
+pkgname=python3-jq
+version=1.2.2
+revision=1
+wrksrc="${pkgname#*-}.py-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-devel jq-devel"
+depends="python3 jq"
+short_desc="Python bindings for jq"
+maintainer="RunningDroid <runningdroid@zoho.com>"
+license="BSD-2-Clause"
+homepage="https://pypi.org/project/jq/"
+distfiles="https://github.com/mwilliamson/jq.py/archive/${version}.tar.gz"
+checksum=0b926078855b6daee6e8ae5366ebf11c06911195abae643a7cdd37fce087fa0e
+
+pre_build() {
+	cython jq.pyx
+}
+
+post_install() {
+	vlicense LICENSE
+}

From 125fecf7449ce67778a9b7e15be4d5321b89d76d Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 27 Mar 2022 00:46:22 -0400
Subject: [PATCH 2/3] python3-minidb: update to 2.0.6.

---
 srcpkgs/python3-minidb/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/python3-minidb/template b/srcpkgs/python3-minidb/template
index 7c63ae3ef621..eb84fcd7cc04 100644
--- a/srcpkgs/python3-minidb/template
+++ b/srcpkgs/python3-minidb/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-minidb'
 pkgname=python3-minidb
-version=2.0.2
-revision=5
+version=2.0.6
+revision=1
 wrksrc="minidb-${version}"
 build_style=python3-module
 pycompile_module="minidb.py"
@@ -12,7 +12,7 @@ maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
 license="ISC"
 homepage="https://thp.io/2010/minidb/"
 distfiles="https://github.com/thp/minidb/archive/${version}.tar.gz"
-checksum=40a1992281dbfb63a90616db328c1babc3aabadd8844fdd676369e8df09d3b9f
+checksum=7e4ef07d858d6e6118dfd000031e7698fb29b44bd8fe38e713d241fcaec6ee1e
 
 post_install() {
 	sed -n '/# Copyright/,/OF THIS SOFTWARE./p' minidb.py > COPYING

From 775fb5c8a9208b26aa8fbdfe3f2c3d12c809d6f5 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 13 Feb 2022 23:09:28 -0500
Subject: [PATCH 3/3] urlwatch: update to 2.25.

---
 srcpkgs/urlwatch/patches/test_handler.patch | 14 ++++++++++++++
 srcpkgs/urlwatch/template                   | 10 +++++-----
 2 files changed, 19 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/urlwatch/patches/test_handler.patch

diff --git a/srcpkgs/urlwatch/patches/test_handler.patch b/srcpkgs/urlwatch/patches/test_handler.patch
new file mode 100644
index 000000000000..73f301e49f9f
--- /dev/null
+++ b/srcpkgs/urlwatch/patches/test_handler.patch
@@ -0,0 +1,14 @@
+Work around https://github.com/thp/urlwatch/issues/677
+
+diff --git a/lib/urlwatch/tests/test_handler.py b/lib/urlwatch/tests/test_handler.py
+index 736536a..fac9449 100644
+--- a/lib/urlwatch/tests/test_handler.py
++++ b/lib/urlwatch/tests/test_handler.py
+@@ -89,6 +89,7 @@ def test_pep8_conformance():
+ 
+ class ConfigForTest(CommandConfig):
+     def __init__(self, config, urls, cache, hooks, verbose):
++        sys.argv = sys.argv[:1]
+         (prefix, bindir) = os.path.split(os.path.dirname(os.path.abspath(sys.argv[0])))
+         super().__init__('urlwatch', os.path.dirname(__file__), bindir, prefix, config, urls, hooks, cache, verbose)
+ 
diff --git a/srcpkgs/urlwatch/template b/srcpkgs/urlwatch/template
index a10260a19af1..0d15244c6acb 100644
--- a/srcpkgs/urlwatch/template
+++ b/srcpkgs/urlwatch/template
@@ -1,7 +1,7 @@
 # Template file for 'urlwatch'
 pkgname=urlwatch
-version=2.23
-revision=2
+version=2.25
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools"
 depends="python3-appdirs python3-keyring python3-minidb python3-requests
@@ -9,18 +9,18 @@ depends="python3-appdirs python3-keyring python3-minidb python3-requests
 # Check the Docs for optional packages:
 # https://urlwatch.readthedocs.io/en/latest/dependencies.html#optional-packages
 checkdepends="python3-pytest python3-pycodestyle python3-docutils
- python3-Pygments ${depends}"
+ python3-Pygments python3-jq ${depends}"
 short_desc="Tool for monitoring webpages for updates"
 maintainer="RunningDroid <runningdroid@zoho.com>"
 license="BSD-3-Clause"
 homepage="https://thp.io/2008/urlwatch/"
 distfiles="${PYPI_SITE}/u/urlwatch/urlwatch-${version}.tar.gz"
-checksum=73a29efbef80c02bc8c285fca427793979c0e4bef40bc084df5de5436378b842
+checksum=6802297d3318286e7f3d36b9a4567a2fb09b0ae779d4b76811dd29a7281c1f8a
 
 do_check() {
 	# skip the tests that require python modules that aren't packaged
 	# (pdftotext & pytesseract)
-	pytest -k "not (pdf or ocr or json)" -v
+	pytest -k 'not (pdf or ocr)' -v
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Updated] Update urlwatch & Add python3-jq
  2022-02-14  4:51 [PR PATCH] Update urlwatch & Add python3-jq RunningDroid
                   ` (5 preceding siblings ...)
  2022-03-27  5:30 ` RunningDroid
@ 2022-03-27  5:41 ` RunningDroid
  2022-03-27  5:47 ` RunningDroid
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: RunningDroid @ 2022-03-27  5:41 UTC (permalink / raw)
  To: ml

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

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

https://github.com/RunningDroid/void-packages update_urlwatch
https://github.com/void-linux/void-packages/pull/35605

Update urlwatch & Add python3-jq
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

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

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

From 6f9cd09045cb75094a4d4ce335470cff02ac6429 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 13 Feb 2022 23:08:59 -0500
Subject: [PATCH 1/3] New Package: python3-jq-1.2.2

---
 srcpkgs/python3-jq/patches/jq-py-setup.patch | 143 +++++++++++++++++++
 srcpkgs/python3-jq/template                  |  23 +++
 2 files changed, 166 insertions(+)
 create mode 100644 srcpkgs/python3-jq/patches/jq-py-setup.patch
 create mode 100644 srcpkgs/python3-jq/template

diff --git a/srcpkgs/python3-jq/patches/jq-py-setup.patch b/srcpkgs/python3-jq/patches/jq-py-setup.patch
new file mode 100644
index 000000000000..1eb4f28e7aa9
--- /dev/null
+++ b/srcpkgs/python3-jq/patches/jq-py-setup.patch
@@ -0,0 +1,143 @@
+From bef841b73ba7c9a79211146798ac888fce9bb55a Mon Sep 17 00:00:00 2001
+From: "Robert T. McGibbon" <rmcgibbo@gmail.com>
+Date: Fri, 7 May 2021 19:14:20 -0400
+Subject: [PATCH 1/1] Vastly simplify setup.py for distro compatibility
+
+---
+ setup.py | 98 +-------------------------------------------------------
+ 1 file changed, 1 insertion(+), 97 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 663792c..3ebcabe 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,113 +1,19 @@
+ #!/usr/bin/env python
+ 
+ import os
+-import subprocess
+-import tarfile
+-import shutil
+-import sysconfig
+ 
+-import requests
+ from setuptools import setup
+-from setuptools.command.build_ext import build_ext
+ from setuptools.extension import Extension
+ 
+ 
+-def urlretrieve(source_url, destination_path):
+-    response = requests.get(source_url, stream=True)
+-    if response.status_code != 200:
+-        raise Exception("status code was: {}".format(response.status_code))
+-
+-    with open(destination_path, "wb") as fileobj:
+-        for chunk in response.iter_content(chunk_size=128):
+-            fileobj.write(chunk)
+-
+-def path_in_dir(relative_path):
+-    return os.path.abspath(os.path.join(os.path.dirname(__file__), relative_path))
+-
+-def dependency_path(relative_path):
+-    return os.path.join(path_in_dir("_deps"), relative_path)
+-
+ def read(fname):
+     return open(os.path.join(os.path.dirname(__file__), fname)).read()
+ 
+ 
+-jq_lib_tarball_path = dependency_path("jq-lib-1.6.tar.gz")
+-jq_lib_dir = dependency_path("jq-1.6")
+-
+-oniguruma_version = "6.9.4"
+-oniguruma_lib_tarball_path = dependency_path("onig-{}.tar.gz".format(oniguruma_version))
+-oniguruma_lib_build_dir = dependency_path("onig-{}".format(oniguruma_version))
+-oniguruma_lib_install_dir = dependency_path("onig-install-{}".format(oniguruma_version))
+-
+-class jq_build_ext(build_ext):
+-    def run(self):
+-        if not os.path.exists(dependency_path(".")):
+-            os.makedirs(dependency_path("."))
+-        self._build_oniguruma()
+-        self._build_libjq()
+-        build_ext.run(self)
+-
+-    def _build_oniguruma(self):
+-        self._build_lib(
+-            source_url="https://github.com/kkos/oniguruma/releases/download/v{0}/onig-{0}.tar.gz".format(oniguruma_version),
+-            tarball_path=oniguruma_lib_tarball_path,
+-            lib_dir=oniguruma_lib_build_dir,
+-            commands=[
+-                ["./configure", "CFLAGS=-fPIC", "--prefix=" + oniguruma_lib_install_dir],
+-                ["make"],
+-                ["make", "install"],
+-            ])
+-
+-
+-    def _build_libjq(self):
+-        self._build_lib(
+-            source_url="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz",
+-            tarball_path=jq_lib_tarball_path,
+-            lib_dir=jq_lib_dir,
+-            commands=[
+-                ["./configure", "CFLAGS=-fPIC -pthread", "--disable-maintainer-mode", "--with-oniguruma=" + oniguruma_lib_install_dir],
+-                ["make"],
+-            ])
+-
+-    def _build_lib(self, source_url, tarball_path, lib_dir, commands):
+-        self._download_tarball(
+-            source_url=source_url,
+-            tarball_path=tarball_path,
+-            lib_dir=lib_dir,
+-        )
+-
+-        macosx_deployment_target = sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET")
+-        if macosx_deployment_target:
+-            os.environ['MACOSX_DEPLOYMENT_TARGET'] = str(macosx_deployment_target)
+-
+-        def run_command(args):
+-            print("Executing: %s" % ' '.join(args))
+-            subprocess.check_call(args, cwd=lib_dir)
+-
+-        for command in commands:
+-            run_command(command)
+-
+-    def _download_tarball(self, source_url, tarball_path, lib_dir):
+-        if os.path.exists(tarball_path):
+-            os.unlink(tarball_path)
+-        print("Downloading {}".format(source_url))
+-        urlretrieve(source_url, tarball_path)
+-        print("Downloaded {}".format(source_url))
+-
+-        if os.path.exists(lib_dir):
+-            shutil.rmtree(lib_dir)
+-        tarfile.open(tarball_path, "r:gz").extractall(dependency_path("."))
+-
+-
+ jq_extension = Extension(
+     "jq",
+     sources=["jq.c"],
+-    include_dirs=[os.path.join(jq_lib_dir, "src")],
+-    extra_link_args=["-lm"],
+-    extra_objects=[
+-        os.path.join(jq_lib_dir, ".libs/libjq.a"),
+-        os.path.join(oniguruma_lib_install_dir, "lib/libonig.a"),
+-    ],
++    libraries=["jq"]
+ )
+ 
+ setup(
+@@ -120,7 +26,6 @@ setup(
+     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
+     license='BSD 2-Clause',
+     ext_modules = [jq_extension],
+-    cmdclass={"build_ext": jq_build_ext},
+     classifiers=[
+         'Development Status :: 5 - Production/Stable',
+         'Intended Audience :: Developers',
+@@ -137,4 +42,3 @@ setup(
+         'Programming Language :: Python :: 3.9',
+     ],
+ )
+-
+-- 
+2.29.3
diff --git a/srcpkgs/python3-jq/template b/srcpkgs/python3-jq/template
new file mode 100644
index 000000000000..fa8c8638a562
--- /dev/null
+++ b/srcpkgs/python3-jq/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-jq'
+pkgname=python3-jq
+version=1.2.2
+revision=1
+wrksrc="${pkgname#*-}.py-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-devel jq-devel"
+depends="python3 jq"
+short_desc="Python bindings for jq"
+maintainer="RunningDroid <runningdroid@zoho.com>"
+license="BSD-2-Clause"
+homepage="https://pypi.org/project/jq/"
+distfiles="https://github.com/mwilliamson/jq.py/archive/${version}.tar.gz"
+checksum=0b926078855b6daee6e8ae5366ebf11c06911195abae643a7cdd37fce087fa0e
+
+pre_build() {
+	cython jq.pyx
+}
+
+post_install() {
+	vlicense LICENSE
+}

From 0b1acd40eff4d526fe9b562e1706a78dff63d9f1 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 27 Mar 2022 00:46:22 -0400
Subject: [PATCH 2/3] python3-minidb: update to 2.0.6.

And remove pycompile_module so xlint passes
---
 srcpkgs/python3-minidb/template | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/python3-minidb/template b/srcpkgs/python3-minidb/template
index 7c63ae3ef621..f901265dbc39 100644
--- a/srcpkgs/python3-minidb/template
+++ b/srcpkgs/python3-minidb/template
@@ -1,10 +1,9 @@
 # Template file for 'python3-minidb'
 pkgname=python3-minidb
-version=2.0.2
-revision=5
+version=2.0.6
+revision=1
 wrksrc="minidb-${version}"
 build_style=python3-module
-pycompile_module="minidb.py"
 hostmakedepends="python3-setuptools"
 depends="python3"
 short_desc="Simple SQLite3 store for Python objects"
@@ -12,7 +11,7 @@ maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
 license="ISC"
 homepage="https://thp.io/2010/minidb/"
 distfiles="https://github.com/thp/minidb/archive/${version}.tar.gz"
-checksum=40a1992281dbfb63a90616db328c1babc3aabadd8844fdd676369e8df09d3b9f
+checksum=7e4ef07d858d6e6118dfd000031e7698fb29b44bd8fe38e713d241fcaec6ee1e
 
 post_install() {
 	sed -n '/# Copyright/,/OF THIS SOFTWARE./p' minidb.py > COPYING

From 5a56d15d80c8079ff80dd386ff5e71aef9ea7f0e Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 13 Feb 2022 23:09:28 -0500
Subject: [PATCH 3/3] urlwatch: update to 2.25.

---
 srcpkgs/urlwatch/patches/test_handler.patch | 14 ++++++++++++++
 srcpkgs/urlwatch/template                   | 10 +++++-----
 2 files changed, 19 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/urlwatch/patches/test_handler.patch

diff --git a/srcpkgs/urlwatch/patches/test_handler.patch b/srcpkgs/urlwatch/patches/test_handler.patch
new file mode 100644
index 000000000000..73f301e49f9f
--- /dev/null
+++ b/srcpkgs/urlwatch/patches/test_handler.patch
@@ -0,0 +1,14 @@
+Work around https://github.com/thp/urlwatch/issues/677
+
+diff --git a/lib/urlwatch/tests/test_handler.py b/lib/urlwatch/tests/test_handler.py
+index 736536a..fac9449 100644
+--- a/lib/urlwatch/tests/test_handler.py
++++ b/lib/urlwatch/tests/test_handler.py
+@@ -89,6 +89,7 @@ def test_pep8_conformance():
+ 
+ class ConfigForTest(CommandConfig):
+     def __init__(self, config, urls, cache, hooks, verbose):
++        sys.argv = sys.argv[:1]
+         (prefix, bindir) = os.path.split(os.path.dirname(os.path.abspath(sys.argv[0])))
+         super().__init__('urlwatch', os.path.dirname(__file__), bindir, prefix, config, urls, hooks, cache, verbose)
+ 
diff --git a/srcpkgs/urlwatch/template b/srcpkgs/urlwatch/template
index a10260a19af1..0d15244c6acb 100644
--- a/srcpkgs/urlwatch/template
+++ b/srcpkgs/urlwatch/template
@@ -1,7 +1,7 @@
 # Template file for 'urlwatch'
 pkgname=urlwatch
-version=2.23
-revision=2
+version=2.25
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools"
 depends="python3-appdirs python3-keyring python3-minidb python3-requests
@@ -9,18 +9,18 @@ depends="python3-appdirs python3-keyring python3-minidb python3-requests
 # Check the Docs for optional packages:
 # https://urlwatch.readthedocs.io/en/latest/dependencies.html#optional-packages
 checkdepends="python3-pytest python3-pycodestyle python3-docutils
- python3-Pygments ${depends}"
+ python3-Pygments python3-jq ${depends}"
 short_desc="Tool for monitoring webpages for updates"
 maintainer="RunningDroid <runningdroid@zoho.com>"
 license="BSD-3-Clause"
 homepage="https://thp.io/2008/urlwatch/"
 distfiles="${PYPI_SITE}/u/urlwatch/urlwatch-${version}.tar.gz"
-checksum=73a29efbef80c02bc8c285fca427793979c0e4bef40bc084df5de5436378b842
+checksum=6802297d3318286e7f3d36b9a4567a2fb09b0ae779d4b76811dd29a7281c1f8a
 
 do_check() {
 	# skip the tests that require python modules that aren't packaged
 	# (pdftotext & pytesseract)
-	pytest -k "not (pdf or ocr or json)" -v
+	pytest -k 'not (pdf or ocr)' -v
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Updated] Update urlwatch & Add python3-jq
  2022-02-14  4:51 [PR PATCH] Update urlwatch & Add python3-jq RunningDroid
                   ` (6 preceding siblings ...)
  2022-03-27  5:41 ` RunningDroid
@ 2022-03-27  5:47 ` RunningDroid
  2022-03-27 22:48 ` RunningDroid
  2022-04-02 17:35 ` [PR PATCH] [Merged]: " leahneukirchen
  9 siblings, 0 replies; 11+ messages in thread
From: RunningDroid @ 2022-03-27  5:47 UTC (permalink / raw)
  To: ml

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

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

https://github.com/RunningDroid/void-packages update_urlwatch
https://github.com/void-linux/void-packages/pull/35605

Update urlwatch & Add python3-jq
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

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

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

From 88ea4dd46a4e22332b958aa7215bf1b1e2401235 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 13 Feb 2022 23:08:59 -0500
Subject: [PATCH 1/3] New Package: python3-jq-1.2.2

---
 srcpkgs/python3-jq/patches/jq-py-setup.patch | 143 +++++++++++++++++++
 srcpkgs/python3-jq/template                  |  23 +++
 2 files changed, 166 insertions(+)
 create mode 100644 srcpkgs/python3-jq/patches/jq-py-setup.patch
 create mode 100644 srcpkgs/python3-jq/template

diff --git a/srcpkgs/python3-jq/patches/jq-py-setup.patch b/srcpkgs/python3-jq/patches/jq-py-setup.patch
new file mode 100644
index 000000000000..1eb4f28e7aa9
--- /dev/null
+++ b/srcpkgs/python3-jq/patches/jq-py-setup.patch
@@ -0,0 +1,143 @@
+From bef841b73ba7c9a79211146798ac888fce9bb55a Mon Sep 17 00:00:00 2001
+From: "Robert T. McGibbon" <rmcgibbo@gmail.com>
+Date: Fri, 7 May 2021 19:14:20 -0400
+Subject: [PATCH 1/1] Vastly simplify setup.py for distro compatibility
+
+---
+ setup.py | 98 +-------------------------------------------------------
+ 1 file changed, 1 insertion(+), 97 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 663792c..3ebcabe 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,113 +1,19 @@
+ #!/usr/bin/env python
+ 
+ import os
+-import subprocess
+-import tarfile
+-import shutil
+-import sysconfig
+ 
+-import requests
+ from setuptools import setup
+-from setuptools.command.build_ext import build_ext
+ from setuptools.extension import Extension
+ 
+ 
+-def urlretrieve(source_url, destination_path):
+-    response = requests.get(source_url, stream=True)
+-    if response.status_code != 200:
+-        raise Exception("status code was: {}".format(response.status_code))
+-
+-    with open(destination_path, "wb") as fileobj:
+-        for chunk in response.iter_content(chunk_size=128):
+-            fileobj.write(chunk)
+-
+-def path_in_dir(relative_path):
+-    return os.path.abspath(os.path.join(os.path.dirname(__file__), relative_path))
+-
+-def dependency_path(relative_path):
+-    return os.path.join(path_in_dir("_deps"), relative_path)
+-
+ def read(fname):
+     return open(os.path.join(os.path.dirname(__file__), fname)).read()
+ 
+ 
+-jq_lib_tarball_path = dependency_path("jq-lib-1.6.tar.gz")
+-jq_lib_dir = dependency_path("jq-1.6")
+-
+-oniguruma_version = "6.9.4"
+-oniguruma_lib_tarball_path = dependency_path("onig-{}.tar.gz".format(oniguruma_version))
+-oniguruma_lib_build_dir = dependency_path("onig-{}".format(oniguruma_version))
+-oniguruma_lib_install_dir = dependency_path("onig-install-{}".format(oniguruma_version))
+-
+-class jq_build_ext(build_ext):
+-    def run(self):
+-        if not os.path.exists(dependency_path(".")):
+-            os.makedirs(dependency_path("."))
+-        self._build_oniguruma()
+-        self._build_libjq()
+-        build_ext.run(self)
+-
+-    def _build_oniguruma(self):
+-        self._build_lib(
+-            source_url="https://github.com/kkos/oniguruma/releases/download/v{0}/onig-{0}.tar.gz".format(oniguruma_version),
+-            tarball_path=oniguruma_lib_tarball_path,
+-            lib_dir=oniguruma_lib_build_dir,
+-            commands=[
+-                ["./configure", "CFLAGS=-fPIC", "--prefix=" + oniguruma_lib_install_dir],
+-                ["make"],
+-                ["make", "install"],
+-            ])
+-
+-
+-    def _build_libjq(self):
+-        self._build_lib(
+-            source_url="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz",
+-            tarball_path=jq_lib_tarball_path,
+-            lib_dir=jq_lib_dir,
+-            commands=[
+-                ["./configure", "CFLAGS=-fPIC -pthread", "--disable-maintainer-mode", "--with-oniguruma=" + oniguruma_lib_install_dir],
+-                ["make"],
+-            ])
+-
+-    def _build_lib(self, source_url, tarball_path, lib_dir, commands):
+-        self._download_tarball(
+-            source_url=source_url,
+-            tarball_path=tarball_path,
+-            lib_dir=lib_dir,
+-        )
+-
+-        macosx_deployment_target = sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET")
+-        if macosx_deployment_target:
+-            os.environ['MACOSX_DEPLOYMENT_TARGET'] = str(macosx_deployment_target)
+-
+-        def run_command(args):
+-            print("Executing: %s" % ' '.join(args))
+-            subprocess.check_call(args, cwd=lib_dir)
+-
+-        for command in commands:
+-            run_command(command)
+-
+-    def _download_tarball(self, source_url, tarball_path, lib_dir):
+-        if os.path.exists(tarball_path):
+-            os.unlink(tarball_path)
+-        print("Downloading {}".format(source_url))
+-        urlretrieve(source_url, tarball_path)
+-        print("Downloaded {}".format(source_url))
+-
+-        if os.path.exists(lib_dir):
+-            shutil.rmtree(lib_dir)
+-        tarfile.open(tarball_path, "r:gz").extractall(dependency_path("."))
+-
+-
+ jq_extension = Extension(
+     "jq",
+     sources=["jq.c"],
+-    include_dirs=[os.path.join(jq_lib_dir, "src")],
+-    extra_link_args=["-lm"],
+-    extra_objects=[
+-        os.path.join(jq_lib_dir, ".libs/libjq.a"),
+-        os.path.join(oniguruma_lib_install_dir, "lib/libonig.a"),
+-    ],
++    libraries=["jq"]
+ )
+ 
+ setup(
+@@ -120,7 +26,6 @@ setup(
+     python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
+     license='BSD 2-Clause',
+     ext_modules = [jq_extension],
+-    cmdclass={"build_ext": jq_build_ext},
+     classifiers=[
+         'Development Status :: 5 - Production/Stable',
+         'Intended Audience :: Developers',
+@@ -137,4 +42,3 @@ setup(
+         'Programming Language :: Python :: 3.9',
+     ],
+ )
+-
+-- 
+2.29.3
diff --git a/srcpkgs/python3-jq/template b/srcpkgs/python3-jq/template
new file mode 100644
index 000000000000..52702247c217
--- /dev/null
+++ b/srcpkgs/python3-jq/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-jq'
+pkgname=python3-jq
+version=1.2.2
+revision=1
+wrksrc="${pkgname#*-}.py-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-devel jq-devel"
+depends="python3"
+short_desc="Python bindings for jq"
+maintainer="RunningDroid <runningdroid@zoho.com>"
+license="BSD-2-Clause"
+homepage="https://pypi.org/project/jq/"
+distfiles="https://github.com/mwilliamson/jq.py/archive/${version}.tar.gz"
+checksum=0b926078855b6daee6e8ae5366ebf11c06911195abae643a7cdd37fce087fa0e
+
+pre_build() {
+	cython jq.pyx
+}
+
+post_install() {
+	vlicense LICENSE
+}

From 919622f191eb1fee862b8da9be6fd328e4c06a74 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 27 Mar 2022 00:46:22 -0400
Subject: [PATCH 2/3] python3-minidb: update to 2.0.6.

And remove pycompile_module so xlint passes
---
 srcpkgs/python3-minidb/template | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/python3-minidb/template b/srcpkgs/python3-minidb/template
index 7c63ae3ef621..f901265dbc39 100644
--- a/srcpkgs/python3-minidb/template
+++ b/srcpkgs/python3-minidb/template
@@ -1,10 +1,9 @@
 # Template file for 'python3-minidb'
 pkgname=python3-minidb
-version=2.0.2
-revision=5
+version=2.0.6
+revision=1
 wrksrc="minidb-${version}"
 build_style=python3-module
-pycompile_module="minidb.py"
 hostmakedepends="python3-setuptools"
 depends="python3"
 short_desc="Simple SQLite3 store for Python objects"
@@ -12,7 +11,7 @@ maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
 license="ISC"
 homepage="https://thp.io/2010/minidb/"
 distfiles="https://github.com/thp/minidb/archive/${version}.tar.gz"
-checksum=40a1992281dbfb63a90616db328c1babc3aabadd8844fdd676369e8df09d3b9f
+checksum=7e4ef07d858d6e6118dfd000031e7698fb29b44bd8fe38e713d241fcaec6ee1e
 
 post_install() {
 	sed -n '/# Copyright/,/OF THIS SOFTWARE./p' minidb.py > COPYING

From ce187c63a90823a0baec13543bdbb1b88ceb1860 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Sun, 13 Feb 2022 23:09:28 -0500
Subject: [PATCH 3/3] urlwatch: update to 2.25.

---
 srcpkgs/urlwatch/patches/test_handler.patch | 14 ++++++++++++++
 srcpkgs/urlwatch/template                   | 10 +++++-----
 2 files changed, 19 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/urlwatch/patches/test_handler.patch

diff --git a/srcpkgs/urlwatch/patches/test_handler.patch b/srcpkgs/urlwatch/patches/test_handler.patch
new file mode 100644
index 000000000000..73f301e49f9f
--- /dev/null
+++ b/srcpkgs/urlwatch/patches/test_handler.patch
@@ -0,0 +1,14 @@
+Work around https://github.com/thp/urlwatch/issues/677
+
+diff --git a/lib/urlwatch/tests/test_handler.py b/lib/urlwatch/tests/test_handler.py
+index 736536a..fac9449 100644
+--- a/lib/urlwatch/tests/test_handler.py
++++ b/lib/urlwatch/tests/test_handler.py
+@@ -89,6 +89,7 @@ def test_pep8_conformance():
+ 
+ class ConfigForTest(CommandConfig):
+     def __init__(self, config, urls, cache, hooks, verbose):
++        sys.argv = sys.argv[:1]
+         (prefix, bindir) = os.path.split(os.path.dirname(os.path.abspath(sys.argv[0])))
+         super().__init__('urlwatch', os.path.dirname(__file__), bindir, prefix, config, urls, hooks, cache, verbose)
+ 
diff --git a/srcpkgs/urlwatch/template b/srcpkgs/urlwatch/template
index a10260a19af1..0d15244c6acb 100644
--- a/srcpkgs/urlwatch/template
+++ b/srcpkgs/urlwatch/template
@@ -1,7 +1,7 @@
 # Template file for 'urlwatch'
 pkgname=urlwatch
-version=2.23
-revision=2
+version=2.25
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools"
 depends="python3-appdirs python3-keyring python3-minidb python3-requests
@@ -9,18 +9,18 @@ depends="python3-appdirs python3-keyring python3-minidb python3-requests
 # Check the Docs for optional packages:
 # https://urlwatch.readthedocs.io/en/latest/dependencies.html#optional-packages
 checkdepends="python3-pytest python3-pycodestyle python3-docutils
- python3-Pygments ${depends}"
+ python3-Pygments python3-jq ${depends}"
 short_desc="Tool for monitoring webpages for updates"
 maintainer="RunningDroid <runningdroid@zoho.com>"
 license="BSD-3-Clause"
 homepage="https://thp.io/2008/urlwatch/"
 distfiles="${PYPI_SITE}/u/urlwatch/urlwatch-${version}.tar.gz"
-checksum=73a29efbef80c02bc8c285fca427793979c0e4bef40bc084df5de5436378b842
+checksum=6802297d3318286e7f3d36b9a4567a2fb09b0ae779d4b76811dd29a7281c1f8a
 
 do_check() {
 	# skip the tests that require python modules that aren't packaged
 	# (pdftotext & pytesseract)
-	pytest -k "not (pdf or ocr or json)" -v
+	pytest -k 'not (pdf or ocr)' -v
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Update urlwatch & Add python3-jq
  2022-02-14  4:51 [PR PATCH] Update urlwatch & Add python3-jq RunningDroid
                   ` (7 preceding siblings ...)
  2022-03-27  5:47 ` RunningDroid
@ 2022-03-27 22:48 ` RunningDroid
  2022-04-02 17:35 ` [PR PATCH] [Merged]: " leahneukirchen
  9 siblings, 0 replies; 11+ messages in thread
From: RunningDroid @ 2022-03-27 22:48 UTC (permalink / raw)
  To: ml

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

New comment by RunningDroid on void-packages repository

https://github.com/void-linux/void-packages/pull/35605#issuecomment-1080035495

Comment:
Some tests in urlwatch-2.25 were changed to assume a more recent version of python3-minidb, so I added that to this PR.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PR PATCH] [Merged]: Update urlwatch & Add python3-jq
  2022-02-14  4:51 [PR PATCH] Update urlwatch & Add python3-jq RunningDroid
                   ` (8 preceding siblings ...)
  2022-03-27 22:48 ` RunningDroid
@ 2022-04-02 17:35 ` leahneukirchen
  9 siblings, 0 replies; 11+ messages in thread
From: leahneukirchen @ 2022-04-02 17:35 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

Update urlwatch & Add python3-jq
https://github.com/void-linux/void-packages/pull/35605

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-04-02 17:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14  4:51 [PR PATCH] Update urlwatch & Add python3-jq RunningDroid
2022-02-14  8:16 ` [PR REVIEW] " paper42
2022-02-15  1:56 ` RunningDroid
2022-02-15  1:57 ` [PR PATCH] [Updated] " RunningDroid
2022-02-15 23:52 ` [PR REVIEW] " paper42
2022-02-18  2:55 ` [PR PATCH] [Updated] " RunningDroid
2022-03-27  5:30 ` RunningDroid
2022-03-27  5:41 ` RunningDroid
2022-03-27  5:47 ` RunningDroid
2022-03-27 22:48 ` RunningDroid
2022-04-02 17:35 ` [PR PATCH] [Merged]: " leahneukirchen

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).