@@ -30,51 +30,67 @@ https://github.com/conda-forge/miniforge/#download
30
30
31
31
## Compile LPython
32
32
33
- Create a Conda environment using the preexisting environment.yml file:
34
-
35
- conda env create -f environment.yml
36
- conda activate lp
37
-
38
33
Install required packages (Linux - 64 bit):
39
34
40
- sudo apt install binutils-dev zlib1g-dev
35
+ ``` bash
36
+ sudo apt install binutils-dev
37
+ ```
41
38
42
39
Clone LPython
43
40
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
+ ```
46
52
47
53
Create autogenerated files (choose the command for your platform):
48
54
49
- ./build0.sh # macOS/Linux
50
- call build0.bat # Windows
55
+ ``` bash
56
+ ./build0.sh # macOS/Linux
57
+ call build0.bat # Windows
58
+ ```
51
59
52
60
Compile LPython:
53
61
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
+ ```
56
66
57
67
## Tests:
58
68
59
69
Run tests:
60
70
61
- ctest
62
- ./run_tests.py
71
+ ``` bash
72
+ ctest
73
+ ./run_tests.py
74
+ ```
63
75
64
76
Also, run the integration tests:
65
77
66
- ./integration_tests/run_tests.py
78
+ ``` bash
79
+ ./integration_tests/run_tests.py
80
+ ```
67
81
68
82
## Examples
69
83
70
84
You can run the following examples by hand in a terminal:
71
85
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
+ ```
78
94
79
95
## Contributing
80
96
0 commit comments