Skip to content

Commit b570e81

Browse files
committed
clarify editable install instructions
1 parent e16cb5d commit b570e81

2 files changed

Lines changed: 21 additions & 12 deletions

File tree

docs/content/installing.rst

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ You can download the package manager and use it to install the dependencies abov
2323
conda update conda
2424
conda update anaconda
2525

26+
.. _discretize_dependencies:
27+
2628
Dependencies
2729
============
2830

@@ -61,7 +63,8 @@ systems will require a build.
6163
Installing from Source
6264
----------------------
6365
.. attention::
64-
Install ``discretize`` from the source code only if you need to run the development version. Otherwise it's usually better to install it from ``conda-forge``.
66+
Install ``discretize`` from the source code only if you need to run the development version.
67+
Otherwise it's usually better to install it from ``conda-forge`` or ``pypi``.
6568

6669
As ``discretize`` contains several compiled extensions and is not a pure python pacakge,
6770
installing ``discretize`` from the source code requires a C/C++ compiler capable of
@@ -88,25 +91,29 @@ Editable Installs
8891
If you are an active developer of ``discretize``, and find yourself modifying the code often,
8992
you might want to install it from source, in an editable installation. ``discretize`` uses
9093
``meson-python`` to build the external modules and install the package. As such, there are a few extra
91-
steps to take. First, make sure you have the runtime dependencies installed in your environment (see Dependencies listed above).
92-
Then you must install some packages needed to build ``discretize`` in your environment. You can do so with ``pip``::
94+
steps to take:
95+
96+
1. Make sure you have the runtime dependencies installed in your environment (see :ref:`discretize_dependencies` listed above).
97+
However, you **must** install ``numpy >=2.0`` when *building* ``discretize``.
98+
2. You must also install packages needed to build ``discretize`` into your environment. You can do so with ``pip``::
9399

94-
pip install meson-python meson ninja cython setuptools_scm
100+
pip install meson-python meson ninja cython setuptools_scm
95101

96-
Or with ``conda`` (or ``mamba``)::
102+
Or with ``conda``::
97103

98-
conda install -c conda-forge meson-python meson ninja cython setuptools_scm
104+
conda install -c conda-forge meson-python meson ninja cython setuptools_scm
99105

100-
This will allow you to use the build backend required by `discretize`.
106+
This will allow you to use the build backend required by `discretize`.
101107

102-
Finally, you should then be able to perform an editable install using the source code::
108+
3. Finally, you should then be able to perform an editable install using the source code::
103109

104-
pip install --no-build-isolation --editable .
110+
pip install --no-build-isolation --editable .
105111

106112

107113
This builds and installs the local directory to your active python environment in an
108-
"editable" mode; when source code is changed, you will be able to make use of it immediately. It also builds against the packages installed
109-
in your environment instead of creating and isolated environment to build a wheel for the package.
114+
"editable" mode; when source code is changed, you will be able to make use of it immediately. It also builds against the
115+
packages installed in your environment instead of creating and isolated environment to build a wheel for the package,
116+
which is why we needed to install the build requirements into the environment.
110117

111118
Testing your installation
112119
=========================

examples/README.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
.. _sphx_glr_examples:
2+
13
Examples
2-
********
4+
********

0 commit comments

Comments
 (0)