Skip to content

Commit 3480b60

Browse files
jhaigh0peterfpeterson
authored andcommitted
add instuctions for creating custom mantid-developer package
1 parent fa366dc commit 3480b60

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

dev-docs/source/Packaging.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,23 @@ Say I've implemented a new file searching method on a branch ``1234_new_file_sea
170170

171171
Most often, you won't need to upload the packages to Anaconda, this is most useful in cases where installing standalone packages is inconvenient. Standalone package builds created by the jenkins job can be found under the jenkins job build artifacts, this is near the top of the page. Say you built a package for Windows using the jenkins job, you should find a ``mantidworkbench`` exe file in the build artifacts.
172172

173+
.. _build_custom_mantid-developer:
174+
175+
Building a custom ``mantid-developer`` environment
176+
--------------------------------------------------
177+
178+
This is useful if you need to change a pinned version of one of Mantid's dependencies and test the change locally.
179+
180+
1. Create a conda environment and install ``boa`` and ``versioningit`` into it. For this example, called ``mantid_dev_builder``.
181+
2. Make your changes to the conda recipe files.
182+
3. Change directory to ``mantid/conda/recipes``
183+
4. With ``mantid_dev_builder`` active, run ``conda mambabuild ./mantid-developer/``. This will build a local version of ``mantid-developer`` with your changes and place it in ``mantid_dev_builder``'s ``conda-bld`` folder. The output from ``conda mambabuild`` should tell you the location.
184+
5. Deactivate ``mantid_dev_builder`` and create a new environment to install the custom ``mantid-developer`` package into (e.g if you were testing a new version of numpy you might call it ``mantid_dev_numpy_test``)
185+
6. ``mamba install -c <path to mantid_dev_builder's conda-bld folder> mantid-developer`` to install the package.
186+
7. You will need to re-run cmake with this new environment.
187+
188+
Note: If you have ``boa`` installed in your base environment it seems ``conda mambabuild`` will use it over your activated environment. In this case you will likely get an error that you don't have ``versioningit`` installed. One way to fix this is to install ``versioningit`` into your base environment and just use that instead of making a new environment.
189+
173190

174191
.. _conda: https://conda.io
175192
.. _mantid-conda-recipes: https://github.com/mantidproject/mantid/tree/main/conda

0 commit comments

Comments
 (0)