Skip to content

Commit 775e098

Browse files
committed
readme: submodule note; minor edits.
1 parent 0fc7341 commit 775e098

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ project that uses a libusb wrapper can also benefit.
77

88
See [libusb.info](https://libusb.info) for more information about libusb.
99

10-
Note: currently the included libusb is built _without_ udev support on Linux.
10+
Note: Currently the included libusb is built _without_ udev support on Linux.
11+
12+
Note: The libusb upstream git repository is included as a submodule, so you need to clone with submodules
13+
enabled. You can either clone with `--recurse-submodules` or run `git submodule update --init` after cloning.
1114

1215

1316
## Installation
@@ -16,11 +19,21 @@ All releases include wheels for Linux, macOS, and Windows for multiple architect
1619
distribution is released.
1720

1821
If a matching wheel is not available, the source distribution will be installed and libusb will be compiled.
19-
This means the libusb build requirements must be installed: autoconf, automake, libtool, and m4 for Linux and
20-
macOS (as mentioned above, libusb is built without udev support, so libudev-dev is not required).
22+
This means the libusb build requirements must be installed:
23+
24+
- Linux and macOS: autoconf, automake, libtool, and m4. As mentioned above, libusb is built without udev support,
25+
so libudev-dev is not required on Linux.
26+
- Windows: Visual Studio 2019 (Community is ok).
2127

2228
If the libusb build fails when installing from a source distribution, the `libusb-package` install _will still
23-
succeed_. In this case, it will attempt to fall back to a system installation of libusb.
29+
succeed_. In this case, an "empty" `libusb-package` is installed that doesn't contain a libusb shared library.
30+
`get_library_path()` returns None and `find_library()` falls back to returning a system installation of libusb,
31+
if available.
32+
33+
You can also install from a clone of the git repository by running `pip install .` from the repository root directory.
34+
Editable installs are supported. Please note that running `setup.py` directly is no longer supported for PEP 517
35+
compliant packages. When building from the repo, because libusb 1.0.24 does not support out of tree builds, the build is
36+
done in-place in the `src/libusb` directory. `make clean` is run before compiling to ensure a clean build.
2437

2538

2639
## APIs

0 commit comments

Comments
 (0)