From 1696212d18e846fd76e1b3153fb8163ce6be04f2 Mon Sep 17 00:00:00 2001 From: Tero Paloheimo Date: Sat, 17 Feb 2024 17:33:16 +0200 Subject: [PATCH] build: install Bleak by default on Linux As Bleak is soon to become the default adapter on Linux, install Bleak by default for the benefit of Linux users, both current and future. For future Bleak users this makes testing and adoption easier when the module is pre-installed. --- CHANGELOG.md | 1 + README.md | 13 ++++--------- pyproject.toml | 4 ++-- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bcf0a7..4d4c6be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Changelog ### [Unreleased] +* ADD: Install Bleak automatically on all platforms ## [2.3.1] - 2024-03-10 * ADD: Bluez as option to RUUVI_BLE_ADAPTER environment variable diff --git a/README.md b/README.md index ac798ed..ffa18e1 100644 --- a/README.md +++ b/README.md @@ -445,15 +445,10 @@ In case of errors, the application tries to exit immediately, so it can be autom ### Bleak -On Windows and macOS Bleak is installed and used automatically with `ruuvitag-sensor` package. +Bleak is automatically installed with `ruuvitag-sensor` package on all platforms. +On Windows and macOS it is automatically used with `ruuvitag-sensor` package. -On Linux install it manually from PyPI and enable it with `RUUVI_BLE_ADAPTER` environment variable. - -```sh -$ python -m pip install bleak -``` - -Add environment variable RUUVI_BLE_ADAPTER with value Bleak. E.g. +To enable Bleak use the `RUUVI_BLE_ADAPTER` environment variable as shown below. ```sh $ export RUUVI_BLE_ADAPTER="bleak" @@ -467,7 +462,7 @@ import os os.environ["RUUVI_BLE_ADAPTER"] = "bleak" ``` -Bleak supports only async methods. +Bleak only supports asynchronous methods. ```py import asyncio diff --git a/pyproject.toml b/pyproject.toml index 11280d5..e6f29cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ dependencies = [ "ptyprocess;platform_system=='Linux'", "mypy-extensions;python_version<'3.8'", "importlib-metadata<4.3,>=1.1.0;python_version<'3.8'", - "bleak;platform_system=='Windows' or platform_system=='Darwin'", + "bleak", ] [project.optional-dependencies] @@ -87,4 +87,4 @@ line_length = 120 ensure_newline_before_comments = true [tool.black] -line-length = 120 \ No newline at end of file +line-length = 120