commit 6f7d32ec2da285e6c9c01c24a0f656788b27465ac70fd47251ac0e9abb91a8d9 Author: Matej Cepl Date: Sun May 14 19:54:51 2023 +0000 Accepting request 1087061 from home:ojkastl_buildservice:Branch_devel_languages_python new package python-libusbsio, required by pynitrokey OBS-URL: https://build.opensuse.org/request/show/1087061 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libusbsio?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/libusbsio-2.1.11.tar.gz b/libusbsio-2.1.11.tar.gz new file mode 100644 index 0000000..ff20ca8 --- /dev/null +++ b/libusbsio-2.1.11.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d2e81f4aedccbe8a3c327b002c7750dd374abdf1ef6d54780728e653af9124d +size 259491 diff --git a/python-libusbsio.changes b/python-libusbsio.changes new file mode 100644 index 0000000..1a31a19 --- /dev/null +++ b/python-libusbsio.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Fri May 12 12:56:09 UTC 2023 - Johannes Kastl + +- new package python-libusbsio, required by pynitrokey diff --git a/python-libusbsio.spec b/python-libusbsio.spec new file mode 100644 index 0000000..71eec02 --- /dev/null +++ b/python-libusbsio.spec @@ -0,0 +1,101 @@ +# +# spec file for package python-libusbsio +# +# 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-libusbsio +Version: 2.1.11 +Release: 0 +Summary: Python wrapper around NXP LIBUSBSIO library +License: BSD-3-Clause +URL: https://www.nxp.com/design/software/development-software/library-for-windows-macos-and-ubuntu-linux:LIBUSBSIO +Source: https://files.pythonhosted.org/packages/source/l/libusbsio/libusbsio-%{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: libudev1 +BuildRequires: libusb +# /SECTION +BuildRequires: %{python_module setuptools >= 42.0} +BuildRequires: %{python_module wheel >= 0.36.2} +BuildRequires: fdupes +BuildRequires: dos2unix +%python_subpackages + +%description +Python wrapper around NXP LIBUSBSIO library + +%prep +%setup -q -n libusbsio-%{version} + +%build +%pyproject_wheel +dos2unix README.md + +%install +%pyproject_install +# remove shebangs +%python_expand find %{buildroot}%{$python_sitelib} -iname "*.py" -exec sed -i '1{/env python/d;}' {} + +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +IGNORED_CHECKS="test_Error" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GetDeviceInfo" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GetDeviceInfo" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GetLastError" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GetMaxDataSize" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GetNumGPIOPorts" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GetNumI2CPorts" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GetNumPorts" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GetNumSPIPorts" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GetVersion" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_OpenClose" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_SPI_OpenClose" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_SPI_Reset" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_SPI_Transfer_Echo_long" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_SPI_Transfer_Echo_longer" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_SPI_Transfer_Echo_short" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_SPI_Transfer_Echo_single" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_I2C_OpenClose" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_I2C_Reset" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_I2C_Transfer_Echo_long" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_I2C_Transfer_Echo_short" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_I2C_Transfer_Echo_single" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_I2C_Transfer_Echo_long" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_I2C_Transfer_Echo_short" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_I2C_Transfer_Echo_single" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GPIO_ReadPort" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GPIO_SetClearPin_GetPin" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GPIO_SetClearPin_ReadPort" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GPIO_SetClearPort_ReadPort" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GPIO_SetClearTogglePin_ReadPort" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GPIO_SetPortDir_GetPortDir" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GPIO_WritePort_ReadBack" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_GPIO_WritePort_ReadPort" + +%pytest -k "not (${IGNORED_CHECKS})" + +%files %{python_files} +%doc README.md +%license license license/BSD-3-clause.txt license/LICENSE-hidapi-bsd.txt license/SoftwareContentRegister.txt +%{python_sitelib}/libusbsio +%{python_sitelib}/libusbsio-%{version}.dist-info/ + +%changelog