Skip to content

Commit

Permalink
build: Switch to poetry. Bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkozlik committed Apr 26, 2024
1 parent c919df7 commit c68bbb9
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 64 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ __pycache__

*.swp
*.py[co]
poetry.lock
14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
PYTHON=python3
SETUP=$(PYTHON) setup.py
POETRY=poetry


build:
$(SETUP) build
$(POETRY) build

install:
$(SETUP) install

dist: clean
$(SETUP) sdist
$(SETUP) bdist_wheel
$(POETRY) install

clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts

Expand Down Expand Up @@ -42,7 +38,7 @@ style_check:

style:
black shamir_mnemonic/ *.py
isort -y --recursive shamir_mnemonic/ *.py
isort shamir_mnemonic/ *.py


.PHONY: dist clean clean-build clean-pyc clean-test test style_check style
.PHONY: clean clean-build clean-pyc clean-test test style_check style
9 changes: 8 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,16 @@ With pip from GitHub:
From local checkout for development:

Install the [Poetry](https://python-poetry.org/) tool, checkout
`python-shamir-mnemonic` from git, and enter the poetry shell:

.. code-block:: console
$ python3 setup.py develop
$ pip3 install poetry
$ git clone https://github.com/trezor/python-shamir-mnemonic
$ cd python-shamir-mnemonic
$ poetry install
$ poetry shell
CLI usage
---------
Expand Down
25 changes: 25 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[tool.poetry]
name = "shamir-mnemonic"
version = "0.2.3"
description = "SLIP-39 Shamir Mnemonics"
authors = ["Trezor <[email protected]>"]
license = "MIT"
readme = [
"README.rst",
"CHANGELOG.rst",
]

[tool.poetry.dependencies]
python = ">=3.8.1"
click = ">=7,<9"

[tool.poetry.group.dev.dependencies]
bip32utils = "^0.3.post4"
pytest = "^6.1.0"
black = ">=24.2"
flake8 = "*"
isort = "^5"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
53 changes: 0 additions & 53 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion shamir_mnemonic/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RADIX_BITS = 10
"""The length of the radix in bits."""

RADIX = 2 ** RADIX_BITS
RADIX = 2**RADIX_BITS
"""The number of words in the wordlist."""

ID_LENGTH_BITS = 15
Expand Down

0 comments on commit c68bbb9

Please sign in to comment.