Browse Source

docs: Remove now-confusing mentions of virtualenv

master
Carl Dong 3 years ago
parent
commit
11ddec7841
  1. 16
      docs/INSTALL.md
  2. 2
      docs/TESTING.md
  3. 2
      docs/onion-message-channels.md
  4. 2
      jmclient/jmclient/wallet_utils.py
  5. 2
      scripts/obwatch/ob-watcher.py
  6. 2
      test/run_tests.sh

16
docs/INSTALL.md

@ -24,7 +24,7 @@ is actually newer in version number, than what was there already.
To install everything (client and server), install these packages:
sudo apt-get install python3-dev python3-pip git build-essential automake pkg-config libtool libffi-dev libssl-dev
sudo apt-get install python3-dev python3-pip python3-venv git build-essential automake pkg-config libtool libffi-dev libssl-dev
(+ `libsodium-dev` if you can find it, else build after)
@ -46,8 +46,7 @@ Then install this repo:
Then:
sudo pip install virtualenv
virtualenv --python=python3 jmvenv
python3 -m venv jmvenv
source jmvenv/bin/activate
**At this point you should see `(jmvenv)` at the beginning of your command prompt.**
@ -72,7 +71,7 @@ Then build and install a local copy of libsecp256k1 for python-bitcointx:
#### Installing packages to run everything in-one:
> *NOTE*: It is very important to have activated virtualenv before running this step. Otherwise, `pip install` will fail, you may be tempted to re-run it with `sudo pip install` which will cause problems in the future.
> *NOTE*: It is very important to have activated the virtual environment before running this step. Otherwise, `pip install` will fail, you may be tempted to re-run it with `sudo pip install` which will cause problems in the future.
pip install -r requirements/base.txt
@ -112,10 +111,9 @@ If you have installed this "full" version of the client, you can use it with the
git clone https://github.com/Joinmarket-Org/joinmarket-clientserver
cd joinmarket-clientserver
```
6) Create virtualenv "jmvenv"
6) Create virtual environment "jmvenv"
```sh
sudo pip3 install virtualenv
virtualenv jmvenv
python3 -m venv jmvenv
source jmvenv/bin/activate
```
At this point you should see `(jmvenv)` at the beginning of your command prompt.
@ -235,7 +233,7 @@ If you installed using WSL, the following configuration is necessary:
> note: you need to have installed JoinMarket with Qt support (see [this](../README.md#joinmarket-qt) section in the readme file)
1. In Ubuntu, install additional dependencies `sudo apt install libgl1-mesa-glx`.
2. Download and install [MobaXterm](https://mobaxterm.mobatek.net). This program needs to be running before you can start JoinMarket-Qt. It requires no additional configuration.
3. Open WSL-Ubuntu session in MobaXTerm. Go to JoinMarket directory and run `source jmvenv/bin/activate` to activate Python virtualenv.
3. Open WSL-Ubuntu session in MobaXTerm. Go to JoinMarket directory and run `source jmvenv/bin/activate` to activate the Python virtual environment.
4. You can now start JoinMarket-Qt as described [here](JOINMARKET-QT-GUIDE.md).
If you find that the program crashes with `qt.qpa.plugin: Could not load the Qt platform plugin`, you can add Qt5 dependencies with `sudo apt install qtbase5-dev` and try again.
@ -286,7 +284,7 @@ do not run the `python setupall.py` commands above. Instead run:
python setupall.py --develop
The normal installation (`--daemon` or `--client-bitcoin`) would install the JoinMarket
packages to the virtualenv's `site-packages` directory. This would mean any changes you make to
packages to the virtual environment's `site-packages` directory. This would mean any changes you make to
the local code would not have effect until the packages are reinstalled.
Using `--develop` causes a `.egg-link` file to be added to `site-packages` for each package.

2
docs/TESTING.md

@ -1,6 +1,6 @@
### Test instructions (for developers):
Work in your `jmvenv` virtualenv as for all Joinmarket work. Make sure to have [bitcoind](https://bitcoin.org/en/full-node) 0.18 or newer installed. Also need miniircd installed to the root (i.e. in your `joinmarket-clientserver` directory):
Work in your `jmvenv` virtual environment as for all Joinmarket work. Make sure to have [bitcoind](https://bitcoin.org/en/full-node) 0.18 or newer installed. Also need miniircd installed to the root (i.e. in your `joinmarket-clientserver` directory):
(jmvenv)$ cd /path/to/joinmarket-clientserver
(jmvenv)$ git clone https://github.com/Joinmarket-Org/miniircd

2
docs/onion-message-channels.md

@ -156,7 +156,7 @@ but in any case, very high uptime. For reliability it also makes sense to config
The currently suggested way to run a directory node is to use the [`start-dn.py` script](https://github.com/JoinMarket-Org/custom-scripts/blob/master/start-dn.py); you can place it in your `joinmarket-clientserver/scripts` directory and run it with a message argument to be sent as part of the connection handshake, for example: 'Greetings from Directory Node' and one option flag: `--datadir=/your/chosen/datadir` (as you'll see below).
This slightly unobvious approach is based on the following ideas: we run a Joinmarket script, with a Joinmarket python virtualenv, so that we are able to parse messages; this means that the directory node *can* be a bot, e.g. a maker bot, but need not be - and here it is basically a "crippled" maker bot that cannot do anything. This 'crippling' is actually very useful because (a) we use the `no-blockchain` argument (it is forced in-code; you don't need to set it) so we don't need a running Bitcoin node (of whatever flavour), and (b) we don't need a wallet either.
This slightly unobvious approach is based on the following ideas: we run a Joinmarket script, with a Joinmarket python virtual environment, so that we are able to parse messages; this means that the directory node *can* be a bot, e.g. a maker bot, but need not be - and here it is basically a "crippled" maker bot that cannot do anything. This 'crippling' is actually very useful because (a) we use the `no-blockchain` argument (it is forced in-code; you don't need to set it) so we don't need a running Bitcoin node (of whatever flavour), and (b) we don't need a wallet either.
#### Joinmarket-specific configuration

2
jmclient/jmclient/wallet_utils.py

@ -1095,7 +1095,7 @@ def wallet_fetch_history(wallet, options):
jmprint('(as if yield generator was a bank account)')
except ImportError:
jmprint('scipy not installed, unable to predict accumulation rate')
jmprint('to add it to this virtualenv, use `pip install scipy`')
jmprint('to add it to this virtual environment, use `pip install scipy`')
# includes disabled utxos in accounting:
total_wallet_balance = sum(wallet.get_balance_by_mixdepth(

2
scripts/obwatch/ob-watcher.py

@ -36,7 +36,7 @@ try:
import matplotlib
except:
log.warning("matplotlib not found, charts will not be available. "
"Do `pip install matplotlib` in the joinmarket virtualenv.")
"Do `pip install matplotlib` in the joinmarket virtual environment.")
if 'matplotlib' in sys.modules:
# https://stackoverflow.com/questions/2801882/generating-a-png-with-matplotlib-when-display-is-undefined

2
test/run_tests.sh

@ -165,7 +165,7 @@ run_jm_tests ()
fi
if [[ -z "${VIRTUAL_ENV}" ]]; then
echo "Source JM virtualenv before running tests:
echo "Source JM virtual environment before running tests:
\`source ./jmvenv/bin/activate\`"
return 1

Loading…
Cancel
Save