diff --git a/README.md b/README.md index 737e343..3a9ad43 100644 --- a/README.md +++ b/README.md @@ -3,49 +3,20 @@ Python interface to the Pantograph library # Getting started - - - ## Install 1: With Conda and Pip in the SNAP cluster ```bash -# - Install Lean4 manually (elan and lake), 1st one is the SNAP one, 2nd is the most common one +# - Install Lean 4 manually (elan & lake): gets install script (doesn't save it) & directly gives it to sh to install it curl -sSf https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh | sh -s -- -y +# (install command from the Lean4 official instlal guide, not the one we use) # curl -sSf https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh | sh -s # - Make sure Lean4 tools (lean, lake) are available +echo $PATH | tr ':' '\n' export PATH="$HOME/.elan/bin:$PATH" echo 'export PATH="$HOME/.elan/bin:$PATH"' >> ~/.bashrc -bash +# bash elan lake diff --git a/build.py b/build.py index 959c1ad..9770697 100644 --- a/build.py +++ b/build.py @@ -3,13 +3,19 @@ import subprocess, shutil, os, stat from pathlib import Path +# -- Install Panograph +# Define paths for Pantograph source and Pantograph Python interface PATH_PANTOGRAPH = Path("./src") PATH_PY = Path("./pantograph") - +# Run the `make` command in the PATH_PANTOGRAPH directory to build the Pantograph executable with subprocess.Popen(["make"], cwd=PATH_PANTOGRAPH) as p: p.wait() - +# Define the path to the executable path_executable = PATH_PY / "pantograph" +# Copy the built Pantograph executable to the specified path shutil.copyfile(PATH_PANTOGRAPH / ".lake/build/bin/pantograph", path_executable) +# Change the permissions of the Pantograph executable to make it executable os.chmod(path_executable, os.stat(path_executable).st_mode | stat.S_IEXEC) -shutil.copyfile(PATH_PANTOGRAPH / "lean-toolchain", PATH_PY / "lean-toolchain") + +# -- Copy the Lean toolchain file to the specified path +shutil.copyfile(PATH_PANTOGRAPH / "lean-toolchain", PATH_PY / "lean-toolchain") \ No newline at end of file