INSTALL.md: break the big blocks of code, and remove the space

Remove the first space in the block of code as it is not necessary.

This
 ```
 $ python --version
 ```

Becomes this
```
$ python --version
```

Also break the big block of code into individual blocks.
This commit is contained in:
belikor 2021-07-11 17:57:36 -05:00
parent 90c24aade3
commit 8ce61fbd52

View file

@ -26,11 +26,12 @@ Could not connect to daemon. Are you sure it's running?
macOS users will need to install [xcode command line tools](https://developer.xamarin.com/guides/testcloud/calabash/configuring/osx/install-xcode-command-line-tools/) and [homebrew](http://brew.sh/). macOS users will need to install [xcode command line tools](https://developer.xamarin.com/guides/testcloud/calabash/configuring/osx/install-xcode-command-line-tools/) and [homebrew](http://brew.sh/).
These environment variables also need to be set: These environment variables also need to be set:
1. PYTHONUNBUFFERED=1 ```
2. EVENT_NOKQUEUE=1 PYTHONUNBUFFERED=1
EVENT_NOKQUEUE=1
```
Remaining dependencies can then be installed by running: Remaining dependencies can then be installed by running:
``` ```
brew install python protobuf brew install python protobuf
``` ```
@ -40,7 +41,6 @@ Assistance installing Python3: https://docs.python-guide.org/starting/install3/o
### Linux ### Linux
On Ubuntu (we recommend 18.04 or 20.04), install the following: On Ubuntu (we recommend 18.04 or 20.04), install the following:
``` ```
sudo add-apt-repository ppa:deadsnakes/ppa sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update sudo apt-get update
@ -59,52 +59,68 @@ If you're running another Linux distro, install the equivalent of the above pack
### Linux/Mac ### Linux/Mac
To install on Linux/Mac: Clone the repository:
```
$ git clone https://github.com/lbryio/lbry-sdk.git
$ cd lbry-sdk
```
``` Create a Python virtual environment for lbry-sdk:
Clone the repository: ```
$ git clone https://github.com/lbryio/lbry-sdk.git $ python3.7 -m venv lbry-venv
$ cd lbry-sdk ```
Create a Python virtual environment for lbry-sdk: Activate virtual environment:
$ python3.7 -m venv lbry-venv ```
$ source lbry-venv/bin/activate
Activating lbry-sdk virtual environment: ```
$ source lbry-venv/bin/activate
Make sure you're on Python 3.7+ (as the default Python in virtual environment):
$ python --version
Install packages: Make sure you're on Python 3.7+ as default in the virtual environment:
$ make install ```
$ python --version
```
If you are on Linux and using PyCharm, generates initial configs: Install packages:
$ make idea ```
``` $ make install
```
If you are on Linux and using PyCharm, generates initial configs:
```
$ make idea
```
To verify your installation, `which lbrynet` should return a path inside To verify your installation, `which lbrynet` should return a path inside
of the `lbry-venv` folder. of the `lbry-venv` folder.
```
(lbry-venv) $ which lbrynet
/opt/lbry-sdk/lbry-venv/bin/lbrynet
```
To exit the virtual environment simply use the command `deactivate`. To exit the virtual environment simply use the command `deactivate`.
### Windows ### Windows
To install on Windows: Clone the repository:
```
> git clone https://github.com/lbryio/lbry-sdk.git
> cd lbry-sdk
```
``` Create a Python virtual environment for lbry-sdk:
Clone the repository: ```
> git clone https://github.com/lbryio/lbry-sdk.git > python -m venv lbry-venv
> cd lbry-sdk ```
Create a Python virtual environment for lbry-sdk: Activate virtual environment:
> python -m venv lbry-venv ```
> lbry-venv\Scripts\activate
```
Activating lbry-sdk virtual environment: Install packages:
> lbry-venv\Scripts\activate ```
> pip install -e .
Install packages: ```
> pip install -e .
```
## Run the tests ## Run the tests
### Elasticsearch ### Elasticsearch
@ -115,16 +131,14 @@ The easiest way to start it is using docker with:
```bash ```bash
make elastic-docker make elastic-docker
``` ```
Alternative installation methods are available [at Elasticsearch website](https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html). Alternative installation methods are available [at Elasticsearch website](https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html).
To run the unit and integration tests from the repo directory: To run the unit and integration tests from the repo directory:
```
``` python -m unittest discover tests.unit
python -m unittest discover tests.unit python -m unittest discover tests.integration
python -m unittest discover tests.integration ```
```
## Usage ## Usage