# Configure on BornAgain

file:///usr/share/doc/bornagain/html/dev/config/index.html Recent content in Configure on BornAgain Hugo en-us

# Build

file:///usr/share/doc/bornagain/html/dev/config/build.html Mon, 01 Jan 0001 00:00:00 +0000 file:///usr/share/doc/bornagain/html/dev/config/build.html <h2 id="building-as-developer">Building as developer</h2> <p>As developer, configure CMake with</p> <pre tabindex="0"><code>cmake .. -DDEV=ON </code></pre><p>This activates additional build targets. In particular, all contents of the <code>auto</code> directory is regenerated if out of sync.</p> <h4 id="prerequisites">Prerequisites</h4> <p>Developers need additional tools, beyond those required for building BornAgain from source:</p> <ul> <li>Swig, to regenerate <code>auto/Wrap</code>;</li> <li>Ruby, which provides the embedded interpreter erb, to regenerate <code>auto/Examples</code> and <code>auto/MiniExamples</code>;</li> <li>Doxygen, to autogenerate the API documentation;</li> <li>clang-format, to enforce proper source formatting.</li> </ul> <p>Of these, clang-format is not controlled by <code>make</code>, but must be run manually.</p>

# Pyenv

file:///usr/share/doc/bornagain/html/dev/config/pyenv.html Mon, 01 Jan 0001 00:00:00 +0000 file:///usr/share/doc/bornagain/html/dev/config/pyenv.html <h2 id="pyenv">pyenv</h2> <p><a href="https://github.com/pyenv/pyenv">Pyenv</a> is a platform to install and manage different versions of Python, isolated from the default Python version. Its advantage compared to the other options, like Anaconda, is its simplicity and smallness. Currently, to build BornAgain libraries for different versions of Python, we use the <code>pyenv</code> platform.</p> <h4 id="installation">Installation</h4> <h5 id="linux">Linux</h5> <p>Obtain the installer from <a href="https://github.com/pyenv/pyenv-installer">https://github.com/pyenv/pyenv-installer</a>. To install <code>pyenv</code>, use</p> <pre tabindex="0"><code>curl https://pyenv.run | bash </code></pre><p>By default, <code>pyenv</code> is installed in <code>$HOME/.pyenv</code>.</p> <p>The dependencies must be installed before building Python; see <a href="https://github.com/pyenv/pyenv/wiki#suggested-build-environment">https://github.com/pyenv/pyenv/wiki#suggested-build-environment</a>:</p>