diff --git a/pyproject.toml b/pyproject.toml index a45edae..a24c88e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,11 @@ source_path = "." build_args = ["-j"] install_components = ["python_modules"] +[tool.py-build-cmake.editable] +# This might not work properly on Windows. Comment this out when testing on +# Windows. +mode = "symlink" + [tool.commitizen] name = "cz_conventional_commits" tag_format = "v$version" diff --git a/scripts/build_archlinux.sh b/scripts/build_archlinux.sh index e69de29..b0484bd 100755 --- a/scripts/build_archlinux.sh +++ b/scripts/build_archlinux.sh @@ -0,0 +1,17 @@ +#/bin/bash +# Build LASP on Arch Linux, assuming we start in a clean docker container. +# After that, test stuff. +# Assumptions +# - CWD is root of lasp repository +# - Nothing is installed + +# Stop on first error +set -e +pacman -Syu --noconfirm base-devel git ccache openblas fftw pulseaudio python-build libusb +git submodule update --init --recursive +pyproject-build +python -m venv .venv +source .venv/bin/activate +pip install pytest +pip install dist/lasp-*linux_x86_64.whl +pytest diff --git a/scripts/build_ubuntu.sh b/scripts/build_ubuntu.sh index df0363e..084267b 100755 --- a/scripts/build_ubuntu.sh +++ b/scripts/build_ubuntu.sh @@ -1,9 +1,11 @@ #!/bin/sh # apt update -apt install -y python3-venv +apt install -y python3-venv libopenblas-dev python3-pip libusb-1.0-0-dev libpulse-dev python3-build git submodule update --init --recursive - -cmake . -# More than two processes creates too much load -make -j2 +pyproject-build +python -m venv .venv +source .venv/bin/activate +pip install pytest +pip install dist/lasp-*linux_x86_64.whl +pytest