Add pyproject.toml and poetry.lock for poetry dependency manager

pyproject.toml contains everything that was in the setup.py. The setup.py
file is replaced with the one that poetry automatically generates.
This commit is contained in:
Andrew Chow 2019-02-05 19:46:23 -05:00
parent 6e4ffcdd1b
commit d6b24b853d
3 changed files with 233 additions and 36 deletions

164
poetry.lock generated Normal file
View File

@ -0,0 +1,164 @@
[[package]]
category = "dev"
description = "Python graph (network) package"
name = "altgraph"
optional = false
python-versions = "*"
version = "0.16.1"
[[package]]
category = "main"
description = "ECDSA cryptographic signature library (pure python)"
name = "ecdsa"
optional = false
python-versions = "*"
version = "0.13"
[[package]]
category = "dev"
description = "Clean single-source support for Python 3 and 2"
name = "future"
optional = false
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
version = "0.17.1"
[[package]]
category = "main"
description = "A Cython interface to the hidapi from https://github.com/signal11/hidapi"
name = "hidapi"
optional = false
python-versions = "*"
version = "0.7.99.post21"
[package.dependencies]
setuptools = ">=19.0"
[[package]]
category = "main"
description = "Pure-python wrapper for libusb-1.0"
name = "libusb1"
optional = false
python-versions = "*"
version = "1.7"
[[package]]
category = "dev"
description = "Mach-O header analysis and editing"
name = "macholib"
optional = false
python-versions = "*"
version = "1.11"
[package.dependencies]
altgraph = ">=0.15"
[[package]]
category = "main"
description = "Implementation of Bitcoin BIP-0039"
name = "mnemonic"
optional = false
python-versions = "*"
version = "0.18"
[package.dependencies]
pbkdf2 = "*"
[[package]]
category = "main"
description = "PKCS#5 v2.0 PBKDF2 Module"
name = "pbkdf2"
optional = false
python-versions = "*"
version = "1.3"
[[package]]
category = "dev"
description = "Python PE parsing module"
name = "pefile"
optional = false
python-versions = "*"
version = "2018.8.8"
[package.dependencies]
future = "*"
[[package]]
category = "main"
description = "Pure-Python Implementation of the AES block-cipher and common modes of operation"
name = "pyaes"
optional = false
python-versions = "*"
version = "1.6.1"
[[package]]
category = "dev"
description = "PyInstaller bundles a Python application and all its dependencies into a single package."
name = "pyinstaller"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "3.4"
[package.dependencies]
altgraph = "*"
macholib = ">=1.8"
pefile = ">=2017.8.1"
setuptools = "*"
[[package]]
category = "dev"
description = "Enhanced version of python-jsonrpc for use with Bitcoin"
name = "python-bitcoinrpc"
optional = false
python-versions = "*"
version = "1.0"
[[package]]
category = "main"
description = ""
name = "pywin32-ctypes"
optional = true
python-versions = "*"
version = "0.2.0"
[[package]]
category = "main"
description = "Type Hints for Python"
name = "typing"
optional = false
python-versions = "*"
version = "3.6.6"
[[package]]
category = "main"
description = "Backported and Experimental Type Hints for Python 3.5+"
name = "typing-extensions"
optional = false
python-versions = "*"
version = "3.7.2"
[package.dependencies]
typing = ">=3.6.2"
[extras]
windist = ["pywin32-ctypes"]
[metadata]
content-hash = "f668b6352b31d2aa7cf5b0cf19b77d04b92821df3383c9105f75699bbe42aa2e"
python-versions = ">=3.5.6"
[metadata.hashes]
altgraph = ["d6814989f242b2b43025cba7161fc1b8fb487a62cd49c49245d6fd01c18ac997", "ddf5320017147ba7b810198e0b6619bd7b5563aa034da388cea8546b877f9b0c"]
ecdsa = ["40d002cf360d0e035cf2cb985e1308d41aaa087cbfc135b2dc2d844296ea546c", "64cf1ee26d1cde3c73c6d7d107f835fed7c6a2904aef9eac223d57ad800c43fa"]
future = ["67045236dcfd6816dc439556d009594abf643e5eb48992e36beac09c2ca659b8"]
hidapi = ["1ac170f4d601c340f2cd52fd06e85c5e77bad7ceac811a7bb54b529f7dc28c24", "6424ad75da0021ce8c1bcd78056a04adada303eff3c561f8d132b85d0a914cb3", "8d3be666f464347022e2b47caf9132287885d9eacc7895314fc8fefcb4e42946", "92878bad7324dee619b7832fbfc60b5360d378aa7c5addbfef0a410d8fd342c7", "b4b1f6aff0192e9be153fe07c1b7576cb7a1ff52e78e3f76d867be95301a8e87", "bf03f06f586ce7d8aeb697a94b7dba12dc9271aae92d7a8d4486360ff711a660", "c76de162937326fcd57aa399f94939ce726242323e65c15c67e183da1f6c26f7", "d4ad1e46aef98783a9e6274d523b8b1e766acfc3d72828cd44a337564d984cfa", "d4b5787a04613503357606bb10e59c3e2c1114fa00ee328b838dd257f41cbd7b", "e0be1aa6566979266a8fc845ab0e18613f4918cf2c977fe67050f5dc7e2a9a97", "edfb16b16a298717cf05b8c8a9ad1828b6ff3de5e93048ceccd74e6ae4ff0922"]
libusb1 = ["9d4f66d2ed699986b06bc3082cd262101cb26af7a76a34bd15b7eb56cba37e0f"]
macholib = ["ac02d29898cf66f27510d8f39e9112ae00590adb4a48ec57b25028d6962b1ae1", "c4180ffc6f909bf8db6cd81cff4b6f601d575568f4d5dee148c830e9851eb9db"]
mnemonic = ["02a7306a792370f4a0c106c2cf1ce5a0c84b9dbd7e71c6792fdb9ad88a727f1d"]
pbkdf2 = ["ac6397369f128212c43064a2b4878038dab78dab41875364554aaf2a684e6979"]
pefile = ["4c5b7e2de0c8cb6c504592167acf83115cbbde01fe4a507c16a1422850e86cd6"]
pyaes = ["02c1b1405c38d3c370b085fb952dd8bea3fadcee6411ad99f312cc129c536d8f"]
pyinstaller = ["a5a6e04a66abfcf8761e89a2ebad937919c6be33a7b8963e1a961b55cb35986b"]
python-bitcoinrpc = ["a6a6f35672635163bc491c25fe29520bdd063dedbeda3b37bf5be97aa038c6e7"]
pywin32-ctypes = ["24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942", "9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"]
typing = ["4027c5f6127a6267a435201981ba156de91ad0d1d98e9ddc2aa173453453492d", "57dcf675a99b74d64dacf6fba08fb17cf7e3d5fdff53d4a30ea2a5e7e52543d4", "a4c8473ce11a65999c8f59cb093e70686b6c84c98df58c1dae9b3b196089858a"]
typing-extensions = ["07b2c978670896022a43c4b915df8958bec4a6b84add7f2c87b2b728bda3ba64", "f3f0e67e1d42de47b5c67c32c9b26641642e9170fe7e292991793705cd5fef7c", "fb2cd053238d33a8ec939190f30cfd736c00653a85a2919415cecf7dc3d9da71"]

35
pyproject.toml Normal file
View File

@ -0,0 +1,35 @@
[tool.poetry]
name = "hwi"
version = "0.0.5"
description = "A library for working with Bitcoin hardware wallets"
authors = ["Andrew Chow <andrew@achow101.com>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/bitcoin-core/HWI"
homepage = "https://github.com/bitcoin-core/HWI"
exclude = ["docs/", "test/"]
include = ["hwilib/**/*.py"]
[tool.poetry.dependencies]
python = ">=3.5.6"
hidapi = "^0.7.99"
ecdsa = "^0.13.0"
pyaes = "^1.6"
pywin32-ctypes = {version = "^0.2.0", optional = true}
mnemonic = "^0.18.0"
typing-extensions = "^3.7"
libusb1 = "^1.7"
[tool.poetry.dev-dependencies]
pyinstaller = "^3.4"
python-bitcoinrpc = "^1.0"
[tool.poetry.extras]
windist = ["pywin32-ctypes"]
[tool.poetry.scripts]
hwi = 'hwilib.cli:main'
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

View File

@ -1,38 +1,36 @@
import setuptools
# -*- coding: utf-8 -*-
from distutils.core import setup
with open("README.md", "r") as fh:
long_description = fh.read()
modules = \
['hwi']
install_requires = \
['ecdsa>=0.13.0,<0.14.0',
'hidapi>=0.7.99,<0.8.0',
'libusb1>=1.7,<2.0',
'mnemonic>=0.18.0,<0.19.0',
'pyaes>=1.6,<2.0',
'typing-extensions>=3.7,<4.0']
setuptools.setup(
name="hwi",
version="0.0.5",
author="Andrew Chow",
author_email="andrew@achow101.com",
description="A library for working with Bitcoin hardware wallets",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/bitcoin-core/hwi",
packages=setuptools.find_packages(exclude=['docs', 'test']),
install_requires=[
'hidapi', # HID API needed in general
'pyaes',
'ecdsa', # Needed for Ledger but their library does not install it
'typing_extensions>=3.7',
'mnemonic>=0.18.0',
'libusb1'
],
python_requires='>=3',
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
extras_require={
'tests': ['python-bitcoinrpc']
},
entry_points={
'console_scripts': [
'hwi = hwilib.cli:main'
]
}
)
extras_require = \
{'windist': ['pywin32-ctypes>=0.2.0,<0.3.0']}
entry_points = \
{'console_scripts': ['hwi = hwilib.cli:main']}
setup_kwargs = {
'name': 'hwi',
'version': '0.0.5',
'description': 'A library for working with Bitcoin hardware wallets',
'long_description': '# Bitcoin Hardware Wallet Interaction scripts\n\n[![Build Status](https://travis-ci.org/bitcoin-core/HWI.svg?branch=master)](https://travis-ci.org/bitcoin-core/HWI)\n\nThis project contains several scripts for interacting with Bitcoin hardware wallets.\n\n## Prerequisites\n\nPython 3 is required. The libraries and udev rules for each device must also be installed.\n\nInstall all of the libraries using `pip` (in virtualenv or system):\n\n```\npip3 install hidapi # HID API needed in general\npip3 install trezor[hidapi] # Trezor One\npip3 install btchip-python # Ledger Nano S\npip3 install ecdsa # Needed for btchip-python but is not installed by it\npip3 install keepkey # KeepKey\npip3 install ckcc-protocol[cli] # Coldcard\npip3 install pyaes # For digitalbitbox\n```\n## Install\n\n```\ngit clone https://github.com/bitcoin-core/HWI.git\ncd HWI\n```\n\n## Usage\n\nTo use, first enumerate all devices and find the one that you want to use with\n\n```\n./hwi.py enumerate\n```\n\nOnce the device type and device path is known, issue commands to it like so:\n\n```\n./hwi.py -t <type> -d <path> <command> <command args>\n```\n\n## Device Support\n\nThe below table lists what devices and features are supported for each device.\n\nPlease also see [docs](docs/) for additional information about each device.\n\n| Feature \\ Device | Ledger Nano S | Trezor One | Digital BitBox | KeepKey | Coldcard |\n|:---:|:---:|:---:|:---:|:---:|:---:|\n| Support Planned | Yes | Yes | Yes | Yes | Yes |\n| Implemented | Yes | Yes | Yes | Yes | Yes |\n| xpub retrieval | Yes | Yes | Yes | Yes | Yes |\n| Message Signing | Yes | Yes | Yes | Yes | Yes |\n| Device Setup | N/A | Yes | Yes | Yes | N/A |\n| Device Wipe | N/A | Yes | Yes | Yes | N/A |\n| Device Recovery | N/A | Yes | N/A | Yes | N/A |\n| Device Backup | N/A | N/A | Yes | N/A | Yes |\n| P2PKH Inputs | Yes | Yes | Yes | Yes | Yes |\n| P2SH-P2WPKH Inputs | Yes | Yes | Yes | Yes | Yes |\n| P2WPKH Inputs | Yes | Yes | Yes | Yes | Yes |\n| P2SH Multisig Inputs | Yes | Yes | Yes | Yes | N/A |\n| P2SH-P2WSH Multisig Inputs | Yes | No | Yes | No | N/A |\n| P2WSH Multisig Inputs | Yes | No | Yes | Yes | N/A |\n| Bare Multisig Inputs | Yes | N/A | Yes | N/A | N/A |\n| Aribtrary scriptPubKey Inputs | Yes | N/A | Yes | N/A | N/A |\n| Aribtrary redeemScript Inputs | Yes | N/A | Yes | N/A | N/A |\n| Arbitrary witnessScript Inputs | Yes | N/A | Yes | N/A | N/A |\n| Non-wallet inputs | Yes | Yes | Yes | Yes | Yes |\n| Mixed Segwit and Non-Segwit Inputs | N/A | Yes | Yes | Yes | Yes |\n| Display on device screen | Yes | Yes | N/A | Yes | Yes |\n\n## Using with Bitcoin Core\n\nSee [Using Bitcoin Core with Hardware Wallets](docs/bitcoin-core-usage.md).\n\n## License\n\nThis project is available under the MIT License, Copyright Andrew Chow.\n',
'author': 'Andrew Chow',
'author_email': 'andrew@achow101.com',
'url': 'https://github.com/bitcoin-core/HWI',
'py_modules': modules,
'install_requires': install_requires,
'extras_require': extras_require,
'entry_points': entry_points,
'python_requires': '>=3.5.6',
}
setup(**setup_kwargs)