Skip to content

Commit 9ac009e

Browse files
authored
Merge pull request #375 from ankitaS11/refactor/README
Refactor README (reorder installation steps + color-formatting for commands)
2 parents be91fcc + c27ec6a commit 9ac009e

File tree

2 files changed

+38
-21
lines changed

2 files changed

+38
-21
lines changed

README.md

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,51 +30,67 @@ https://github.com/conda-forge/miniforge/#download
3030

3131
## Compile LPython
3232

33-
Create a Conda environment using the preexisting environment.yml file:
34-
35-
conda env create -f environment.yml
36-
conda activate lp
37-
3833
Install required packages (Linux - 64 bit):
3934

40-
sudo apt install binutils-dev zlib1g-dev
35+
```bash
36+
sudo apt install binutils-dev
37+
```
4138

4239
Clone LPython
4340

44-
git clone https://github.com/lcompilers/lpython.git
45-
cd lpython
41+
```bash
42+
git clone https://github.com/lcompilers/lpython.git
43+
cd lpython
44+
```
45+
46+
Create a Conda environment using the preexisting environment.yml file:
47+
48+
```bash
49+
conda env create -f environment.yml
50+
conda activate lp
51+
```
4652

4753
Create autogenerated files (choose the command for your platform):
4854

49-
./build0.sh # macOS/Linux
50-
call build0.bat # Windows
55+
```bash
56+
./build0.sh # macOS/Linux
57+
call build0.bat # Windows
58+
```
5159

5260
Compile LPython:
5361

54-
cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_LLVM=yes -DWITH_STACKTRACE=yes -DWITH_LFORTRAN_BINARY_MODFILES=no .
55-
cmake --build . -j16
62+
```bash
63+
cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_LLVM=yes -DWITH_STACKTRACE=yes -DWITH_LFORTRAN_BINARY_MODFILES=no .
64+
cmake --build . -j16
65+
```
5666

5767
## Tests:
5868

5969
Run tests:
6070

61-
ctest
62-
./run_tests.py
71+
```bash
72+
ctest
73+
./run_tests.py
74+
```
6375

6476
Also, run the integration tests:
6577

66-
./integration_tests/run_tests.py
78+
```bash
79+
./integration_tests/run_tests.py
80+
```
6781

6882
## Examples
6983

7084
You can run the following examples by hand in a terminal:
7185

72-
./src/bin/lpython examples/expr2.py
73-
./a.out
74-
./src/bin/lpython --show-ast examples/expr2.py
75-
./src/bin/lpython --show-asr examples/expr2.py
76-
./src/bin/lpython --show-cpp examples/expr2.py
77-
./src/bin/lpython --show-llvm examples/expr2.py
86+
```bash
87+
./src/bin/lpython examples/expr2.py
88+
./a.out
89+
./src/bin/lpython --show-ast examples/expr2.py
90+
./src/bin/lpython --show-asr examples/expr2.py
91+
./src/bin/lpython --show-cpp examples/expr2.py
92+
./src/bin/lpython --show-llvm examples/expr2.py
93+
```
7894

7995
## Contributing
8096

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ dependencies:
1313
- re2c
1414
- setuptools
1515
- toml
16+
- zlib

0 commit comments

Comments
 (0)