diff --git a/README.md b/README.md index 99124fda0e..fbee2486cc 100644 --- a/README.md +++ b/README.md @@ -30,51 +30,67 @@ https://github.com/conda-forge/miniforge/#download ## Compile LPython -Create a Conda environment using the preexisting environment.yml file: - - conda env create -f environment.yml - conda activate lp - Install required packages (Linux - 64 bit): - sudo apt install binutils-dev zlib1g-dev +```bash +sudo apt install binutils-dev +``` Clone LPython - git clone https://github.com/lcompilers/lpython.git - cd lpython +```bash +git clone https://github.com/lcompilers/lpython.git +cd lpython +``` + +Create a Conda environment using the preexisting environment.yml file: + +```bash +conda env create -f environment.yml +conda activate lp +``` Create autogenerated files (choose the command for your platform): - ./build0.sh # macOS/Linux - call build0.bat # Windows +```bash +./build0.sh # macOS/Linux +call build0.bat # Windows +``` Compile LPython: - cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_LLVM=yes -DWITH_STACKTRACE=yes -DWITH_LFORTRAN_BINARY_MODFILES=no . - cmake --build . -j16 +```bash +cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_LLVM=yes -DWITH_STACKTRACE=yes -DWITH_LFORTRAN_BINARY_MODFILES=no . +cmake --build . -j16 +``` ## Tests: Run tests: - ctest - ./run_tests.py +```bash +ctest +./run_tests.py +``` Also, run the integration tests: - ./integration_tests/run_tests.py +```bash +./integration_tests/run_tests.py +``` ## Examples You can run the following examples by hand in a terminal: - ./src/bin/lpython examples/expr2.py - ./a.out - ./src/bin/lpython --show-ast examples/expr2.py - ./src/bin/lpython --show-asr examples/expr2.py - ./src/bin/lpython --show-cpp examples/expr2.py - ./src/bin/lpython --show-llvm examples/expr2.py +```bash +./src/bin/lpython examples/expr2.py +./a.out +./src/bin/lpython --show-ast examples/expr2.py +./src/bin/lpython --show-asr examples/expr2.py +./src/bin/lpython --show-cpp examples/expr2.py +./src/bin/lpython --show-llvm examples/expr2.py +``` ## Contributing diff --git a/environment.yml b/environment.yml index 8ce32cb08d..68e90f1401 100644 --- a/environment.yml +++ b/environment.yml @@ -13,3 +13,4 @@ dependencies: - re2c - setuptools - toml + - zlib