Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
python-version: [
"3.7", "3.8", "3.9", "3.10", "3.11"
"3.8", "3.9", "3.10", "3.11", "3.12", "3.13"
]
steps:
- uses: actions/checkout@master
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
push:
branches:
- master

jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/python-hdwallet-slip39
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
- name: Build
run: |
python -m pip install -r requirements-dev.txt
python -m build .
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ make.bat
Makefile

# Folders stuff
env/
experiment/
.idea/
.tox/
.vs/

# Setuptools stuff
build/
Expand All @@ -18,3 +20,5 @@ __pycache__/

# py.test stuff
.pytest_cache/
*~
.#*
41 changes: 26 additions & 15 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
SHELL = /bin/bash
PY3 ?= $(shell python3 --version >/dev/null 2>&1 && echo python3 || echo python )
VERSION = $(shell $(PY3) -c 'from hdwallet import __version__; print( __version__.strip("v"))')
PY3_V = $(shell $(PY3) -c "import sys; print('-'.join((next(iter(filter(None,sys.executable.split('/')))),sys.platform,sys.implementation.cache_tag)))" 2>/dev/null )
VERSION = $(shell $(PY3) -c 'exec(open("hdwallet/version.py", "r").read()); print( __version__.strip("v"))')
WHEEL = dist/hdwallet-$(VERSION)-py3-none-any.whl

PY3TEST = $(PY3) -m pytest

GHUB_NAME = python-hdwallet
VENV_DIR = $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/.. )
VENV_NAME = $(GHUB_NAME)-$(VERSION)-$(PY3_V)
VENV = $(VENV_DIR)/$(VENV_NAME)
VENV_OPTS =

NIX_OPTS ?= # --pure

.PHONY: all test build build-check wheel install-dev install clean FORCE

all: build
Expand All @@ -19,28 +28,30 @@ test-%:
unit-%:
$(PY3TEST) -k $*

build: clean wheel
nix-%:
nix-shell $(NIX_OPTS) --run "make $*"

build-check:
@$(PY3) -m build --version \
|| ( \
echo -e "\n\n!!! Missing Python modules; run:"; \
echo -e "\n\n $(PY3) -m pip install --upgrade pip setuptools wheel build\n"; \
false; \
)
build: clean wheel

wheel: $(WHEEL)

$(WHEEL): build-check FORCE
$(WHEEL): FORCE
$(PY3) -m pip install -r requirements-dev.txt
$(PY3) -m build
@ls -last dist

# Install from wheel, including all optional extra dependencies (except dev)
install-dev: $(WHEEL) FORCE
$(PY3) -m pip install --upgrade $<[tests]

install: $(WHEEL) FORCE
$(PY3) -m pip install --force-reinstall $<[cli,docs]
$(PY3) -m pip install --force-reinstall .[cli,docs]

clean:
@rm -rf build dist *.egg-info $(shell find . -name '__pycache__' )

venv: $(VENV)
@echo; echo "*** Activating $< VirtualEnv for Interactive $(SHELL)"
@bash --init-file $</bin/activate -i

$(VENV):
@echo; echo "*** Building $@ VirtualEnv..."
@rm -rf $@ && $(PY3) -m venv $(VENV_OPTS) $@ \
&& source $@/bin/activate \
&& make install
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include LICENSE
include README.md
include requirements.txt
include requirements*.txt

global-exclude *~
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Hierarchical Deterministic Wallet

> Note: This hdwallet-slip39 package is a temporary upgrade shim for the great hdwallet package
> https://pypi.org/project/hdwallet/.

> Use it only until the upstream hdwallet package merges support for BSC, Nix, etc in :
> https://github.com/meherett/python-hdwallet/pull/1020

> Until then, substitute "hdwallet-slip39" for "hdwallet" in your "pip install" or requirements.txt
> Both supply the hdwallet package, eg. "import hdwallet". Specify version >= 2.3 to ensure you are
> using this shim.

[![Build Status](https://app.travis-ci.com/meherett/python-hdwallet.svg?branch=master)](https://app.travis-ci.com/meherett/python-hdwallet)
[![PyPI Version](https://img.shields.io/pypi/v/hdwallet.svg?color=blue)](https://pypi.org/project/hdwallet)
[![Documentation Status](https://readthedocs.org/projects/hdwallet/badge/?version=master)](https://hdwallet.readthedocs.io)
Expand Down
62 changes: 62 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{ pkgs ? import ./nixpkgs.nix {} }:

with pkgs;

let
in
{
py313 = stdenv.mkDerivation rec {
name = "python313-with-pytest";

buildInputs = [
git
openssh
python313
python313Packages.pytest
];
};

py312 = stdenv.mkDerivation rec {
name = "python312-with-pytest";

buildInputs = [
git
openssh
python312
python312Packages.pytest
];
};

py311 = stdenv.mkDerivation rec {
name = "python311-with-pytest";

buildInputs = [
git
openssh
python311
python311Packages.pytest
];
};

py310 = stdenv.mkDerivation rec {
name = "python310-with-pytest";

buildInputs = [
git
openssh
python310
python310Packages.pytest
];
};

py39 = stdenv.mkDerivation rec {
name = "python39-with-pytest";

buildInputs = [
git
openssh
python39
python39Packages.pytest
];
};
}
6 changes: 5 additions & 1 deletion hdwallet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
)

# HDWallet Information's
__version__: str = "v2.2.1"
from .version import (
__version__,
__version_info__
)
__license__: str = "MIT"
__author__: str = "Meheret Tesfaye Batu"
__email__: str = "meherett.batu@gmail.com"
Expand All @@ -19,6 +22,7 @@

__all__: list = [
"__version__",
"__version_info__",
"__license__",
"__author__",
"__email__",
Expand Down
Loading