forked from pool/python-pylink-square
Accepting request 1087119 from home:ojkastl_buildservice:Branch_devel_languages_python
new package python-pylink-square, required by pynitrokey OBS-URL: https://build.opensuse.org/request/show/1087119 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylink-square?expand=0&rev=1
This commit is contained in:
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
|
3
pylink-square-1.1.0.tar.gz
Normal file
3
pylink-square-1.1.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:12d6b03f39a2a70beb1d4df08cc7b464bc7518a9131e498f1e4055236044d4ac
|
||||
size 165808
|
4
python-pylink-square.changes
Normal file
4
python-pylink-square.changes
Normal file
@@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri May 12 12:09:27 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||
|
||||
- new package python-pylink-square, required by pynitrokey
|
87
python-pylink-square.spec
Normal file
87
python-pylink-square.spec
Normal file
@@ -0,0 +1,87 @@
|
||||
#
|
||||
# spec file for package python-pylink-square
|
||||
#
|
||||
# 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-pylink-square
|
||||
Version: 1.1.0
|
||||
Release: 0
|
||||
Summary: Python interface for SEGGER J-Link
|
||||
License: Apache-2.0
|
||||
URL: http://www.github.com/Square/pylink
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pylink-square/pylink-square-%{version}.tar.gz
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module psutil >= 5.2.2}
|
||||
BuildRequires: %{python_module six}
|
||||
# Requires for mock == 2.0.0 replaced by using unittest.mock
|
||||
# /SECTION
|
||||
BuildRequires: fdupes
|
||||
Requires: python-psutil >= 5.2.2
|
||||
Requires: python-six
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Python interface for SEGGER J-Link.
|
||||
|
||||
%prep
|
||||
%setup -q -n pylink-square-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/pylink-rtt
|
||||
%python_clone -a %{buildroot}%{_bindir}/pylink-swv
|
||||
%python_clone -a %{buildroot}%{_bindir}/pylink
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
# replace mock with unittest.mock
|
||||
find tests -type f -exec sed -i 's/from mock/from unittest.mock/g' {} +
|
||||
find tests -type f -exec sed -i 's/import mock/import unittest.mock as mock/g' {} +
|
||||
# ignore checks that fail on some architectures
|
||||
# see https://github.com/square/pylink/issues/175
|
||||
IGNORED_CHECKS="test_initialize_windows"
|
||||
IGNORED_CHECKS="${IGNORED_CHECKS} or test_unlock_kinetis_read_fail"
|
||||
IGNORED_CHECKS="${IGNORED_CHECKS} or test_unlock_kinetis_success"
|
||||
%pytest -k "not (${IGNORED_CHECKS})"
|
||||
|
||||
%post
|
||||
%python_install_alternative pylink-rtt pylink-swv pylink
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative pylink-rtt
|
||||
|
||||
%files %{python_files}
|
||||
%doc CHANGELOG.md README.md
|
||||
%license LICENSE.md
|
||||
%python_alternative %{_bindir}/pylink-rtt
|
||||
%python_alternative %{_bindir}/pylink-swv
|
||||
%python_alternative %{_bindir}/pylink
|
||||
%{python_sitelib}/pylink/
|
||||
%{python_sitelib}/pylink_square-%{version}.dist-info
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user