[arch-commits] Commit in (5 files)

Eli Schwartz eschwartz at archlinux.org
Fri Jan 22 04:19:06 UTC 2021


    Date: Friday, January 22, 2021 @ 04:19:05
  Author: eschwartz
Revision: 824354

addpkg: python-py7zr 0.11.3-1: new dep for calibre

Added:
  python-py7zr/
  python-py7zr/repos/
  python-py7zr/trunk/
  python-py7zr/trunk/0001-setup.cfg-remove-build-time-dependency-on-things-unr.patch
  python-py7zr/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-setup.cfg-remove-build-time-dependency-on-things-unr.patch |   36 +++++++
 PKGBUILD                                                        |   50 ++++++++++
 2 files changed, 86 insertions(+)

Added: python-py7zr/trunk/0001-setup.cfg-remove-build-time-dependency-on-things-unr.patch
===================================================================
--- python-py7zr/trunk/0001-setup.cfg-remove-build-time-dependency-on-things-unr.patch	                        (rev 0)
+++ python-py7zr/trunk/0001-setup.cfg-remove-build-time-dependency-on-things-unr.patch	2021-01-22 04:19:05 UTC (rev 824354)
@@ -0,0 +1,36 @@
+From 60518925be620adfbd523c16521b0a1ca8a1aaad Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz at archlinux.org>
+Date: Tue, 19 Jan 2021 18:59:59 -0500
+Subject: [PATCH] setup.cfg: remove build-time dependency on things unrelated
+ to building
+
+pep517 is a command-line tool used by developers interested in building
+any package, it does not need to be listed as a requirement which
+python -m pep517.build installs into the isolated build environment.
+
+wheel is used optionally by setuptools to run bdist_wheel and is
+required by the pep517 build backend... but this is only needed if
+you're using pyproject.toml's build-system.requires, so this is a
+duplicate line.
+
+[patch regenerated against PyPI tarball with funky added whitespace]
+---
+ setup.cfg | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/setup.cfg b/setup.cfg
+index d8436cc..615630d 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -41,8 +41,6 @@ install_requires =
+ setup_requires = 
+ 	setuptools-scm>=3.5.0
+ 	setuptools>=42.0
+-	wheel
+-	pep517
+ packages = py7zr
+ 
+ [options.entry_points]
+-- 
+2.30.0
+

Added: python-py7zr/trunk/PKGBUILD
===================================================================
--- python-py7zr/trunk/PKGBUILD	                        (rev 0)
+++ python-py7zr/trunk/PKGBUILD	2021-01-22 04:19:05 UTC (rev 824354)
@@ -0,0 +1,50 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+
+_pkgname=py7zr
+pkgname=python-py7zr
+pkgver=0.11.3
+pkgrel=1
+pkgdesc="Pure python 7-zip library"
+arch=('any')
+url="https://github.com/miurahr/${_pkgname}"
+license=('LGPL')
+depends=('python-pycryptodome' 'python-texttable')
+optdepends=('python-zstandard: zstd compression')
+makedepends=('python-setuptools-scm')
+checkdepends=('python-pytest-timeout' 'python-zstandard' 'pyannotate' 'p7zip')
+source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"
+        "0001-setup.cfg-remove-build-time-dependency-on-things-unr.patch")
+sha256sums=('f9e872f02daf9be64ef35a0d69f5467a3ccbd028df0863ee39a2fbab5f80cc52'
+            'eb6e1b95bb2fe56889337bc3fb2ee788bfe7eb7849667bd2c193c7a9a8158908')
+b2sums=('7306fffb1f1422e9a1a6d475fa37217dda8a0e8af2e14ebfeddbfae5a98d117b2e61e6fa4d5e254623c839f48911a9b14b1bd32b294e9ac1a5b7ab18305950fb'
+        'c8043f2631d783c1c4e8797fe12f517b06c1468860a32d2964b7f1e12d76728f3317f3ea76f380fe11a3c2dade52e95e492be107b537430a9ffb24b439f70ccd')
+
+prepare() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    # thou shalt not force coverage reports on innocent unittest users
+    sed -i '/^addopts/d' tox.ini
+
+    # don't download unneeded setup_requires from PyPI
+    # https://github.com/miurahr/py7zr/pull/286
+    patch -p1 -i ../0001-setup.cfg-remove-build-time-dependency-on-things-unr.patch
+}
+
+build(){
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python setup.py build
+}
+
+check() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python -m pytest -rsx \
+        --ignore tests/test_benchmark.py
+}
+
+package() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+}



More information about the arch-commits mailing list