This file is indexed.

/usr/lib/pypy/dist-packages/libusb1-1.6.3.egg-info/PKG-INFO is in pypy-libusb1 1.6.3-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
Metadata-Version: 1.1
Name: libusb1
Version: 1.6.3
Summary: Pure-python wrapper for libusb-1.0
Home-page: http://github.com/vpelletier/python-libusb1
Author: Vincent Pelletier
Author-email: plr.vincent@gmail.com
License: LGPLv2.1+
Description: .. contents::
        
        Pure-python wrapper for libusb-1.0
        
        Supports all transfer types, both in synchronous and asynchronous mode.
        
        Home: http://github.com/vpelletier/python-libusb1
        
        PyPI: http://pypi.python.org/pypi/libusb1
        
        .. role:: c_code(code)
          :language: c
        
        .. role:: python_code(code)
          :language: python
        
        Dependencies
        ============
        
        - CPython_ 2.7+ or 3.4+, pypy_ 2.0+. Older versions may work, but are not
          recommended as there is no automated regression testing set up for them.
        
        - libusb-1.0_ or libusbx_
        
        Supported OSes
        ==============
        
        python-libusb1 can be expected to work on:
        
        - GNU/Linux
        
        - Windows [#]_ native dll or via Cygwin_
        
        - OSX [#]_ via MacPorts_, Fink_ or Homebrew_
        
        - FreeBSD (including Debian GNU/kFreeBSD)
        
        - OpenBSD
        
        .. [#] Beware of libusb-win32, which implements 0.1 API, not 1.0 .
        
        .. [#] Beware of possible lack of select.poll if you want to use asynchronous
               API.
        
        Installation
        ============
        
        Releases from PyPI, with name *libusb1*. Installing from command line::
        
            $ pip install libusb1
        
        or::
        
            $ easy_install libusb1
        
        Latest version from source tree::
        
            $ git clone https://github.com/vpelletier/python-libusb1.git
            $ cd python-libusb1
            $ python setup.py install
        
        Usage
        =====
        
        Finding a device and gaining exclusive access:
        
        .. code:: python
        
            import usb1
            with usb1.USBContext() as context:
                handle = context.openByVendorIDAndProductID(
                    VENDOR_ID,
                    PRODUCT_ID,
                    skip_on_error=True,
                )
                if handle is None:
                    # Device not present, or user is not allowed to access device.
                with handle.claimInterface(INTERFACE):
                    # Do stuff with endpoints on claimed interface.
        
        Synchronous I/O:
        
        .. code:: python
        
            while True:
                data = handle.bulkRead(ENDPOINT, BUFFER_SIZE)
                # Process data...
        
        Asynchronous I/O, with more error handling:
        
        .. code:: python
        
            def processReceivedData(transfer):
                if transfer.getStatus() != usb1.TRANSFER_COMPLETED:
                    # Transfer did not complete successfully, there is no data to read.
                    # This example does not resubmit transfers on errors. You may want
                    # to resubmit in some cases (timeout, ...).
                    return
                data = handle.getBuffer()[:transfer.getActualLength()]
                # Process data...
                # Resubmit transfer once data is processed.
                transfer.submit()
        
            # Build a list of transfer objects and submit them to prime the pump.
            transfer_list = []
            for _ in xrange(TRANSFER_COUNT):
                transfer = handle.getTransfer()
                transfer.setBulk(
                    usb1.ENDPOINT_IN | ENDPOINT,
                    BUFFER_SIZE,
                    callback=processReceivedData,
                )
                transfer.submit()
                transfer_list.append(transfer)
            # Loop as long as there is at least one submitted transfer.
            while any(x.isSubmitted() for x in reader_list):
                try:
                    context.handleEvents()
                except usb1.USBErrorInterrupted:
                    pass
        
        For more, see the ``example`` directory.
        
        Documentation
        =============
        
        python-libusb1 main documentation is accessible with python's standard
        ``pydoc`` command.
        
        python-libusb1 follows libusb-1.0 documentation as closely as possible, without
        taking decisions for you. Thanks to this, python-libusb1 does not need to
        duplicate the nice existing `libusb1.0 documentation`_.
        
        Some description is needed though on how to jump from libusb-1.0 documentation
        to python-libusb1, and vice-versa:
        
        ``usb1`` module groups libusb-1.0 functions as class methods. The first
        parameter (when it's a ``libusb_...`` pointer) defined the class the fonction
        belongs to. For example:
        
        - :c_code:`int libusb_init (libusb_context **context)` becomes USBContext class
          constructor, :python_code:`USBContext.__init__(self)`
        
        - :c_code:`ssize_t libusb_get_device_list (libusb_context *ctx,
          libusb_device ***list)` becomes an USBContext method, returning a
          list of USBDevice instances, :python_code:`USBDevice.getDeviceList(self)`
        
        - :c_code:`uint8_t libusb_get_bus_number (libusb_device *dev)` becomes an
          USBDevice method, :python_code:`USBDevice.getBusNumber(self)`
        
        Error statuses are converted into :python_code:`usb1.USBError` exceptions, with
        status as ``value`` instance property.
        
        ``usb1`` module also defines a few more functions and classes, which are
        otherwise not so convenient to call from Python: the event handling API needed
        by async API.
        
        History
        =======
        
        0.0.1
        -----
        
        Initial release
        
        0.1.1
        -----
        
        Massive rework of usb1.py, making it more python-ish and fixing some
        memory leaks.
        
        0.1.2
        -----
        
        Deprecate "transfer" constructor parameter to allow instance reuse.
        
        0.1.3
        -----
        
        Some work on isochronous "in" transfers. They don't raise exceptions anymore,
        but data validity and python-induced latency impact weren't properly checked.
        
        0.2.0
        -----
        
        Fix asynchronous configuration transfers.
        
        Stand-alone polling thread for multi-threaded apps.
        
        More libusb methods exposed on objects, including ones not yet part of
        released libusb versions (up to their commit 4630fc2).
        
        2to3 friendly.
        
        Drop deprecated USBDevice.reprConfigurations method.
        
        0.2.1
        -----
        
        Add FreeBSD support.
        
        0.2.2
        -----
        
        Add Cygwin support.
        
        OpenBSD support checked (no change).
        
        0.2.3
        -----
        
        Add fink and homebrew support on OSX.
        
        Drop PATH_MAX definition.
        
        Try harder when looking for libusb.
        
        1.0.0
        -----
        
        Fix FreeBSD ABI compatibility.
        
        Easier to list connected devices.
        
        Easier to terminate all async transfers for clean exit.
        
        Fix few segfault causes.
        
        pypy support.
        
        1.1.0
        -----
        
        Descriptor walk API documented.
        
        Version and capability APIs exposed.
        
        Some portability fixes (OSes, python versions).
        
        Isochronous transfer refuses to round transfer size.
        
        Better exception handling in enumeration.
        
        Add examples.
        
        Better documentation.
        
        1.2.0
        -----
        
        Wrap hotplug API.
        
        Wrap port number API.
        
        Wrap kernel auto-detach API.
        
        Drop wrapper for libusb_strerror, with compatibility place-holder.
        
        Add a few new upstream enum values.
        
        1.3.0
        -----
        
        **Backward-incompatible change**: Enum class now affects caller's local scope,
        not its global scope. This should not be of much importance, as:
        
        - This class is probably very little used outside libusb1.py
        
        - This class is probably mostly used at module level, where locals == globals.
        
          It is possible to get former behaviour by providing the new ``scope_dict``
          parameter to ``Enum`` constructor::
        
            SOME_ENUM = libusb1.Enum({...}, scope_dict=globals())
        
        Improve start-up time on CPython by not importing standard ``inspect`` module.
        
        Fix some more USBTransfer memory leaks.
        
        Add Transfer.iterISO for more efficient isochronous reception.
        
        1.3.1
        -----
        
        Fixed USBContext.waitForEvent.
        
        Fix typo in USBInterfaceSetting.getClassTuple method name. Backward
        compatibility preserved.
        
        Remove globals accesses from USBDeviceHandle destructor.
        
        Assorted documentation improvements.
        
        1.3.2
        -----
        
        Made USBDevice instances hashable.
        
        Relaxed licensing by moving from GPL v2+ to LGPL v2.1+, for consistency with
        libusb1.
        
        1.4.0
        -----
        
        Reduce (remove ?) the need to import libusb1 module by exposing USBError and
        constants in usb1 module.
        
        Fix libusb1.LIBUSB_ENDPOINT_ENDPOINT_MASK and
        libusb1.LIBUSB_ENDPOINT_DIR_MASK naming.
        
        Fix pydoc appearance of several USBContext methods.
        
        Define exception classes for each error values.
        
        1.4.1
        -----
        
        Fix wheel generation (``python3 setup.py bdist_wheel``).
        
        1.5.0
        -----
        
        controlWrite, bulkWrite and interruptWrite now reject (with TypeError) numeric
        values for ``data`` parameter.
        
        Fix libusb1.REQUEST_TYPE_* names (were TYPE_*). Preserve backward
        compatibility.
        
        Add USBContext.getDeviceIterator method.
        
        Rename USBContext.exit as USBContext.close for consistency with other USB*
        classes. Preserve backward compatibility.
        
        Make USBDeviceHandle.claimInterface a context manager, for easier interface
        releasing.
        
        1.5.1
        -----
        
        Introduce USBPollerThread.stop .
        
        Fix USBDeviceHandle.getSupportedLanguageList bug when running under python 3.
        While fixing this bug it was realised that this method returned ctypes objects.
        This was not intended, and it now returns regular integers.
        
        1.5.2
        -----
        
        Make USBTransfer.cancel raise specific error instances.
        
        1.5.3
        -----
        
        Fix USBTransfer.cancel exception raising introduced in 1.5.2: it was
        accidentally becomming a bound method, preventing the raise to actually
        happen (in at least CPython 2.x) or raising type conversion errors (in at least
        CPython 3.5.2).
        
        1.6
        ---
        
        Improve asynchronous transfer performance: (very) suboptimal code was used to
        initialise asynchronous transfer buffer. As a consequence, usb1 now exposes
        ``bytearrays`` where it used to expose ``bytes`` or ``str`` objects.
        
        Deprecate libusb1 module import, which should not be needed since all (?)
        needed constants were re-bound to usb1 module.
        
        Move testUSB1 module inside usb1, to eventually only expose usb1 as top-level
        module.
        
        1.6.1
        -----
        
        Fix getSupportedLanguageList.
        
        Fix and extend get{,ASCII}StringDescriptor .
        
        Fix iterISO and getISOBufferList.
        
        1.6.2
        -----
        
        Fix getASCIIStringDescriptor: unlike getStringDescriptor, this returns only the
        payload of the string descriptor, without its header.
        
        1.6.3
        -----
        
        Deprecate USBPollerThread . It is mileading users for which the simple version
        (a thread calling ``USBContext.handleEvents``) would be enough. And for more
        advanced uses (ie, actually needing to poll non-libusb file descriptors), this
        class only works reliably with epoll: kqueue (which should tehcnically work)
        has a different API on python level, and poll (which has the same API as epoll
        on python level) lacks the critical ability to change the set of monitored file
        descriptors while a poll is already running, causing long pauses - if not
        deadlocks.
        
        .. _CPython: http://www.python.org/
        
        .. _pypy: http://pypy.org/
        
        .. _Cygwin: https://www.cygwin.com/
        
        .. _MacPorts: https://www.macports.org/
        
        .. _Fink: http://www.finkproject.org/
        
        .. _Homebrew: http://brew.sh/
        
        .. _libusb-1.0: http://www.libusb.org/wiki/libusb-1.0
        
        .. _libusbx: http://libusb.info/
        
        .. _libusb1.0 documentation: http://libusb.org/static/api-1.0/
        
Keywords: usb libusb
Platform: any
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.4
Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Hardware :: Hardware Drivers