-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BSD support #1
Comments
Hello @flit :-) Here you go :-) I am working on FreeBSD 13-STABLE with GENERIC kernel configuration (some customizations for my hardware added):
There are some dependencies that needs to be installed prior build / install (only Without dependencies I got:
With dependencies installed:
There seems no This error is a bit worrying during
Is there any test I could run to verify created package operations? Please note that FreeBSD that I work on provides its own LibUSB in the base OS install (0.x and 1.x compatible). On NetBSD and OpenBSD there is a dedicated package for LibUSB. Also please note that there is already On BSD systems static libraries use
Please let me know if you need any other information / feedback / testing :-) |
I have read the project description:
On FreeBSD there is a BSD licensed LibUSB (created by @hselasky) already pre-installed with the base OS, so no need to install from package, its here already with the OS. Maybe on OpenBSD and NetBSD this package needs to be added by hand. But these are system provided ports / packages.. and these must only be installed by Anyways on BSD local user packages should not touch anything system wide, this is not allowed and unacceptable. Any local python package should be installed in local user created virtual environment. Any custom dynamic library should be placed in local application bundle. Local means nothing outside On BSD only Do I miss anything? :-) |
Please note that there may be different flavors of BSD out there, mostly OpenBSD and NetBSD that are different OS, others are FreeBSD derivatives in most cases :-) |
Even though there was some build error your package seems to work on FreeBSD:
|
Hi @cederom, apologies it took me so long to get back to this! Thanks so much for testing! 🙏🏽 The build error ( The reason your test worked even though the build failed is that if the build if libusb fails when installing libusb-package, the install of libusb-package will still succeed. It just won't have a libusb shared library, and will always fall back to the system-provided libusb (if there is one). System libusb and the point of libusb-packageThe use case for libusb-package is that when a project like pyocd uses pyusb, there is normally no way to guarantee a known good version of libusb on all OSes. Users have to take an extra step of installing libusb before they can use pyocd. Like the BSDs, Linux also normally comes with libusb installed. However, the system-provided version of libusb may be older and will likely change depending on the OS version. Using the libusb that comes with libusb-package, you know which version of libusb you'll be getting, and thus the limitations and bugs. pyusb is the libusb wrapper that libusb-package is primarily designed to work with. libusb-package doesn't itself contain a Python wrapper around libusb—it's just the shared library and a few functions to conveniently get its path or create a pyusb The libusb shared library is contained within the Python package, and is not installed anywhere system-wide. So it's only used by Python tools that explicitly want to use it. Installing and buildingRunning Similarly, the way to build either source distributions or wheels has changed now. You have to use the TestingThe |
Add BSD support to libusb-package. I'd like to make sure that libusb-package can install and work successfully from the source distribution on BSD systems, since prebuilt wheels for BSD are highly unlikely.
@cederom I don't have a BSD environment to test with. Could you help here?
One question is: what does
platform.system()
return for BSD, and what is the file extension for shared libraries? This will allow an entry to be added to the library extension mapping dict:libusb-package/src/libusb_package/__init__.py
Lines 40 to 45 in 7b3a847
The text was updated successfully, but these errors were encountered: