forked from pool/python-spsdk
Accepting request 1089345 from home:ojkastl_buildservice:Branch_devel_languages_python
new package python-spsdk, required by pynitrokey OBS-URL: https://build.opensuse.org/request/show/1089345 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-spsdk?expand=0&rev=1
This commit is contained in:
commit
73937e4cdf
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
47
python-spsdk-remove_pypemicro.patch
Normal file
47
python-spsdk-remove_pypemicro.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From 835e24b7cd0b3ba6a62f0abfbb094ad7ee3ab524 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Kastl <kastl@b1-systems.de>
|
||||
Date: Mon, 15 May 2023 13:27:29 +0200
|
||||
Subject: [PATCH] remove pypemicro
|
||||
|
||||
based on
|
||||
https://github.com/archlinux/svntogit-community/blob/19938f5cab9adf93da26c09ebeb8111ed1bdc59b/trunk/python-spsdk-1.6.0-remove_pypemicro.patch
|
||||
|
||||
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
|
||||
---
|
||||
spsdk/debuggers/__init__.py | 1 -
|
||||
spsdk/debuggers/utils.py | 2 --
|
||||
2 files changed, 3 deletions(-)
|
||||
|
||||
diff --git a/spsdk/debuggers/__init__.py b/spsdk/debuggers/__init__.py
|
||||
index adefa19..52afffd 100644
|
||||
--- a/spsdk/debuggers/__init__.py
|
||||
+++ b/spsdk/debuggers/__init__.py
|
||||
@@ -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 --git a/spsdk/debuggers/utils.py b/spsdk/debuggers/utils.py
|
||||
index c6ba667..ba22335 100644
|
||||
--- a/spsdk/debuggers/utils.py
|
||||
+++ b/spsdk/debuggers/utils.py
|
||||
@@ -16,7 +16,6 @@ import prettytable
|
||||
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
|
||||
@@ -24,7 +23,6 @@ from spsdk.debuggers.debug_probe_pyocd import DebugProbePyOCD
|
||||
PROBES: Dict[str, Type[DebugProbe]] = {
|
||||
"pyocd": DebugProbePyOCD,
|
||||
"jlink": DebugProbePyLink,
|
||||
- "pemicro": DebugProbePemicro,
|
||||
}
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
--
|
||||
2.40.1
|
||||
|
13
python-spsdk.changes
Normal file
13
python-spsdk.changes
Normal file
@ -0,0 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 15 11:57:52 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||
|
||||
- add patch python-spsdk-remove_pypemicro.patch to remove
|
||||
dependency on pypemicro, which contains a binary blob and cannot
|
||||
be distributed on OBS as is
|
||||
(see https://github.com/nxp-mcuxpresso/spsdk/issues/30)
|
||||
- remove Requires for pyocd-pemicro
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 12 05:18:05 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||
|
||||
- new package python-spsdk, required by pynitrokey
|
138
python-spsdk.spec
Normal file
138
python-spsdk.spec
Normal file
@ -0,0 +1,138 @@
|
||||
#
|
||||
# spec file for package python-spsdk
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-spsdk
|
||||
Version: 1.10.0
|
||||
Release: 0
|
||||
Summary: Unified, reliable and easy to use SW library working across NXP MCU portfolio
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/nxp-mcuxpresso/spsdk
|
||||
Source: https://files.pythonhosted.org/packages/source/s/spsdk/spsdk-%{version}.tar.gz
|
||||
#
|
||||
# https://github.com/archlinux/svntogit-community/blob/19938f5cab9adf93da26c09ebeb8111ed1bdc59b/trunk/python-spsdk-1.6.0-remove_pypemicro.patch
|
||||
#
|
||||
Patch0: python-spsdk-remove_pypemicro.patch
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module flit}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: fdupes
|
||||
Requires: python-asn1crypto
|
||||
Requires: python-astunparse
|
||||
Requires: python-bincopy
|
||||
Requires: python-bitstring
|
||||
Requires: python-click
|
||||
Requires: python-click-command-tree
|
||||
Requires: python-click-option-group
|
||||
Requires: python-colorama
|
||||
Requires: python-commentjson
|
||||
Requires: python-crcmod
|
||||
Requires: python-cryptography
|
||||
Requires: python-deepmerge
|
||||
Requires: python-fastjsonschema
|
||||
Requires: python-hexdump
|
||||
Requires: python-jinja2
|
||||
Requires: python-libusbsio
|
||||
Requires: python-oscrypto
|
||||
Requires: python-pycryptodome
|
||||
Requires: python-pylink-square
|
||||
Requires: python-pyocd
|
||||
# disable dependency
|
||||
# Requires: python-pyocd-pemicro
|
||||
# dependency no longer required due to Patch0
|
||||
# Requires: python-pypemicro
|
||||
Requires: python-pyserial
|
||||
Requires: python-ruamel.yaml
|
||||
Requires: python-sly
|
||||
Requires: python-typing-extensions
|
||||
BuildArch: noarch
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Secure Provisioning SDK (SPSDK) is unified, reliable and easy to use SW library working across NXP MCU portfolio providing strong foundation from quick customer prototyping up to production deployment.
|
||||
|
||||
%prep
|
||||
%setup -q -n spsdk-%{version}
|
||||
dos2unix spsdk/debuggers/__init__.py spsdk/debuggers/utils.py
|
||||
%patch0 -p1
|
||||
unix2dos spsdk/debuggers/__init__.py spsdk/debuggers/utils.py
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
find . -type f -name README.md -exec dos2unix {} +
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/blhost
|
||||
%python_clone -a %{buildroot}%{_bindir}/elftosb
|
||||
%python_clone -a %{buildroot}%{_bindir}/ifr
|
||||
%python_clone -a %{buildroot}%{_bindir}/nxpcertgen
|
||||
%python_clone -a %{buildroot}%{_bindir}/nxpcrypto
|
||||
%python_clone -a %{buildroot}%{_bindir}/nxpdebugmbox
|
||||
%python_clone -a %{buildroot}%{_bindir}/nxpdevhsm
|
||||
%python_clone -a %{buildroot}%{_bindir}/nxpdevscan
|
||||
%python_clone -a %{buildroot}%{_bindir}/nxpimage
|
||||
%python_clone -a %{buildroot}%{_bindir}/nxpkeygen
|
||||
%python_clone -a %{buildroot}%{_bindir}/pfr
|
||||
%python_clone -a %{buildroot}%{_bindir}/sdphost
|
||||
%python_clone -a %{buildroot}%{_bindir}/sdpshost
|
||||
%python_clone -a %{buildroot}%{_bindir}/shadowregs
|
||||
%python_clone -a %{buildroot}%{_bindir}/spsdk
|
||||
%python_clone -a %{buildroot}%{_bindir}/tpconfig
|
||||
%python_clone -a %{buildroot}%{_bindir}/tphost
|
||||
# fix line endings
|
||||
%python_expand find %{buildroot}%{$python_sitelib} -type f -exec dos2unix {} +
|
||||
# remove shebangs
|
||||
%python_expand find %{buildroot}%{$python_sitelib} -iname "*.py" -exec sed -i '1{/env python/d;}' {} +
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%post
|
||||
%python_install_alternative blhost elftosb ifr nxpcertgen nxpcrypto nxpdebugmbox nxpdevhsm nxpdevscan nxpimage nxpkeygen pfr sdphost sdpshost shadowregs spsdk tpconfig tphost
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative blhost elftosb ifr nxpcertgen nxpcrypto nxpdebugmbox nxpdevhsm nxpdevscan nxpimage nxpkeygen pfr sdphost sdpshost shadowregs spsdk tpconfig tphost
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{python_sitelib}/spsdk/
|
||||
%{python_sitelib}/spsdk-%{version}.dist-info/
|
||||
%python_alternative %{_bindir}/blhost
|
||||
%python_alternative %{_bindir}/elftosb
|
||||
%python_alternative %{_bindir}/ifr
|
||||
%python_alternative %{_bindir}/nxpcertgen
|
||||
%python_alternative %{_bindir}/nxpcrypto
|
||||
%python_alternative %{_bindir}/nxpdebugmbox
|
||||
%python_alternative %{_bindir}/nxpdevhsm
|
||||
%python_alternative %{_bindir}/nxpdevscan
|
||||
%python_alternative %{_bindir}/nxpimage
|
||||
%python_alternative %{_bindir}/nxpkeygen
|
||||
%python_alternative %{_bindir}/pfr
|
||||
%python_alternative %{_bindir}/sdphost
|
||||
%python_alternative %{_bindir}/sdpshost
|
||||
%python_alternative %{_bindir}/shadowregs
|
||||
%python_alternative %{_bindir}/spsdk
|
||||
%python_alternative %{_bindir}/tpconfig
|
||||
%python_alternative %{_bindir}/tphost
|
||||
|
||||
%changelog
|
3
spsdk-1.10.0.tar.gz
Normal file
3
spsdk-1.10.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c8b8e45cd06aed60dd80b61846e6f815394b57c76aa4417abd2065d3494af14c
|
||||
size 626875
|
Loading…
x
Reference in New Issue
Block a user