Skip to content

xtracko/spectre

Repository files navigation

Spectre

Deconvolution of hi-res GS/MS spectra

Build

Requirements

Native build

To make native build of Spectre from sources install the requirements (see above) via your system package manager, conda, vcpkg or your preffered package manager. You can choose from installing Spectre locally, building a wheel, or installing Spectre in developer mode inside the the source directory (please refer to the documentation of scikit-build and setuptools).

 git clone https://github.com/xtracko/spectre.git
 cd spectre

Then choose one of the following options to build and/or install:

python3 -m setup install -- -Dpybind11_DIR=/path/to/pybind11
python3 -m setup bdist_wheel -- -Dpybind11_DIR=/path/to/pybind11
python3 -m setup develop --build-type [Debug|Release] -- -Dpybind11_DIR=/path/to/pybind11

If you are having troble with inconsistent python versions (especially when developing C code in IDE) please pass both folloving variable to cmake:

-DPYTHON_EXECUTABLE=/path/to/your/python/executable
-DPython_ROOT_DIR=/path/to/your/python/root/dir

To make a fully optimized build for your machine run:

python3 -m setup [cmd] -- -DCMAKE_CXX_FLAGS_RELEASE='-O3 -ffast-math -march=native'

Containerized build

You can also build Spectre for Debian 9 (Stretch) and python-3.5 (current python3 for Debian 9) using a Singularity container.

Build the Singularity container first (needs a machine with root access):

git clone https://github.com/xtracko/spectre.git
cd spectre/tools/spectre_build
sudo singularity build spectre_build.sif spectre_build.def

Then on you target machine with singularity installed (no need for root access from now on):

# continuing the build from the directory spectre/tools/spectre_build
singularity exec spectre_build.sif /bin/bash
cd ../..
# if you have conda installed on your system diable it
conda deactivate
# build a wheel (no need for aditional arguments as in the native build)
python3 -m setup bdist_wheel