From 50673c03a26684c5cfa362cbccc051bb52483657 Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Fri, 3 Apr 2026 11:27:35 -0700 Subject: [PATCH 1/2] [docs] get sources and submodules - update build instructions - show to get all required sources --- docs/docs/building_and_testing.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/docs/building_and_testing.md b/docs/docs/building_and_testing.md index fe5fcb36..8cbe8298 100644 --- a/docs/docs/building_and_testing.md +++ b/docs/docs/building_and_testing.md @@ -1,5 +1,26 @@ # Building and testing +You can build `distopia` from source. + +## Checking out the sources +Get the latest sources from the repository https://github.com/MDAnalysis/distopia +```bash +git clone https://github.com/MDAnalysis/distopia.git +cd distopia +``` + +We also need `highway`, which vendored as a git submodule: +```bash +git submodule update --init libdistopia/highway +``` + +For testing and benchmarking get `googlebench` and `googletest`: +```bash +git submodule update --init libdistopia/googlebench +git submodule update --init libdistopia/googletest +``` + + ## Building Distopia uses the scikit-build build system. You can build the library easily by first installing the prerequisites. From 2cca2ae70649850f95b3154a737e6e843be91592 Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Fri, 3 Apr 2026 20:19:26 -0700 Subject: [PATCH 2/2] Update building_and_testing.md --- docs/docs/building_and_testing.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/docs/building_and_testing.md b/docs/docs/building_and_testing.md index 8cbe8298..ca60f39c 100644 --- a/docs/docs/building_and_testing.md +++ b/docs/docs/building_and_testing.md @@ -5,20 +5,13 @@ You can build `distopia` from source. ## Checking out the sources Get the latest sources from the repository https://github.com/MDAnalysis/distopia ```bash -git clone https://github.com/MDAnalysis/distopia.git +git clone --recurse-submodules https://github.com/MDAnalysis/distopia.git cd distopia ``` -We also need `highway`, which vendored as a git submodule: -```bash -git submodule update --init libdistopia/highway -``` - -For testing and benchmarking get `googlebench` and `googletest`: -```bash -git submodule update --init libdistopia/googlebench -git submodule update --init libdistopia/googletest -``` +Note that we are using git submodules for the vendored [highway](https://github.com/google/highway) +library (in `libdistopia/highway`, release 1.3.0) and for Google tests and Google benchmarks (in +`libdistopia/googletest` and `libdistopia/googlebench`). ## Building @@ -37,6 +30,14 @@ If you want greater control over build and install options you can do a more man python setup.py install -- -DCMAKE_BUILD_TYPE=Release ``` +Special CMake flags +- `DISTOPIA_USE_EXTERNAL_HWY`: + - Off (default) — build with the vendored highway library + - On — link to an installed libhwy (install with `mamba install libhwy`) +- `DISTOPIA_BUILD_TESTS`: + - On (default) — build the tests for libdistopia and the benchmarks + - Off — do not build tests and benchmarks + ## Testing Testing for distopia is done on two levels. The `distopia` python layer has `pytest` tests you can run after installing the package.