[arch-commits] Commit in python-jq/repos/community-x86_64 (4 files)
Daniel M. Capella
polyzen at gemini.archlinux.org
Wed Sep 7 01:23:19 UTC 2022
Date: Wednesday, September 7, 2022 @ 01:23:19
Author: polyzen
Revision: 1296010
archrelease: copy trunk to community-x86_64
Added:
python-jq/repos/community-x86_64/PKGBUILD
(from rev 1296009, python-jq/trunk/PKGBUILD)
python-jq/repos/community-x86_64/jq-py-setup.patch
(from rev 1296009, python-jq/trunk/jq-py-setup.patch)
Deleted:
python-jq/repos/community-x86_64/PKGBUILD
python-jq/repos/community-x86_64/jq-py-setup.patch
-------------------+
PKGBUILD | 102 +++++++++---------
jq-py-setup.patch | 288 ++++++++++++++++++++++++++--------------------------
2 files changed, 194 insertions(+), 196 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-09-07 01:22:53 UTC (rev 1296009)
+++ PKGBUILD 2022-09-07 01:23:19 UTC (rev 1296010)
@@ -1,52 +0,0 @@
-# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
-# Contributor: Mubashshir <ahmubashshir at gmail.com>
-
-_name=jq.py
-pkgname=python-jq
-pkgver=1.2.1
-pkgrel=2
-pkgdesc='Python bindings for jq'
-arch=('x86_64')
-url=https://github.com/mwilliamson/jq.py
-license=('BSD')
-depends=('jq' 'python')
-makedepends=('cython' 'python-build' 'python-install' 'python-setuptools'
- 'python-wheel')
-checkdepends=('python-pytest')
-source=("$url/archive/$pkgver/$_name-$pkgver.tar.gz"
- 'jq-py-setup.patch')
-b2sums=('8bc2c88ae553dd53137c11d4f599e01398d21811a02b4f33f81aeeafa9009f58a56074c0bcadcc6382d86d2c7ada792d442f9c660787e131d0e85c95fb7cab32'
- '3424a91e0e6330e8d25e167b862554e466f469cdeb5672d4d4e5ff4d4475bfe9c7a575f3c93cd03687e10cc6afac2bb94294c0fef50feec03eaa55684e2907bc')
-
-# Devendor
-prepare() {
- cd $_name-$pkgver
- sed -i '/certifi\|requests/d' pyproject.toml
- patch --forward --strip=1 --input=../jq-py-setup.patch
-}
-
-build() {
- cd $_name-$pkgver
- cython jq.pyx
- python -m build --wheel --skip-dependency-check --no-isolation
-}
-
-check() {
- cd $_name-$pkgver
- python -m venv --system-site-packages test-env
- test-env/bin/python -m install --optimize=1 dist/*.whl
- test-env/bin/python -m pytest
-}
-
-package() {
- cd $_name-$pkgver
- python -m install --optimize=1 --destdir="$pkgdir" dist/*.whl
-
- # Symlink license file
- local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- install -d "$pkgdir"/usr/share/licenses/$pkgname
- ln -s "$site_packages"/jq-$pkgver.dist-info/LICENSE \
- "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
-# vim:set ts=2 sw=2 et:
Copied: python-jq/repos/community-x86_64/PKGBUILD (from rev 1296009, python-jq/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-09-07 01:23:19 UTC (rev 1296010)
@@ -0,0 +1,50 @@
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
+# Contributor: Mubashshir <ahmubashshir at gmail.com>
+
+_name=jq.py
+pkgname=python-jq
+pkgver=1.2.3
+pkgrel=1
+pkgdesc='Python bindings for jq'
+arch=('x86_64')
+url=https://github.com/mwilliamson/jq.py
+license=('BSD')
+depends=('jq' 'python')
+makedepends=('cython' 'python-build' 'python-installer' 'python-setuptools'
+ 'python-wheel')
+checkdepends=('python-pytest')
+source=("$url/archive/$pkgver/$_name-$pkgver.tar.gz"
+ 'jq-py-setup.patch')
+b2sums=('72ebe4137d21bfd06dce337da1c7bcbfaa10ea55d06d128c901daa605557d7f6bd3bc219242127dfd36908089f312a6120306028bccb66e03274194e179175ee'
+ '3424a91e0e6330e8d25e167b862554e466f469cdeb5672d4d4e5ff4d4475bfe9c7a575f3c93cd03687e10cc6afac2bb94294c0fef50feec03eaa55684e2907bc')
+
+# Devendor
+prepare() {
+ cd $_name-$pkgver
+ sed -i '/certifi\|requests/d' pyproject.toml
+ patch --forward --strip=1 --input=../jq-py-setup.patch
+}
+
+build() {
+ cd $_name-$pkgver
+ cython jq.pyx
+ python -m build --wheel --skip-dependency-check --no-isolation
+}
+
+check() {
+ cd $_name-$pkgver
+ python -m venv --system-site-packages test-env
+ test-env/bin/python -m installer dist/*.whl
+ test-env/bin/python -m pytest
+}
+
+package() {
+ cd $_name-$pkgver
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ # Symlink license file
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ install -d "$pkgdir"/usr/share/licenses/$pkgname
+ ln -s "$site_packages"/jq-$pkgver.dist-info/LICENSE \
+ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
Deleted: jq-py-setup.patch
===================================================================
--- jq-py-setup.patch 2022-09-07 01:22:53 UTC (rev 1296009)
+++ jq-py-setup.patch 2022-09-07 01:23:19 UTC (rev 1296010)
@@ -1,144 +0,0 @@
-From bef841b73ba7c9a79211146798ac888fce9bb55a Mon Sep 17 00:00:00 2001
-From: "Robert T. McGibbon" <rmcgibbo at 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
-
Copied: python-jq/repos/community-x86_64/jq-py-setup.patch (from rev 1296009, python-jq/trunk/jq-py-setup.patch)
===================================================================
--- jq-py-setup.patch (rev 0)
+++ jq-py-setup.patch 2022-09-07 01:23:19 UTC (rev 1296010)
@@ -0,0 +1,144 @@
+From bef841b73ba7c9a79211146798ac888fce9bb55a Mon Sep 17 00:00:00 2001
+From: "Robert T. McGibbon" <rmcgibbo at 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
+
More information about the arch-commits
mailing list