From 83bcd6edf4886f732f60d9d98c7681f7e4a914da Mon Sep 17 00:00:00 2001 From: Daniel Morais Date: Wed, 30 Jul 2025 17:18:10 +0200 Subject: [PATCH 1/3] Fix issue when a LP have a .hex with several areas --- ledgerblue/hexLoader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ledgerblue/hexLoader.py b/ledgerblue/hexLoader.py index 206bcd9..4265a65 100644 --- a/ledgerblue/hexLoader.py +++ b/ledgerblue/hexLoader.py @@ -568,14 +568,14 @@ def load(self, erase_u8, max_length_per_apdu, hexFile, reverse=False, doCRC=True if reverse: chunk = data[offset-chunkLen : offset] if self.createpackParams: - self.loadPackSegmentChunk(offset-chunkLen, bytes(chunk)) + self.loadPackSegmentChunk(startAddress+offset-chunkLen, bytes(chunk)) else: self.loadSegmentChunk(offset-chunkLen, bytes(chunk)) else: chunk = data[offset : offset + chunkLen] sha256.update(chunk) if self.createpackParams: - self.loadPackSegmentChunk(offset, bytes(chunk)) + self.loadPackSegmentChunk(startAddress+offset, bytes(chunk)) else: self.loadSegmentChunk(offset, bytes(chunk)) if reverse: From 4edacbb97573322dec4c3b6dc677803b6496bae0 Mon Sep 17 00:00:00 2001 From: Miguel Ruiz de Sotto Date: Wed, 30 Jul 2025 18:28:09 +0200 Subject: [PATCH 2/3] ci def --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba74c00..ffc6019 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: tags: - '*' branches: - - master + - mru-toto pull_request: branches: - master From a3bc26d35810ce020235f09d2095416197784bdf Mon Sep 17 00:00:00 2001 From: Lucas PASCAL Date: Tue, 28 Jan 2025 14:26:42 +0100 Subject: [PATCH 3/3] [update] Supported Python version: dropped 3.6, 3.7 and 3.8, added 3.11, 3.12 and 3.13 --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ pyproject.toml | 11 ++++++----- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffc6019..06c6f36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,31 @@ on: - master jobs: + build_install: + name: Build and install the Ledgerblue Python package + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python_version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + steps: + - name: Clone + uses: actions/checkout@v4 + + - name: Setup Python version + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python_version }} + + - name: Build & install + run: | + pip install -U pip + pip install -U . + package-deploy: name: Build the Python package, and deploy if needed runs-on: ubuntu-latest + needs: build_install steps: - name: Clone uses: actions/checkout@v3 @@ -23,6 +45,10 @@ jobs: - name: Install dependencies run: | + # Needed to workaround this bug https://github.com/pypa/setuptools/issues/4759 + # To be removed when it's fixed + pip install -U packaging + python -m pip install pip --upgrade pip install build twine diff --git a/pyproject.toml b/pyproject.toml index 3b8bd44..66d8b7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools>=45", + "setuptools>=75", "setuptools_scm[toml]>=6.2", "wheel" ] @@ -21,18 +21,19 @@ classifiers = [ "Operating System :: MacOS :: MacOS X", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] dynamic = [ "version" ] -requires-python = ">=3" +requires-python = ">=3.8" dependencies = [ "pyelftools>=0.29,<1.0", "hidapi>=0.7.99", - "protobuf >=3.20,<4", + "protobuf >=5", "pycryptodomex>=3.6.1", "future", "ecpy>=0.9.0",