Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ First clone the repository, and move into that directory
git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git
cd ./xeus-cpp
```
The safest usage of xeus-cpp is to build and install it within a clean environment named `xeus-cpp`. You can create and activate this environment
The safest usage of xeus-cpp from source is to build and install it within a clean environment named `xeus-cpp`. You can create and activate this environment
with mamba by executing the following
```bash
mamba create -n "xeus-cpp"
Expand Down
53 changes: 38 additions & 15 deletions docs/source/InstallationAndUsage.rst
Original file line number Diff line number Diff line change
@@ -1,31 +1,54 @@
InstallationAndUsage
Installation And Usage
--------------------

You will first need to install dependencies.
Installation from source
========================

To ensure that the installation works, it is preferable to install `xeus-cpp` in a
fresh environment. It is also needed to use a miniforge or miniconda installation
because with the full Anaconda installation you may have a conflict with the `zeromq`
library which is already installed in the anaconda distribution. First clone the
repository, and move into that directory

.. code-block:: bash

mamba install cmake cxx-compiler xeus-zmq nlohmann_json cppzmq xtl jupyterlab
clangdev=16 cpp-argparse pugixml -c conda-forge
git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git
cd ./xeus-cpp

The safest usage of xeus-cpp from source is to build and install it within a
clean environment named `xeus-cpp`. You can create and activate
this environment with mamba by executing the following

.. code-block:: bash

**Note:** Use a mamba environment with python version >= 3.11 for fetching clang-versions.
mamba create -n "xeus-cpp"
source activate "xeus-cpp"

The safest usage is to create an environment named `xeus-cpp`.
We will now install the dependencies needed to compile xeux-cpp from source within
this environment by executing the following

.. code-block:: bash

mamba create -n xeus-cpp
source activate xeus-cpp
mamba install notebook cmake cxx-compiler xeus-zmq nlohmann_json=3.11.2 cppzmq
xtl jupyterlab CppInterOp cpp-argparse<3.1 pugixml doctest -c conda-forge

Installing from conda-forge:
Then you can install in this environment `xeus-cpp` and its dependencies.
Now you can compile the kernel from the source by executing (replace `$CONDA_PREFIX`
with a custom installation prefix if need be)

.. code-block:: bash

mamba install xeus-cpp notebook -c conda-forge

mkdir build && cd build
cmake .. -D CMAKE_PREFIX_PATH=$CONDA_PREFIX
-D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX -D CMAKE_INSTALL_LIBDIR=lib
make && make install
cmake .. -D CMAKE_PREFIX_PATH=$CONDA_PREFIX -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX
-D CMAKE_INSTALL_LIBDIR=lib
make && make install

Installing from conda-forge
===========================

If you have conda installed then you can install xeus-cpp using the follwing command

.. code-block:: bash

conda install conda-forge::xeus-cpp

Xeus-cpp is available for Linux, MacOS and Windows.