[arch-commits] Commit in python-spsdk/repos/community-any (8 files)

David Runge dvzrv at gemini.archlinux.org
Mon Aug 1 22:52:14 UTC 2022


    Date: Monday, August 1, 2022 @ 22:52:14
  Author: dvzrv
Revision: 1259714

archrelease: copy trunk to community-any

Added:
  python-spsdk/repos/community-any/PKGBUILD
    (from rev 1259713, python-spsdk/trunk/PKGBUILD)
  python-spsdk/repos/community-any/python-spsdk-1.6.0-remove_pypemicro.patch
    (from rev 1259713, python-spsdk/trunk/python-spsdk-1.6.0-remove_pypemicro.patch)
  python-spsdk/repos/community-any/python-spsdk-1.7.0-cryptography.patch
    (from rev 1259713, python-spsdk/trunk/python-spsdk-1.7.0-cryptography.patch)
  python-spsdk/repos/community-any/python-spsdk-1.7.0-pyyaml.patch
    (from rev 1259713, python-spsdk/trunk/python-spsdk-1.7.0-pyyaml.patch)
Deleted:
  python-spsdk/repos/community-any/PKGBUILD
  python-spsdk/repos/community-any/python-spsdk-1.6.0-remove_pypemicro.patch
  python-spsdk/repos/community-any/python-spsdk-1.6.3-click8.1.patch
  python-spsdk/repos/community-any/python-spsdk-1.6.3-cryptography37.patch

-------------------------------------------+
 PKGBUILD                                  |  205 ++++++++++++++--------------
 python-spsdk-1.6.0-remove_pypemicro.patch |   56 +++----
 python-spsdk-1.6.3-click8.1.patch         |   21 --
 python-spsdk-1.6.3-cryptography37.patch   |   12 -
 python-spsdk-1.7.0-cryptography.patch     |   11 +
 python-spsdk-1.7.0-pyyaml.patch           |   19 ++
 6 files changed, 161 insertions(+), 163 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-08-01 22:52:01 UTC (rev 1259713)
+++ PKGBUILD	2022-08-01 22:52:14 UTC (rev 1259714)
@@ -1,102 +0,0 @@
-# Maintainer: David Runge <dvzrv at archlinux.org>
-
-_name=spsdk
-pkgname=python-spsdk
-pkgver=1.6.3
-pkgrel=3
-pkgdesc="NXP Secure Provisioning SDK"
-arch=(any)
-url="https://github.com/NXPmicro/spsdk"
-license=(BSD)
-depends=(
-  python-asn1crypto
-  python-astunparse
-  python-bincopy
-  python-bitstring
-  python-click
-  python-click-option-group
-  python-cmsis-pack-manager
-  python-colorama
-  python-commentjson
-  python-crcmod
-  python-cryptography
-  python-deepmerge
-  python-fastjsonschema
-  python-hexdump
-  python-jinja
-  python-libusbsio
-  python-oscrypto
-  python-pycryptodome
-  python-pylink-square
-  python-pyocd
-  python-pyserial
-  python-ruamel-yaml
-  python-sly
-)
-makedepends=(python-build python-installer python-setuptools python-wheel)
-checkdepends=(
-  python-jsonschema
-  python-pytest
-  python-voluptuous
-  python-pyyaml
-)
-# pypi sdist tarball has no tests: https://github.com/NXPmicro/spsdk/issues/37
-# source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
-source=(
-  $_name-$pkgver.tar.gz::https://github.com/NXPmicro/$_name/archive/refs/tags/$pkgver.tar.gz
-  $pkgname-1.6.0-remove_pypemicro.patch
-  $pkgname-1.6.3-click8.1.patch
-  $pkgname-1.6.3-cryptography37.patch
-)
-sha512sums=('fe7b8ae82756b93ef90467617d9b3492c4d103bfcae2efbd6067208b1ea82c5e7cf599e5d56f1c25ff8850d61acf4068b04541df8763068562ff3f3438749ac3'
-            '7bfb3739053284ba0b4084c1f84e37e307233fa7b52adf403fa5c574393d71e08ea02bdc927106b036d1055f6efd6c326b534d697c1d5f6c097def53dbafc560'
-            'bbeadf90867fc26bf2bb7cb5adc41fc7acfd7a577cf989525ca084da9863baebbb46aec17c57b1e5dd767d50d0e341cdf4552b820cb12122e6c5de250f48c538'
-            'cbeb5d9b2dd9dd6af833a5eb20a0429296c699e22ac0fdc98c80fc80aca1d14e956424220c2223e721544a35d3010815b3ca227d571767be729f4c7a0a268300')
-b2sums=('cbd58524ea291cfab21ad26c639e43058bd3e3db90ee70873919bf3a84b90e44eeb2d1fe72cd019dbb225a1fcd1118f5500ef462dc7284bc9df4e4f4995ff641'
-        '2c68116494b5e7ff51e59ec79dd3e354e2a8035ab35e29b27a097d7baa47e48c71a2cdac651920c76cd29097c5e8710e74106e41a4b3d5f543e259ef7404beac'
-        '4fda1af3ad7b1aec6b9c50ae27dacbc16e3bb57ef0f4a8d9fe0f820acf5212deb174c793805fbf45f70d6d3492650eb9bc2ecd3b9699e3aec2775e8989f25ec5'
-        'a0f0e4f1400c717eed900bbd63be0d12fa76e832e33cf4347621c31b3ef8c7288d1d19c6ab3f4289f7ca8d69bc947fc7becbad4ba16d28d0102e88d1a4dab4af')
-
-prepare() {
-  cd $_name-$pkgver
-  # remove all version pinning and overly explicit version bounds
-  # https://github.com/NXPmicro/spsdk/issues/35
-  sed -e 's|>=.*||g;s|==.*||g;s|~=.*||g;s|<.*||g' -i requirements{,-develop}.txt
-  # remove dependency on python-pypemicro as it vendors prebuilt shared libraries
-  # https://github.com/NXPmicro/spsdk/issues/30
-  # https://github.com/NXPmicro/pypemicro/issues/10
-  sed '/pypemicro/d' -i requirements.txt
-  patch -Np1 -i ../$pkgname-1.6.0-remove_pypemicro.patch
-  # remove dependency on python-pyocd-pemicro as it vendors prebuilt shared libraries via python-pypemicro
-  # https://github.com/pyocd/pyOCD/issues/1319
-  # https://github.com/NXPmicro/spsdk/issues/30
-  # https://github.com/NXPmicro/pypemicro/issues/10
-  sed '/pyocd-pemicro/d' -i requirements.txt
-
-  # click 8.1 removed get_os_args, so replace with sys.argv[1:]
-  # https://github.com/NXPmicro/spsdk/issues/44
-  patch -Np1 -i ../$pkgname-1.6.3-click8.1.patch
-
-  # support python-cryptography >= 37
-  # https://github.com/NXPmicro/spsdk/issues/43
-  patch -Np1 -i ../$pkgname-1.6.3-cryptography37.patch
-}
-
-build() {
-  cd $_name-$pkgver
-  python -m build --wheel --no-isolation
-}
-
-check() {
-  cd $_name-$pkgver
-  export PYTHONPATH="build:$PYTHONPATH"
-  # ignore failing tests due to incompatible bincopy: https://github.com/NXPmicro/spsdk/issues/38
-  pytest -v --ignore tests/elftosb/test_elftosb_mbi.py -k "not test_parse_image_file_invalid and not test_load_binary_image"
-}
-
-package() {
-  cd $_name-$pkgver
-  python -m installer --destdir="$pkgdir" dist/*.whl
-  install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
-  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
-}

Copied: python-spsdk/repos/community-any/PKGBUILD (from rev 1259713, python-spsdk/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-08-01 22:52:14 UTC (rev 1259714)
@@ -0,0 +1,103 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=spsdk
+pkgname=python-spsdk
+pkgver=1.7.0
+pkgrel=1
+pkgdesc="NXP Secure Provisioning SDK"
+arch=(any)
+url="https://github.com/NXPmicro/spsdk"
+license=(BSD)
+depends=(
+  python-asn1crypto
+  python-astunparse
+  python-bincopy
+  python-bitstring
+  python-click
+  python-click-command-tree
+  python-click-option-group
+  python-cmsis-pack-manager
+  python-colorama
+  python-commentjson
+  python-crcmod
+  python-cryptography
+  python-deepmerge
+  python-fastjsonschema
+  python-hexdump
+  python-jinja
+  python-libusbsio
+  python-oscrypto
+  python-pycryptodome
+  python-pylink-square
+  python-pyocd
+  python-pyserial
+  python-ruamel-yaml
+  python-sly
+)
+makedepends=(python-build python-installer python-setuptools python-wheel)
+checkdepends=(
+  python-jsonschema
+  python-pytest
+  python-voluptuous
+  python-pyyaml
+)
+# pypi sdist tarball has no tests: https://github.com/NXPmicro/spsdk/issues/37
+# source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
+source=(
+  $_name-$pkgver.tar.gz::https://github.com/NXPmicro/$_name/archive/refs/tags/$pkgver.tar.gz
+  $pkgname-1.6.0-remove_pypemicro.patch
+  $pkgname-1.7.0-cryptography.patch
+  $pkgname-1.7.0-pyyaml.patch
+)
+sha512sums=('21245a72e4eaa6bd71c71095895d3fae043c911ff0fe6600c430f73e4c4f18fe8bd9ffb6d6d4048d5b0ae3e832c18cc4080359e8a00cc6f6ec68f5b26ebfe6a4'
+            '7bfb3739053284ba0b4084c1f84e37e307233fa7b52adf403fa5c574393d71e08ea02bdc927106b036d1055f6efd6c326b534d697c1d5f6c097def53dbafc560'
+            '2c6d56add47e17342f19b281b206e1b658c651e46d17a64aef007774f093a40e25f81c604e0d9b3a24079f2179ea1f113736cdf44b286a0a01a4ad6b6cab00ce'
+            '7e4d9af4e5f11dfce8dc30294ed9b2f78912869c71b3928903f972525f72df5ffc6ab266f419a845881638dc20af55b76ec995a4790b7dbede4d25154e16aa3c')
+b2sums=('0db5bf8e9d068dcec699585db05fb0a4d8255a132654a70d603bd5c85e10877c0e38a355fb6a705642844abbe3ab5712b625e82ff86061170876214f1df12e4a'
+        '2c68116494b5e7ff51e59ec79dd3e354e2a8035ab35e29b27a097d7baa47e48c71a2cdac651920c76cd29097c5e8710e74106e41a4b3d5f543e259ef7404beac'
+        'a1005b5408d67c8a5105068107c52f5a84f5c36e19a84d04e8456e67d0c4658961f11dedf4e5a5a00b6e91beddac49ebfea9d9f04c527b6b58bf47067224f2bd'
+        'ca7d876a0d71c582908d26bd7e94d4ec793639b8fec64e6af931968d01b48f41b9483584155411bcd3b496672eeab9d1f5e6bad15f959ee75607da56ba0b2ab4')
+
+prepare() {
+  cd $_name-$pkgver
+  # remove all version pinning and overly explicit version bounds
+  # https://github.com/NXPmicro/spsdk/issues/35
+  sed -e 's|>=.*||g;s|==.*||g;s|~=.*||g;s|<.*||g' -i requirements{,-develop}.txt
+  # remove dependency on python-pypemicro as it vendors prebuilt shared libraries
+  # https://github.com/NXPmicro/spsdk/issues/30
+  # https://github.com/NXPmicro/pypemicro/issues/10
+  sed '/pypemicro/d' -i requirements.txt
+  patch -Np1 -i ../$pkgname-1.6.0-remove_pypemicro.patch
+  # remove dependency on python-pyocd-pemicro as it vendors prebuilt shared libraries via python-pypemicro
+  # https://github.com/pyocd/pyOCD/issues/1319
+  # https://github.com/NXPmicro/spsdk/issues/30
+  # https://github.com/NXPmicro/pypemicro/issues/10
+  sed '/pyocd-pemicro/d' -i requirements.txt
+
+  # support python-cryptography >= 37
+  # https://github.com/NXPmicro/spsdk/issues/43
+  patch -Np1 -i ../$pkgname-1.7.0-cryptography.patch
+
+  # fix issue with pyyaml: https://github.com/NXPmicro/spsdk/issues/45
+  patch -Np1 -i ../$pkgname-1.7.0-pyyaml.patch
+}
+
+build() {
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  local _deselected=()
+
+  cd $_name-$pkgver
+  # ignore failing tests due to incompatible bincopy: https://github.com/NXPmicro/spsdk/issues/38
+  pytest -v --ignore tests/elftosb/test_elftosb_mbi.py -k "not test_parse_image_file_invalid and not test_load_binary_image"
+}
+
+package() {
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
+  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+}

Deleted: python-spsdk-1.6.0-remove_pypemicro.patch
===================================================================
--- python-spsdk-1.6.0-remove_pypemicro.patch	2022-08-01 22:52:01 UTC (rev 1259713)
+++ python-spsdk-1.6.0-remove_pypemicro.patch	2022-08-01 22:52:14 UTC (rev 1259714)
@@ -1,28 +0,0 @@
-diff -ruN a/spsdk/debuggers/__init__.py b/spsdk/debuggers/__init__.py
---- a/spsdk/debuggers/__init__.py	2022-02-04 14:27:29.000000000 +0100
-+++ b/spsdk/debuggers/__init__.py	2022-02-14 00:01:52.710415054 +0100
-@@ -9,5 +9,4 @@
- 
- from .debug_probe import DebugProbe
- from .debug_probe_jlink import DebugProbePyLink
--from .debug_probe_pemicro import DebugProbePemicro
- from .debug_probe_pyocd import DebugProbePyOCD
-diff -ruN a/spsdk/debuggers/utils.py b/spsdk/debuggers/utils.py
---- a/spsdk/debuggers/utils.py	2022-02-04 14:27:29.000000000 +0100
-+++ b/spsdk/debuggers/utils.py	2022-02-14 00:05:11.017196467 +0100
-@@ -15,7 +15,6 @@
- from spsdk import SPSDKError
- from spsdk.debuggers.debug_probe import DebugProbe, SPSDKDebugProbeError, SPSDKProbeNotFoundError
- from spsdk.debuggers.debug_probe_jlink import DebugProbePyLink
--from spsdk.debuggers.debug_probe_pemicro import DebugProbePemicro
- 
- # Import all supported debug probe classes
- from spsdk.debuggers.debug_probe_pyocd import DebugProbePyOCD
-@@ -23,7 +22,6 @@
- PROBES = {
-     "pyocd": DebugProbePyOCD,
-     "jlink": DebugProbePyLink,
--    "pemicro": DebugProbePemicro,
- }
- 
- logger = logging.getLogger(__name__)

Copied: python-spsdk/repos/community-any/python-spsdk-1.6.0-remove_pypemicro.patch (from rev 1259713, python-spsdk/trunk/python-spsdk-1.6.0-remove_pypemicro.patch)
===================================================================
--- python-spsdk-1.6.0-remove_pypemicro.patch	                        (rev 0)
+++ python-spsdk-1.6.0-remove_pypemicro.patch	2022-08-01 22:52:14 UTC (rev 1259714)
@@ -0,0 +1,28 @@
+diff -ruN a/spsdk/debuggers/__init__.py b/spsdk/debuggers/__init__.py
+--- a/spsdk/debuggers/__init__.py	2022-02-04 14:27:29.000000000 +0100
++++ b/spsdk/debuggers/__init__.py	2022-02-14 00:01:52.710415054 +0100
+@@ -9,5 +9,4 @@
+ 
+ from .debug_probe import DebugProbe
+ from .debug_probe_jlink import DebugProbePyLink
+-from .debug_probe_pemicro import DebugProbePemicro
+ from .debug_probe_pyocd import DebugProbePyOCD
+diff -ruN a/spsdk/debuggers/utils.py b/spsdk/debuggers/utils.py
+--- a/spsdk/debuggers/utils.py	2022-02-04 14:27:29.000000000 +0100
++++ b/spsdk/debuggers/utils.py	2022-02-14 00:05:11.017196467 +0100
+@@ -15,7 +15,6 @@
+ from spsdk import SPSDKError
+ from spsdk.debuggers.debug_probe import DebugProbe, SPSDKDebugProbeError, SPSDKProbeNotFoundError
+ from spsdk.debuggers.debug_probe_jlink import DebugProbePyLink
+-from spsdk.debuggers.debug_probe_pemicro import DebugProbePemicro
+ 
+ # Import all supported debug probe classes
+ from spsdk.debuggers.debug_probe_pyocd import DebugProbePyOCD
+@@ -23,7 +22,6 @@
+ PROBES = {
+     "pyocd": DebugProbePyOCD,
+     "jlink": DebugProbePyLink,
+-    "pemicro": DebugProbePemicro,
+ }
+ 
+ logger = logging.getLogger(__name__)

Deleted: python-spsdk-1.6.3-click8.1.patch
===================================================================
--- python-spsdk-1.6.3-click8.1.patch	2022-08-01 22:52:01 UTC (rev 1259713)
+++ python-spsdk-1.6.3-click8.1.patch	2022-08-01 22:52:14 UTC (rev 1259714)
@@ -1,21 +0,0 @@
-diff -ruN a/spsdk/apps/blhost.py b/spsdk/apps/blhost.py
---- a/spsdk/apps/blhost.py	2022-04-01 14:14:28.000000000 +0200
-+++ b/spsdk/apps/blhost.py	2022-04-04 20:15:23.171426171 +0200
-@@ -127,7 +127,7 @@
- 
-     # print help for get-property if property tag is 0 or 'list-properties'
-     if ctx.invoked_subcommand == "get-property":
--        args = click.get_os_args()
-+        args = sys.argv[1:]
-         # running this via pytest changes the args to a single arg, in that case skip
-         if len(args) > 1 and "get-property" in args:
-             tag_str = args[args.index("get-property") + 1]
-@@ -136,7 +136,7 @@
-                 ctx.exit(0)
- 
-     # if --help is provided anywhere on commandline, skip interface lookup and display help message
--    if "--help" not in click.get_os_args():
-+    if "--help" not in sys.argv[1:]:
-         ctx.obj = {
-             "interface": get_interface(
-                 module="mboot", port=port, usb=usb, timeout=timeout, lpcusbsio=lpcusbsio

Deleted: python-spsdk-1.6.3-cryptography37.patch
===================================================================
--- python-spsdk-1.6.3-cryptography37.patch	2022-08-01 22:52:01 UTC (rev 1259713)
+++ python-spsdk-1.6.3-cryptography37.patch	2022-08-01 22:52:14 UTC (rev 1259714)
@@ -1,12 +0,0 @@
-diff --git i/spsdk/crypto/__init__.py w/spsdk/crypto/__init__.py
-index f2a7b65..508b0ff 100644
---- i/spsdk/crypto/__init__.py
-+++ w/spsdk/crypto/__init__.py
-@@ -48,7 +48,6 @@ from cryptography.exceptions import InvalidSignature
- # Explicit import due to MYPY issue
- from cryptography.hazmat.backends import *
- from cryptography.hazmat.backends import default_backend
--from cryptography.hazmat.backends.interfaces import *
- from cryptography.hazmat.backends.openssl.rsa import *
- 
- # Explicit import due to MYPY issue

Copied: python-spsdk/repos/community-any/python-spsdk-1.7.0-cryptography.patch (from rev 1259713, python-spsdk/trunk/python-spsdk-1.7.0-cryptography.patch)
===================================================================
--- python-spsdk-1.7.0-cryptography.patch	                        (rev 0)
+++ python-spsdk-1.7.0-cryptography.patch	2022-08-01 22:52:14 UTC (rev 1259714)
@@ -0,0 +1,11 @@
+diff -ruN a/spsdk/crypto/__init__.py b/spsdk/crypto/__init__.py
+--- a/spsdk/crypto/__init__.py	2022-07-29 15:19:47.000000000 +0200
++++ b/spsdk/crypto/__init__.py	2022-07-31 20:31:00.457065560 +0200
+@@ -48,7 +48,6 @@
+ # Explicit import due to MYPY issue
+ from cryptography.hazmat.backends import *
+ from cryptography.hazmat.backends import default_backend
+-from cryptography.hazmat.backends.interfaces import *
+ from cryptography.hazmat.backends.openssl.rsa import *
+ 
+ # Explicit import due to MYPY issue

Copied: python-spsdk/repos/community-any/python-spsdk-1.7.0-pyyaml.patch (from rev 1259713, python-spsdk/trunk/python-spsdk-1.7.0-pyyaml.patch)
===================================================================
--- python-spsdk-1.7.0-pyyaml.patch	                        (rev 0)
+++ python-spsdk-1.7.0-pyyaml.patch	2022-08-01 22:52:14 UTC (rev 1259714)
@@ -0,0 +1,19 @@
+diff -ruN a/tests/nxpcertgen/test_certgen.py b/tests/nxpcertgen/test_certgen.py
+--- a/tests/nxpcertgen/test_certgen.py	2022-07-29 15:19:47.000000000 +0200
++++ b/tests/nxpcertgen/test_certgen.py	2022-07-31 21:09:38.614790577 +0200
+@@ -12,6 +12,7 @@
+ 
+ import pytest
+ import yaml
++from yaml import Loader
+ from click.testing import CliRunner
+ 
+ from spsdk import SPSDKError
+@@ -270,6 +271,6 @@
+         assert result.exit_code == 0
+         assert os.path.isfile(template)
+         with open(template) as f:
+-            data = yaml.load(f)
++            data = yaml.load(f, Loader=Loader)
+         # there should be at least 5 items in the template
+         assert len(data) > 5



More information about the arch-commits mailing list