-
Notifications
You must be signed in to change notification settings - Fork 9
Perform sanity checks with Python3 #25
base: master
Are you sure you want to change the base?
Changes from 5 commits
d6ec40b
f837ad5
5e75e2e
6692705
365e066
cb5ad42
0b1bbf8
91f89af
81ffc18
98eccb6
e74d2ee
81a82b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ Most use cases for micropayments involve a single user or device interacting | |
repeatedly with a few vendors. | ||
|
||
## Prerequisites | ||
`iota-swarm-node`, compatible with Python3+ as well as depending on [Pyota](https://github.com/iotaledger/iota.lib.py) is theoretically available for both Python 3.5 and 3.6; yet, our testing result indicates that the environment for Python 3.6 is invalid in this case. Details as [Pyota issue#203](https://github.com/iotaledger/iota.lib.py/issues/203). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct the wording: "invalid" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove "theoretically". Instead, it would be "expectedly" or something alike. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove "as well". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rewrite the abobe wording to
|
||
|
||
Install dependent packages: | ||
```shell | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
PYTHON = python3.5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The detection is not correct. If python is built from source, only file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The coverage about Python 3.7 is not addressed yet. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You shall always try to build Python from source and check how its directory structure is. |
||
PYTHON := $(shell which $(PYTHON)) | ||
ifndef PYTHON | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add extra condition if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If |
||
$(error "python3.5 is required.") | ||
endif | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No blank line here. |
||
# check "iota" module in Python installation | ||
PY_CHECK_MOD_IOTA := $(shell $(PYTHON) -c "import iota" 2>/dev/null && \ | ||
echo 1 || echo 0) | ||
ifneq ("$(PY_CHECK_MOD_IOTA)","1") | ||
$(error "dependency error $@ because PyOTA is not installed, to install the latest version: pip3 install pyota") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If Python executable is restricted, the validation of |
||
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is
PyOTA
instead ofPyota
.