diff --git a/README.md b/README.md index f695c6c..af60a44 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Documentation Status - Installation + Installation @@ -64,19 +64,37 @@ There are two strategies for building `fast_pauli` from source. One is a quick a - [Ninja](https://pypi.org/project/ninja/) >= 1.11 - C++ compiler with OpenMP and C++20 support ([LLVM](https://apt.llvm.org/) recommended) - [Python](https://www.python.org/downloads/) >= 3.10 +- [scikit-build-core](https://pypi.org/project/scikit-build-core/) (ONLY for building from source with custom configuration) -#### Quick Start (Users) +#### Build from Source (Linux) ```bash +# Build python -m pip install -e ".[dev]" +# Test pytest -v tests/fast_pauli ``` -#### Configurable Build (Developers) +#### Build from Source (MacOS) + +```bash +# Setup +python -m pip install --upgrade pip +python -m pip install scikit-build-core +brew install llvm +# Build +pip install -e . -C cmake.args="-DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++;-DCMAKE_CXX_FLAGS='-stdlib=libc++ -fexperimental-library'" +# Test +pytest -v tests/fast_pauli # + other pytest flags +``` + +#### Build from Source (Custom Configuration) ```bash +# Setup python -m pip install --upgrade pip python -m pip install scikit-build-core +# Build python -m pip install --no-build-isolation -ve ".[dev]" -C cmake.args="-DCMAKE_CXX_COMPILER= + " +# Test pytest -v tests/fast_pauli # + other pytest flags ``` -Compiled `_fast_pauli` python module gets installed into `fast_pauli` directory. diff --git a/docs/index.rst b/docs/index.rst index ef19c79..a86b345 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -28,6 +28,14 @@ Installation ============ In order to get started, we'll need to install the package and its dependencies. +Requirements +------------ +- `CMake `_ >= 3.25 +- `Ninja `_ >= 1.11 +- C++ compiler with OpenMP and C++20 support (`LLVM `_ recommended) +- `Python `_ >= 3.10 +- `scikit-build-core `_ (ONLY for building from source with custom configuration) + In the following subsections, we describe several options for installing ``fast_pauli``. Install the Latest Release @@ -36,7 +44,7 @@ Install the Latest Release pip install fast_pauli -Build from Source (Default Config) +Build from Source (Linux) ----------------------------------------- .. code-block:: bash @@ -44,6 +52,16 @@ Build from Source (Default Config) cd fast_pauli python -m pip install -e ".[dev]" +Build from Source (MacOS) +----------------------------------------- +.. code-block:: bash + + git clone git@github.com:qognitive/fast-pauli.git + cd fast_pauli + python -m pip install --upgrade pip + python -m pip install scikit-build-core + brew install llvm + pip install -e . -C cmake.args="-DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++;-DCMAKE_CXX_FLAGS='-stdlib=libc++ -fexperimental-library'" Build from Source (Custom Config) ---------------------------------