| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
LPython is a Python compiler. It is in heavy development, currently in pre-alpha stage. Some of the goals of LPython:
And more.
LPython works on Windows, macOS and Linux.
If you do not have Conda already installed, please follow the instructions here to install Conda on your platform:
https://github.com/conda-forge/miniforge/#download
Create a Conda environment:
conda create -n lp llvmdev=11.0.1 bison=3.4 re2c python cmake make toml conda activate lp
Clone LPython
git clone https://github.com/lcompilers/lpython.git cd lpython
Create autogenerated files (choose the command for your platform):
./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
Run tests:
ctest ./run_tests.py
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
| Back | FazBrowse Home | New Git URL |