diff --git a/MANIFEST.in b/MANIFEST.in index 22b60bd..7bdab90 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ include README.md LICENSE include test/test-release.sh include test/unit_tests_d/*.py +include mmgen_node_tools/data/* diff --git a/README.md b/README.md index 2fab8f7..904c4d4 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ Then, $ git clone https://github.com/mmgen/mmgen-node-tools $ cd mmgen-node-tools - $ sudo ./setup.py install + $ python3 -m build --no-isolation + $ python3 -m pip install --user dist/*.whl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mmgen/node_tools/BlocksInfo.py b/mmgen_node_tools/BlocksInfo.py similarity index 99% rename from mmgen/node_tools/BlocksInfo.py rename to mmgen_node_tools/BlocksInfo.py index 8e12861..3dde787 100644 --- a/mmgen/node_tools/BlocksInfo.py +++ b/mmgen_node_tools/BlocksInfo.py @@ -17,7 +17,7 @@ # this program. If not, see . """ -mmgen.node_tools.BlocksInfo: Display information about a block or range of blocks +mmgen_node_tools.BlocksInfo: Display information about a block or range of blocks """ import re,json diff --git a/mmgen/node_tools/Sound.py b/mmgen_node_tools/Sound.py similarity index 96% rename from mmgen/node_tools/Sound.py rename to mmgen_node_tools/Sound.py index ba59a24..271253c 100644 --- a/mmgen/node_tools/Sound.py +++ b/mmgen_node_tools/Sound.py @@ -16,11 +16,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . """ -mmgen.node_tools.Sound: audio-related functions for MMGen node tools +mmgen_node_tools.Sound: audio-related functions for MMGen node tools """ import sys,os,time -from mmgen.node_tools.Util import * +from mmgen_node_tools.Util import * _alsa_config_file = '/tmp/alsa-config-' + os.path.basename(sys.argv[0]) _dvols = { 'Master': 78, 'Speaker': 78, 'Headphone': 15, 'PCM': 190 } diff --git a/mmgen/node_tools/Term.py b/mmgen_node_tools/Term.py similarity index 95% rename from mmgen/node_tools/Term.py rename to mmgen_node_tools/Term.py index 95111a0..7b5b7e0 100644 --- a/mmgen/node_tools/Term.py +++ b/mmgen_node_tools/Term.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . """ -mmgen.node_tools.Term: terminal routines for MMGen node tools +mmgen_node_tools.Term: terminal routines for MMGen node tools """ import sys,os,termios diff --git a/mmgen/node_tools/Util.py b/mmgen_node_tools/Util.py similarity index 98% rename from mmgen/node_tools/Util.py rename to mmgen_node_tools/Util.py index fb7e318..2a67fe2 100644 --- a/mmgen/node_tools/Util.py +++ b/mmgen_node_tools/Util.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . """ -mmgen.node_tools.Util: utility functions for MMGen node tools +mmgen_node_tools.Util: utility functions for MMGen node tools """ import time,subprocess diff --git a/mmgen/node_tools/__init__.py b/mmgen_node_tools/__init__.py similarity index 100% rename from mmgen/node_tools/__init__.py rename to mmgen_node_tools/__init__.py diff --git a/mmgen_node_tools/data/keywords b/mmgen_node_tools/data/keywords new file mode 100644 index 0000000..3c3c563 --- /dev/null +++ b/mmgen_node_tools/data/keywords @@ -0,0 +1 @@ +Bitcoin, BTC, Ethereum, ETH, Monero, XMR, ERC20, cryptocurrency, wallet, BIP32, cold storage, offline, online, spending, open-source, command-line, Python, Linux, Bitcoin Core, bitcoind, hd, deterministic, hierarchical, secure, anonymous, Electrum, seed, mnemonic, brainwallet, Scrypt, utility, script, scriptable, blockchain, raw, transaction, permissionless, console, terminal, curses, ansi, color, tmux, remote, client, daemon, RPC, json, entropy, xterm, rxvt, PowerShell, MSYS, MSYS2, MinGW, MinGW64, MSWin, Armbian, Raspbian, Raspberry Pi, Orange Pi, BCash, BCH, Litecoin, LTC, altcoin, ZEC, Zcash, DASH, Dashpay, SHA256Compress, monerod, EMC, Emercoin, token, deploy, contract, gas, fee, smart contract, solidity, Parity, OpenEthereum, testnet, devmode, Kovan diff --git a/mmnode-blocks-info b/mmnode-blocks-info index 62e1a59..fc43706 100755 --- a/mmnode-blocks-info +++ b/mmnode-blocks-info @@ -21,7 +21,7 @@ mmnode-blocks-info: Display information about a block or range of blocks """ from mmgen.common import * -from mmgen.node_tools.BlocksInfo import BlocksInfo,JSONBlocksInfo +from mmgen_node_tools.BlocksInfo import BlocksInfo,JSONBlocksInfo opts_data = { 'sets': [ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..374b58c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + "setuptools>=42", + "wheel" +] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..d11eae6 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,36 @@ +[metadata] +name = MMGen Node Tools +version = 0.0.3 +description = Optional online tools for the MMGen wallet suite +long_description = file: README.md +long_description_content_type = text/markdown +author = The MMGen Project +author_email = mmgen@tuta.io +url = https://github.com/mmgen/mmgen-node-tools +license = GNU GPL v3 +platforms = Linux, Armbian, Raspbian, MS Windows +keywords = file: mmgen_node_tools/data/keywords +project_urls = + Bug Tracker = https://github.com/mmgen/mmgen-node-tools/issues +classifiers = + Programming Language :: Python :: 3 + License :: OSI Approved :: GNU General Public License v3 (GPLv3) + Operating System :: POSIX :: Linux + Operating System :: Microsoft :: Windows + +[options] +python_requires = >=3.7 +include_package_data = True + +install_requires = + mmgen>=0.12.2 + +packages = + mmgen_node_tools + +scripts = + mmnode-blocks-info + mmnode-feeview + mmnode-halving-calculator + mmnode-netrate + mmnode-peerblocks diff --git a/setup.py b/setup.py deleted file mode 100755 index 4d12521..0000000 --- a/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python3 -# -# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2016 Philemon -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -import os -from distutils.core import setup -from mmgen.globalvars import g - -os.umask(0o0022) - -setup( - name = 'mmgen-node-tools', - description = 'Optional tools for the MMGen wallet system', - version = g.version, - author = g.author, - author_email = g.email, - url = g.proj_url, - license = 'GNU GPL v3', - platforms = ('Linux, Armbian, Raspbian, MS Windows'), - keywords = g.keywords, - packages = ['mmgen.node_tools'], - scripts = [ - 'mmnode-blocks-info', - 'mmnode-feeview', - 'mmnode-halving-calculator', - 'mmnode-netrate', - 'mmnode-peerblocks', - ], -# data_files = [('share/mmgen/node_tools/audio', [ -# 'data_files/audio/ringtone.wav', # source files must have 0644 mode -# 'data_files/audio/Positive.wav', -# 'data_files/audio/Rhodes.wav', -# 'data_files/audio/Counterpoint.wav' -# ]) -# ], - ) diff --git a/test/unit_tests_d/nt_BlocksInfo.py b/test/unit_tests_d/nt_BlocksInfo.py index da411f4..1448e97 100755 --- a/test/unit_tests_d/nt_BlocksInfo.py +++ b/test/unit_tests_d/nt_BlocksInfo.py @@ -6,7 +6,7 @@ test.unit_tests_d.nt_BlocksInfo: from mmgen.common import * from mmgen.exception import * -from mmgen.node_tools.BlocksInfo import BlocksInfo +from mmgen_node_tools.BlocksInfo import BlocksInfo tip = 50000 range_vecs = (