Skip to content

Commit

Permalink
Add install from source instructions (#2977)
Browse files Browse the repository at this point in the history
* Update static environment files

* Refactor installation pages

* Add install from source instructions
  • Loading branch information
AntoinePrv authored Nov 15, 2023
1 parent 09cbb34 commit ddea95e
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 65 deletions.
34 changes: 34 additions & 0 deletions dev/environment-micromamba-static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
channels:
- conda-forge
dependencies:
# libmamba build dependencies
- cxx-compiler
- cmake >=3.16
- pkg-config # Used by some CMake dependencies
- ninja
# libmamba dependencies
- cpp-expected
- nlohmann_json
- simdjson-static >=3.3.0
- spdlog
- fmt
- libsolv-static >=0.7.24
- yaml-cpp-static >=0.8.0
- reproc-static >=14.2.4.post0
- reproc-cpp-static >=14.2.4.post0
- libcurl >=8.4.0
- libcurl-static >=8.4.0
- xz-static
- libssh2-static
- libarchive-minimal-static
- krb5-static
- openssl
- libopenssl-static
- zstd-static
- zlib
- libnghttp2-static
- lz4-c-static
# libmamba test dependencies
- doctest
# micromamba dependencies
- cli11 >=2.2,<3
2 changes: 1 addition & 1 deletion docs/source/developer_zone/dev_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Setting the development environment requires conda, mamba, or micromamba.
Since some commands are automated with ``micromamba``, and to avoid any runtime linking issue,
it is best to work with micromamba.

Refer to the :ref:`installation<installation>` page for how to install micromamba or mamba.
Refer to the :ref:`installation<umamba-install>` page for how to install micromamba or mamba.

Develop using Taskfile
======================
Expand Down
7 changes: 4 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@ The ``mamba-org`` organization hosts multiple Mamba flavors:
.. note::
:ref:`micromamba<micromamba>` is especially well fitted for the CI use-case but not limited to that!

You can try Mamba now by visiting the :ref:`installation page<installation>`!
You can try Mamba now by visiting the installation for
:ref:`mamba<mamba-install>` or :ref:`micromamba<umamba-install>`


.. toctree::
:caption: INSTALLATION
:maxdepth: 2
:hidden:

Mamba <mamba-installation>
Micromamba <micromamba-installation>
Mamba <installation/mamba-installation>
Micromamba <installation/micromamba-installation>

.. toctree::
:caption: USER GUIDE
Expand Down
17 changes: 0 additions & 17 deletions docs/source/installation.rst

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,44 @@ image can be used to run ``micromamba`` without installing it:
docker run -it --rm mambaorg/micromamba:latest micromamba info
Build from source
*****************

.. note::

These instuction do not work currently on Windows, which requires a more complex hybrid build.
For up-to-date instructions on Windows and Unix, consult the scripts in the
`micromamba-feedstock <https://github.com/conda-forge/micromamba-feedstock>`_.

To build from source, install the development dependencies, using a Conda compatible installer
(``conda``/``mamba``/``micromamba``/``rattler``/``pixi``).

.. code-block:: bash
micromamba create -n mamba --file dev/environment-static.yml
micromamba activate -n mamba
Use CMake from this environment to drive the build:

.. code-block:: bash
cmake -B build/ \
-G Ninja \
${CMAKE_ARGS} \
-D CMAKE_BUILD_TYPE="Release" \
-D BUILD_LIBMAMBA=ON \
-D BUILD_STATIC=ON \
-D BUILD_MICROMAMBA=ON
cmake --build build/ --parallel
You will find the executable under "build/micromamba/micromamba".
The executable can be striped to remove its size:

.. code:: bash
strip "build/micromamba/micromamba"
.. _shell_completion:

Shell completion
Expand Down
3 changes: 2 additions & 1 deletion docs/source/user_guide/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Troubleshooting
Please use the official installer
---------------------------------

Please make sure that you use the :ref:`official Mambaforge installer <installation>` to install Mamba. Other installation methods are not supported.
Please make sure that you use the :ref:`official Mambaforge installer <mamba-install>` to install Mamba.
Other installation methods are not supported.

Mamba should be installed to the ``base`` environment
-----------------------------------------------------
Expand Down
16 changes: 0 additions & 16 deletions libmamba/environment-static-dev-win.yml

This file was deleted.

27 changes: 0 additions & 27 deletions libmamba/environment-static-dev.yml

This file was deleted.

0 comments on commit ddea95e

Please sign in to comment.