Comments (4)
Why is that needed?
from cython-hidapi.
Also this should work:
>>> from pkg_resources import get_distribution
>>> get_distribution('hidapi').version
'0.7.99.post15'
from cython-hidapi.
Sorry for the delay in responding to this issue. I missed the notification email somehow.
Why is that needed?
To aid in debugging.
We recently received some application logs submitted by our users with behavior I couldn't explain or reproduce. The root cause was that our build system had used the wrong version of hidapi and we hadn't noticed before we distributed. Because it took such a long time to figure out so I resolved to add version numbers for our packages to the application logs so if this type of thing happened again it'd be really obvious. While doing this we found all but two packages we used make this available via a __version__
variable or something similar.
from pkg_resources import get_distribution
get_distribution('hidapi').version
This works in development but we've run into two problems building this into our distributable app because it relies on setuptools. Our windows build process coped with this ok but it included a lot of dependencies we weren't using before and we couldn't get this to work on osx.
In the end we've reverted to
def get_hidapi_version():
hid_file, regex = hid.__file__, '(hidapi[^\\\/]*)'
prog = re.compile(regex, re.IGNORECASE)
matches = prog.search(hid_file)
if matches:
return matches.group(0)
else:
return hid_file
from cython-hidapi.
Thanks for the info. If you would like to change our code, please send a pull request.
from cython-hidapi.
Related Issues (20)
- Update to HIDAPI v0.14.0 HOT 4
- Writing to a specific HID interface HOT 2
- Report global errors in device.error() HOT 4
- Incompatible with newly released `Cython==3.0.0` HOT 3
- Make compatible with Cython 3.x
- Don't know how to compile chid.pxd HOT 1
- Add windows DLL to Python package HOT 3
- Wheel for Python 3.12 HOT 5
- Add wrapper for hid_get_report_descriptor HOT 2
- Migration to hidraw as a default backend for pip package HOT 2
- Make a release that supports Cython 3 and later HOT 2
- [Question] Several methods don't work well on Windows and MacOS HOT 2
- Feature request: Add wheel for "musllinux" HOT 1
- 0.14.0: documentation uses `recommonmark` which is now deprecated HOT 3
- add supporting for hid_get_report_descriptor HOT 1
- Possible issue with get_input_report HOT 2
- unknown file type '.pxd' on install HOT 3
- request a new release HOT 3
- Open failed through python but not C HOT 2
- Darwin: enable non-exclusive device usage HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cython-hidapi.