Skip to content

Commit 88ac423

Browse files
committed
Try to solve the imcompatable problem
from mazaclub#5
1 parent dce3151 commit 88ac423

7 files changed

Lines changed: 46 additions & 21 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33
*.coinscript
44
*.conf
55
Hashmal*.egg-info
6+
# Built package
7+
build/
8+
dist/

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,28 @@ Hashmal is intended for cryptocurrency developers and power users.
2323
- When editing scripts, put something in double quotation marks to ensure it's interpreted as text rather than hex data.
2424
- You can quickly evaluate the script you're working on via *Script > Evaluate* in the menubar.
2525

26+
## Libraries
27+
To run the application you must use / have installed:
28+
- Python 2.7
29+
- PyQt4
30+
### PyQt4
31+
You can install PyQt4 if you use Anaconda with the following command
32+
```
33+
conda install pyqt=4
34+
```
35+
If you use Debian / Ubuntu, you can use the following command
36+
```
37+
sudo apt install pyqt4-dev-tools
38+
```
39+
Installation instructions for other platforms:
40+
[https://www.riverbankcomputing.com/software/pyqt/download](https://www.riverbankcomputing.com/software/pyqt/download)
41+
### Installation
42+
After that, use `setup.py` to build / install the application
43+
```
44+
python setup.py install
45+
```
46+
This will install the external module requirements listed in `requirements.txt` too
47+
2648
## Documentation
2749

2850
See the file `doc/usage.adoc` for basic instructions. See the [Hashmal wiki on Github](https://github.com/mazaclub/hashmal/wiki) for details.

hashmal_lib/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
import sys
22

3-
from PyQt4.QtGui import QApplication
4-
5-
from main_window import HashmalMain
6-
73

84
class HashmalGui(object):
95
def __init__(self):
6+
from PyQt4.QtGui import QApplication
107
super(HashmalGui, self).__init__()
118
self.app = QApplication(sys.argv)
129

1310
def main(self):
11+
from main_window import HashmalMain
1412
self.main_window = HashmalMain(self.app)
1513
self.main_window.show()
1614
sys.exit(self.app.exec_())

hashmal_lib/entry_points.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
hashmal_entry_points = {
2+
'hashmal.plugin': [
3+
'Address Encoder = hashmal_lib.plugins.addr_encoder:make_plugin',
4+
'Block Analyzer = hashmal_lib.plugins.block_analyzer:make_plugin',
5+
'Blockchain = hashmal_lib.plugins.blockchain:make_plugin',
6+
'Chainparams = hashmal_lib.plugins.chainparams:make_plugin',
7+
'Item Types = hashmal_lib.plugins.item_types:make_plugin',
8+
'Log = hashmal_lib.plugins.log:make_plugin',
9+
'Script Generator = hashmal_lib.plugins.script_gen:make_plugin',
10+
'Stack Evaluator = hashmal_lib.plugins.stack:make_plugin',
11+
'Transaction Analyzer = hashmal_lib.plugins.tx_analyzer:make_plugin',
12+
'Transaction Builder = hashmal_lib.plugins.tx_builder:make_plugin',
13+
'Variables = hashmal_lib.plugins.variables:make_plugin',
14+
'Wallet RPC = hashmal_lib.plugins.wallet_rpc:make_plugin'
15+
]
16+
}

hashmal_lib/gui_utils.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -243,22 +243,7 @@ def setReadOnly( self, state ):
243243
readOnly = QtCore.pyqtProperty(bool, isReadOnly, setReadOnly)
244244

245245

246-
hashmal_entry_points = {
247-
'hashmal.plugin': [
248-
'Address Encoder = hashmal_lib.plugins.addr_encoder:make_plugin',
249-
'Block Analyzer = hashmal_lib.plugins.block_analyzer:make_plugin',
250-
'Blockchain = hashmal_lib.plugins.blockchain:make_plugin',
251-
'Chainparams = hashmal_lib.plugins.chainparams:make_plugin',
252-
'Item Types = hashmal_lib.plugins.item_types:make_plugin',
253-
'Log = hashmal_lib.plugins.log:make_plugin',
254-
'Script Generator = hashmal_lib.plugins.script_gen:make_plugin',
255-
'Stack Evaluator = hashmal_lib.plugins.stack:make_plugin',
256-
'Transaction Analyzer = hashmal_lib.plugins.tx_analyzer:make_plugin',
257-
'Transaction Builder = hashmal_lib.plugins.tx_builder:make_plugin',
258-
'Variables = hashmal_lib.plugins.variables:make_plugin',
259-
'Wallet RPC = hashmal_lib.plugins.wallet_rpc:make_plugin'
260-
]
261-
}
246+
from entry_points import hashmal_entry_points
262247

263248

264249
required_plugins = ['Chainparams', 'Item Types', 'Log', 'Stack Evaluator', 'Variables']

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
python-bitcoinlib
22
pyparsing
3+
requests

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from setuptools import setup
2-
from hashmal_lib.gui_utils import hashmal_entry_points
2+
from hashmal_lib.entry_points import hashmal_entry_points
33

44
with open('requirements.txt') as f:
55
requirements = f.readlines()

0 commit comments

Comments
 (0)