forked from pool/python-libusb1
- update to 3.3.1:
* Fix incorrect getFinalizer() reference in
setPollFDNotifiers()
- update to 3.3.0:
* Fix finalizer registration errors on pypi by using a thread-
safe sequential number generator instead of relying on object
id unicity and timely finalizer triggering.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libusb1?expand=0&rev=15
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
libusb1-3.1.0.tar.gz
Normal file
3
libusb1-3.1.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4ee9b0a55f8bd0b3ea7017ae919a6c1f439af742c4a4b04543c5fd7af89b828c
|
||||
size 83013
|
||||
3
libusb1-3.2.0.tar.gz
Normal file
3
libusb1-3.2.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a11a6095e718cd49418a96329314da271cca6be7b4317a142724523371ac8961
|
||||
size 105601
|
||||
3
libusb1-3.3.1.tar.gz
Normal file
3
libusb1-3.3.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3951d360f2daf0e0eacf839e15d2d1d2f4f5e7830231eb3188eeffef2dd17bad
|
||||
size 107600
|
||||
57
py313.patch
Normal file
57
py313.patch
Normal file
@@ -0,0 +1,57 @@
|
||||
From e8fdf43ff4b0ba55edbbb83a6822d62f0f755e64 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Damhet <xdbob@xdbob.net>
|
||||
Date: Tue, 13 Aug 2024 17:22:01 +0200
|
||||
Subject: [PATCH] testUSB1: fix python 3.13 support
|
||||
|
||||
PEP 667[1] makes all calls to `locals()` return a snapshot of the local
|
||||
context. Fix the tests by removing the `local_dict` variable and keep
|
||||
looking at the latest `locals()` state.
|
||||
|
||||
[1]: https://peps.python.org/pep-0667/
|
||||
|
||||
Signed-off-by: Antoine Damhet <xdbob@xdbob.net>
|
||||
---
|
||||
usb1/testUSB1.py | 10 ++++------
|
||||
1 file changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/usb1/testUSB1.py b/usb1/testUSB1.py
|
||||
index ce33031..cc5503d 100644
|
||||
--- a/usb1/testUSB1.py
|
||||
+++ b/usb1/testUSB1.py
|
||||
@@ -278,15 +278,14 @@ def testDefaultEnumScope(self):
|
||||
"""
|
||||
ENUM_NAME = 'THE_ANSWER'
|
||||
ENUM_VALUE = 42
|
||||
- local_dict = locals()
|
||||
global_dict = globals()
|
||||
- self.assertEqual(local_dict.get(ENUM_NAME), None)
|
||||
+ self.assertEqual(locals().get(ENUM_NAME), None)
|
||||
self.assertEqual(global_dict.get(ENUM_NAME), None)
|
||||
self.assertEqual(getattr(libusb1, ENUM_NAME, None), None)
|
||||
# pylint: disable=unused-variable
|
||||
TEST_ENUM = libusb1.Enum({ENUM_NAME: ENUM_VALUE})
|
||||
# pylint: enable=unused-variable
|
||||
- self.assertEqual(local_dict.get(ENUM_NAME), ENUM_VALUE)
|
||||
+ self.assertEqual(locals().get(ENUM_NAME), ENUM_VALUE)
|
||||
self.assertEqual(global_dict.get(ENUM_NAME), None)
|
||||
self.assertEqual(getattr(libusb1, ENUM_NAME, None), None)
|
||||
|
||||
@@ -296,16 +295,15 @@ def testExplicitEnumScope(self):
|
||||
"""
|
||||
ENUM_NAME = 'THE_ANSWER'
|
||||
ENUM_VALUE = 42
|
||||
- local_dict = locals()
|
||||
global_dict = globals()
|
||||
- self.assertEqual(local_dict.get(ENUM_NAME), None)
|
||||
+ self.assertEqual(locals().get(ENUM_NAME), None)
|
||||
self.assertEqual(global_dict.get(ENUM_NAME), None)
|
||||
self.assertEqual(getattr(libusb1, ENUM_NAME, None), None)
|
||||
# pylint: disable=unused-variable
|
||||
TEST_ENUM = libusb1.Enum({ENUM_NAME: ENUM_VALUE}, global_dict)
|
||||
# pylint: enable=unused-variable
|
||||
try:
|
||||
- self.assertEqual(local_dict.get(ENUM_NAME), None)
|
||||
+ self.assertEqual(locals().get(ENUM_NAME), None)
|
||||
self.assertEqual(global_dict.get(ENUM_NAME), ENUM_VALUE)
|
||||
self.assertEqual(getattr(libusb1, ENUM_NAME, None), None)
|
||||
finally:
|
||||
135
python-libusb1.changes
Normal file
135
python-libusb1.changes
Normal file
@@ -0,0 +1,135 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 11 12:45:26 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 3.3.1:
|
||||
* Fix incorrect getFinalizer() reference in
|
||||
setPollFDNotifiers()
|
||||
- update to 3.3.0:
|
||||
* Fix finalizer registration errors on pypi by using a thread-
|
||||
safe sequential number generator instead of relying on object
|
||||
id unicity and timely finalizer triggering.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 22 12:50:43 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 3.2.0
|
||||
* Add example for scanning the complete device tree
|
||||
* Fix CRLF problem
|
||||
* testUSB1: Fix python 3.13 support
|
||||
- Drop py313.patch, merged upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 2 12:43:40 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add upstream py313.patch to fix build with new python
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 8 08:19:05 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 3.1.0:
|
||||
* Fix bug preventing use of setPollFDNotifiers.
|
||||
* Wrap libusb_interrupt_event_handler, available since libusb
|
||||
1.0.21, to help applications wake an event handling thread (ex:
|
||||
durring exit).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 3 04:49:28 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 3.0.0:
|
||||
* Add support for pyinstaller.
|
||||
* Fix support for python 3.10.
|
||||
* Drop python <3.4 support.
|
||||
* Do not load the C library on import. Allows applications to customise
|
||||
the lookup logic (see usb1.loadLibrary).
|
||||
* Add LIBUSB_SPEED_SUPER_PLUS.
|
||||
* Better control device iterator end of life.
|
||||
* Fix objects escaping control from their parent.
|
||||
* Fix a TypeError exception in USBContext.handleEvents.
|
||||
* Fix an AttributeError exception in USBContext.hotplugRegisterCallback.
|
||||
* Fix segfault in pypy3 when finalizing USBDevice objects.
|
||||
* Source only: convert examples to python3.
|
||||
* Release process: also run some examples scripts.
|
||||
* Update versioneer to be compatible with 3.11.
|
||||
* Drop python <3.6 support.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 20 09:43:06 UTC 2021 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Update to v1.9.1
|
||||
* Fix installation from pypi source tarball, broken in 1.8.1
|
||||
- from v1.9
|
||||
* Drop USBPollerThread
|
||||
* Deprecate libusb-lock-related USBContext API
|
||||
- from v1.8.1
|
||||
* Embed libusb1 dll for easier deployment on Windows
|
||||
* Cryptographically signed releases
|
||||
* Use libusb_free_pollfds whenever available (libusb1>=1.0.20)
|
||||
* Fix hotplug callback destruction at context teardown
|
||||
* Drop remnants of python 2.6 support code
|
||||
- from v1.8
|
||||
* Fix getExtra and libusb1.libusb_control_transfer_get_data
|
||||
* Fix getMaxPower unit on SuperSpeed devices
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 15 21:54:23 UTC 2019 - Jonathan Harker <jharker@suse.com>
|
||||
|
||||
- Upgrade to 1.7.1:
|
||||
* usb1.__version__ is now present, managed by versioneer. Fix an occasional
|
||||
segfault when closing a transfer from inside its callback function.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 15 06:40:15 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Activate test suite
|
||||
- Remove unnecessary build dependencies, and add BuildArch: noarch
|
||||
- Remove GPL license as it was relicensed to LGPL2.1+ in May 2015
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 14 16:38:03 UTC 2018 - marec@detebe.org
|
||||
|
||||
- Update to version 1.7:
|
||||
* Bump to 1.7 .
|
||||
* setup: Simplify.
|
||||
* Bump copyright year.
|
||||
* usb1: Expose transferred byte count and received bytes on synchronous API
|
||||
* usb1: Fix docstring interruptRead refering to itself.
|
||||
* Specify that it is compatible with python 3 in setup.py
|
||||
* README: libusb.org seems dead, switch to the fork.
|
||||
* usb1: Move getManufacturer, getProduct ,getSerialNumber to USBDeviceHandle.
|
||||
* usb1: get{,ASCII}StringDescriptor now return None for descriptor 0.
|
||||
* Bump to 1.6.6 .
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 27 10:41:21 UTC 2018 - marec@detebe.org
|
||||
|
||||
- Update to version 1.6.6:
|
||||
* Bump to 1.6.6 .
|
||||
* usb1: Expose string descriptors on USBDevice.
|
||||
* Bump to 1.6.5 .
|
||||
* usb1: Bind "cast" to USBContext class.
|
||||
* Cast libusb pollfd callbacks from null pointer to proper type.
|
||||
* examples: Make hotplug and listdev examples python3-friendly.
|
||||
* setup.py: Tell setuptools to run 2to3 when running on python3
|
||||
* usb1: Document hotplug handler limitations.
|
||||
* Bump to 1.6.4 .
|
||||
* usb1: Fix asynchronous control transfer buffer.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 24 16:22:41 UTC 2018 - marec@detebe.org
|
||||
|
||||
- Update to version 1.6.5:
|
||||
* Bump to 1.6.5 .
|
||||
* usb1: Bind "cast" to USBContext class.
|
||||
* Cast libusb pollfd callbacks from null pointer to proper type.
|
||||
* examples: Make hotplug and listdev examples python3-friendly.
|
||||
* setup.py: Tell setuptools to run 2to3 when running on python3
|
||||
* usb1: Document hotplug handler limitations.
|
||||
* Bump to 1.6.4 .
|
||||
* usb1: Fix asynchronous control transfer buffer.
|
||||
* Bump to 1.6.3 .
|
||||
* Deprecate USBPollerThread.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 21 18:06:13 UTC 2018 - marec@detebe.org
|
||||
|
||||
- initial package build
|
||||
64
python-libusb1.spec
Normal file
64
python-libusb1.spec
Normal file
@@ -0,0 +1,64 @@
|
||||
#
|
||||
# spec file for package python-libusb1
|
||||
#
|
||||
# Copyright (c) 2025 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/
|
||||
#
|
||||
|
||||
|
||||
Name: python-libusb1
|
||||
Version: 3.3.1
|
||||
Release: 0
|
||||
Summary: Python wrapper for libusb-1.0
|
||||
# Relicensed from GPL to LGPLv2.1+ in May 2015
|
||||
# https://github.com/vpelletier/python-libusb1/commit/238eaefa0759622afc554884b4b333d9bf946c65
|
||||
License: LGPL-2.1-or-later
|
||||
URL: https://github.com/vpelletier/%{name}
|
||||
Source: https://files.pythonhosted.org/packages/source/l/libusb1/libusb1-%{version}.tar.gz
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libusb-1_0-0 >= 1.0.21
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: libusb-1_0-0 >= 1.0.21
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
This is a pure python wrapper for libusb-1.0.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n libusb1-%{version}
|
||||
sed -i '/wheel/d' setup.py
|
||||
|
||||
sed -i '1{/^#!/d}' examples/*.py
|
||||
chmod a-x examples/*.py
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%python_exec -m usb1.testUSB1 -v
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst examples/
|
||||
%license COPYING.LESSER
|
||||
%{python_sitelib}/libusb1.py
|
||||
%{python_sitelib}/usb1
|
||||
%pycache_only %{python_sitelib}/__pycache__/libusb1*
|
||||
%{python_sitelib}/libusb1-%{version}*info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user