From dc134d4185004399ad1e7aac0918ab73edad9c6c Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Thu, 13 Nov 2025 11:53:31 -0500 Subject: [PATCH 1/5] README: s/basic/minimalistic/ --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f7ea9b4..e8bbd40 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # python-bip32 -A basic implementation of [BIP-0032](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki). +A minimalistic implementation of [BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki). ## Usage From 471a4092cbe9fd4eda75502cec87d9d4936a4271 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Thu, 13 Nov 2025 12:45:10 -0500 Subject: [PATCH 2/5] Drop support for Python 3.8, test 3.13-14 in CI --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 9ca619d..d79cec5 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -10,7 +10,7 @@ jobs: tests: strategy: matrix: - python-version: [3.8, 3.9, '3.10', 3.11, 3.12] + python-version: [3.9, '3.10', 3.11, 3.12, 3.13, 3.14] os: - ubuntu-latest - macos-13 # (non-M1) From 6c6d67319a22b1ebe056f0228e0fa497a111d48f Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Thu, 13 Nov 2025 12:45:25 -0500 Subject: [PATCH 3/5] Correct typo in CI config --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d79cec5..49f6f32 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -62,7 +62,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Python 3.10 + - name: Set up Python 3.12 uses: actions/setup-python@v2 with: python-version: 3.12 From c5fff3de409de5c36f0027a0042768a26a5239e4 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Tue, 11 Mar 2025 11:36:29 -0400 Subject: [PATCH 4/5] Update python-package.yml --- .github/workflows/python-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 49f6f32..ce50597 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -34,7 +34,7 @@ jobs: brew install autoconf automake libffi libtool pkg-config python pip install -r requirements.txt - name: Install python-bip32 from source - run: python setup.py install + run: pip install . - name: Test with pytest run: | pip install -r tests/requirements.txt @@ -72,4 +72,4 @@ jobs: pip install setuptools pip install -r tests/requirements.txt pip install -I coincurve==${{ matrix.coincurve-version }} - python setup.py install + pip install . From 82554d256854a87caf1b4bc804bde83f9d1ee16f Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Thu, 13 Nov 2025 11:55:14 -0500 Subject: [PATCH 5/5] Migrate to pyproject.toml from setup.py / requirements.txt --- .github/workflows/python-package.yml | 11 ++----- bip32/__init__.py | 2 -- pyproject.toml | 34 +++++++++++++++++++++ requirements.txt | 1 - setup.py | 44 ---------------------------- 5 files changed, 36 insertions(+), 56 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ce50597..6ee9d2b 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -24,15 +24,8 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Install pip and setuptools - run: | - python -m pip install --upgrade pip - pip install setuptools - - name: On MacOS, install coincurve's dependencies and install it from wheels # FIXME: installing from source fails for some reason. - if: matrix.os == 'macos-latest' || matrix.os == 'macos-13' - run: | - brew install autoconf automake libffi libtool pkg-config python - pip install -r requirements.txt + - name: Upgrade pip + run: python -m pip install --upgrade pip - name: Install python-bip32 from source run: pip install . - name: Test with pytest diff --git a/bip32/__init__.py b/bip32/__init__.py index 29f40eb..7a60652 100644 --- a/bip32/__init__.py +++ b/bip32/__init__.py @@ -1,8 +1,6 @@ from .bip32 import BIP32, PrivateDerivationError, InvalidInputError from .utils import BIP32DerivationError, HARDENED_INDEX -__version__ = "4.0" - __all__ = [ "BIP32", "BIP32DerivationError", diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..a899f69 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,34 @@ +[build-system] +requires = ["setuptools>=77.0.3"] # Because of the license keys. See https://setuptools.pypa.io/en/stable/history.html#v77-0-3 +build-backend = "setuptools.build_meta" + +[project] +name = "bip32" +version = "4.0.0" +dependencies = [ + "coincurve>=15.0,<21", +] +requires-python = ">=3.8" +authors = [ + {name = "Antoine Poinsot", email = "darosior@protonmail.com"}, +] +maintainers = [ + {name = "Antoine Poinsot", email = "darosior@protonmail.com"}, +] +description = "Minimalistic implementation of BIP32 (Bitcoin HD wallets)" +readme = "README.md" +license = "BSD-3-Clause" +license-files = ["LICENCE"] +keywords = ["bitcoin", "key derivation", "HD wallet"] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + "Topic :: Security :: Cryptography", +] + +[project.urls] +Homepage = "https://github.com/darosior/python-bip32" +Repository = "https://github.com/darosior/python-bip32" +Issues = "https://github.com/darosior/python-bip32/issues" +"Bug Tracker" = "https://github.com/darosior/python-bip32/issues" +Changelog = "https://github.com/darosior/python-bip32/tree/master/CHANGELOG.md" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 2eba943..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -coincurve>=15.0,<21 diff --git a/setup.py b/setup.py deleted file mode 100644 index 21fc04a..0000000 --- a/setup.py +++ /dev/null @@ -1,44 +0,0 @@ -import io -import os - -from setuptools import setup - - -# Taken from https://github.com/pypa/pip/blob/003c7ac56b4da80235d4a147fbcef84b6fbc8248/setup.py#L7-L21 -def read(rel_path: str) -> str: - here = os.path.abspath(os.path.dirname(__file__)) - # intentionally *not* adding an encoding option to open, See: - # https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690 - with open(os.path.join(here, rel_path)) as fp: - return fp.read() - - -# Taken from https://github.com/pypa/pip/blob/003c7ac56b4da80235d4a147fbcef84b6fbc8248/setup.py#L7-L21 -def get_version(rel_path: str) -> str: - for line in read(rel_path).splitlines(): - if line.startswith("__version__"): - # __version__ = "0.9" - delim = '"' if '"' in line else "'" - return line.split(delim)[1] - raise RuntimeError("Unable to find version string.") - - -with io.open("README.md", encoding="utf-8") as f: - long_description = f.read() - -with io.open("requirements.txt", encoding="utf-8") as f: - requirements = [r for r in f.read().split('\n') if len(r)] - -setup(name="bip32", - # We use the first approach from https://packaging.python.org/en/latest/guides/single-sourcing-package-version - version=get_version("bip32/__init__.py"), - description="Minimalistic implementation of the BIP32 key derivation scheme", - long_description=long_description, - long_description_content_type="text/markdown", - url="http://github.com/darosior/python-bip32", - author="Antoine Poinsot", - author_email="darosior@protonmail.com", - license="MIT", - packages=["bip32"], - keywords=["bitcoin", "bip32", "hdwallet"], - install_requires=requirements)