Skip to content

Commit adef270

Browse files
committed
Refine dependencies
1 parent 47fcd8e commit adef270

15 files changed

Lines changed: 102 additions & 54 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// Use 'postCreateCommand' to run commands after the container is created.
1414
"postCreateCommand":
15-
"python -m pip install '.[build,test,development,documentation]'",
15+
"python -m pip install '.[all]' --group dev",
1616

1717
// Configure tool-specific properties.
1818
"customizations": {

.github/workflows/code-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Install dependencies
3636
run: |
3737
python -m pip install --upgrade pip
38-
python -m pip install ".[build,test,development]"
38+
python -m pip install ".[all]" --group dev
3939
- name: Check
4040
run: |
4141
invoke project.pre-commit

.github/workflows/python-avatar.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Install
3535
run: |
3636
python -m pip install --upgrade pip
37-
python -m pip install .[avatar]
37+
python -m pip install .[all,avatar]
3838
- name: Rootcanal
3939
run: nohup python -m rootcanal > rootcanal.log &
4040
- name: Test

.github/workflows/python-build-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Install dependencies
3636
run: |
3737
python -m pip install --upgrade pip
38-
python -m pip install ".[build,test,development,documentation]"
38+
python -m pip install ".[all]" --group dev
3939
- name: Test
4040
run: |
4141
invoke test
@@ -62,7 +62,7 @@ jobs:
6262
- name: Install Python dependencies
6363
run: |
6464
python -m pip install --upgrade pip
65-
python -m pip install ".[build,test,development,documentation]"
65+
python -m pip install ".[all]" --group dev
6666
- name: Install Rust toolchain
6767
uses: actions-rust-lang/setup-rust-toolchain@v1
6868
with:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ To install package dependencies needed to run the bumble examples, execute the f
3333

3434
```
3535
python -m pip install --upgrade pip
36-
python -m pip install ".[test,development,documentation]"
36+
python -m pip install ".[all]" --group dev
3737
```
3838

3939
### Examples

apps/auracast.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
try:
4141
import lc3 # type: ignore # pylint: disable=E0401
4242
except ImportError as e:
43-
raise ImportError(
44-
"Try `python -m pip install \"git+https://github.com/google/liblc3.git\"`."
45-
) from e
43+
raise ImportError("Try `python -m pip install '.[auracast]'`.") from e
4644

4745
import bumble.device
4846
import bumble.logging

apps/lea_unicast/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
try:
3131
import lc3 # type: ignore # pylint: disable=E0401
3232
except ImportError as e:
33-
raise ImportError("Try `python -m pip install \".[lc3]\"`.") from e
33+
raise ImportError("Try `python -m pip install \".[auracast]\"`.") from e
3434

3535
import aiohttp.web
3636
import click

bumble/transport/android_emulator.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,18 @@
2828
)
2929

3030
# pylint: disable=no-name-in-module
31-
from bumble.transport.grpc_protobuf.emulated_bluetooth_packets_pb2 import HCIPacket
32-
from bumble.transport.grpc_protobuf.emulated_bluetooth_pb2_grpc import (
33-
EmulatedBluetoothServiceStub,
34-
)
35-
from bumble.transport.grpc_protobuf.emulated_bluetooth_vhci_pb2_grpc import (
36-
VhciForwardingServiceStub,
37-
)
31+
try:
32+
from bumble.transport.grpc_protobuf.emulated_bluetooth_packets_pb2 import HCIPacket
33+
from bumble.transport.grpc_protobuf.emulated_bluetooth_pb2_grpc import (
34+
EmulatedBluetoothServiceStub,
35+
)
36+
from bumble.transport.grpc_protobuf.emulated_bluetooth_vhci_pb2_grpc import (
37+
VhciForwardingServiceStub,
38+
)
39+
except ImportError as e:
40+
raise ImportError(
41+
'The bumble[android] extra is required to use the Android emulator transport'
42+
) from e
3843

3944
# -----------------------------------------------------------------------------
4045
# Logging

bumble/transport/android_netsim.py

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,27 @@
3737
)
3838

3939
# pylint: disable=no-name-in-module
40-
from bumble.transport.grpc_protobuf.netsim.common_pb2 import ChipKind
41-
from bumble.transport.grpc_protobuf.netsim.hci_packet_pb2 import HCIPacket
42-
from bumble.transport.grpc_protobuf.netsim.packet_streamer_pb2 import (
43-
PacketRequest,
44-
PacketResponse,
45-
)
46-
from bumble.transport.grpc_protobuf.netsim.packet_streamer_pb2_grpc import (
47-
PacketStreamerServicer,
48-
PacketStreamerStub,
49-
add_PacketStreamerServicer_to_server,
50-
)
51-
from bumble.transport.grpc_protobuf.netsim.startup_pb2 import Chip, ChipInfo, DeviceInfo
40+
try:
41+
from bumble.transport.grpc_protobuf.netsim.common_pb2 import ChipKind
42+
from bumble.transport.grpc_protobuf.netsim.hci_packet_pb2 import HCIPacket
43+
from bumble.transport.grpc_protobuf.netsim.packet_streamer_pb2 import (
44+
PacketRequest,
45+
PacketResponse,
46+
)
47+
from bumble.transport.grpc_protobuf.netsim.packet_streamer_pb2_grpc import (
48+
PacketStreamerServicer,
49+
PacketStreamerStub,
50+
add_PacketStreamerServicer_to_server,
51+
)
52+
from bumble.transport.grpc_protobuf.netsim.startup_pb2 import (
53+
Chip,
54+
ChipInfo,
55+
DeviceInfo,
56+
)
57+
except ImportError as e:
58+
raise ImportError(
59+
'The bumble[android] extra is required to use the Android netsim transport'
60+
) from e
5261

5362
# -----------------------------------------------------------------------------
5463
# Logging

docs/mkdocs/src/apps_and_tools/auracast.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ Try installing the optional `[auracast]` dependencies:
2929

3030
## LC3
3131
The `auracast` app depends on the `lc3` python module, which is available
32-
either as PyPI module (currently only available for Linux x86_64).
32+
as a PyPI module `lc3py` (currently available for Linux x86_64 and macOS arm64).
3333
When installing Bumble with the optional `auracast` dependency, the `lc3`
34-
module will be installed from the `lc3py` PyPI package if available.
35-
If not, you will need to install it separately. This can be done with:
34+
module will be installed automatically if your platform is supported.
35+
If not, you will need to install it separately. This can be done by building it from source:
3636
```bash
3737
$ python3 -m pip install "git+https://github.com/google/liblc3.git"
3838
```

0 commit comments

Comments
 (0)