Skip to content

Commit

Permalink
docs: update installation docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl committed Jul 8, 2024
1 parent c080871 commit d4c9d3b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 19 deletions.
2 changes: 1 addition & 1 deletion doc/gmsh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Gmsh interface
==============

This is deprecated. See the `gmsh_interop
<https://github.com/inducer/gmsh_interop>`_ packages instead.
<https://github.com/inducer/gmsh_interop>`__ package instead.

53 changes: 36 additions & 17 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ This tutorial will walk you through the process of building MeshPy. To follow,
you really only need three basic things:

* A UNIX-like machine with web access.
* A C++ compiler, preferably a Version 4.x gcc.
* A working `Python <http://www.python.org>`_ installation.
* A working `Python <http://www.python.org>`__ installation.
* A recent C++ compiler. We use `pybind11 <https://pybind11.readthedocs.io>`__
to create the wrappers, so see their documentation for minimal required versions
if in doubt.
* `meson-python <https://meson-python.readthedocs.io>`__ and
`ninja <https://ninja-build.org/>`__, which are used to build the wrapper.
See the `[buildsystem]` section in `pyproject.toml` for an up to date list.

Step 1: Download and unpack MeshPy
-----------------------------------
Expand All @@ -17,27 +22,42 @@ Step 1: Download and unpack MeshPy

$ tar xfz MeshPy-VERSION.tar.gz

If you're downloading from git, say::

$ git clone --recursive https://github.com/inducer/meshpy.git

If your version of git doesn't support `--recursive`, then say::
If you're downloading from ``git`` instead::

$ git clone https://github.com/inducer/meshpy.git
$ cd meshpy
$ git submodule init
$ git submodule update

The setup script will remind you about this if you forget.

Step 2: Build MeshPy
--------------------

Just type::
MeshPy uses `meson-python <https://meson-python.readthedocs.io>`__ as its build
system. For additional compilation options (e.g. compiling in debug mode),
see their official documentation.

First, just type::

$ cd MeshPy-VERSION # if you're not there already
$ ./configure
$ python setup.py install

If you want to just build a source distribution or a wheel for MeshPy, you can
run::

$ python -m build --sdist .
$ python -m build --wheel .

or with the trusty ``pip``::

$ python -m pip wheel --no-deps .

If you want to install MeshPy in editable mode for development, use::

$ python -m pip install --no-build-isolation --editable .

(the ``--no-build-isolation`` flag is very important!). At this point, you can
also pass additional configuration options to ``meson``. For example, to build
in debug mode, run::

$ python -m pip install \
--no-build-isolation -Csetup-args=-Dbuildtype=debug \
--editable .

Once that works, congratulations! You've successfully built MeshPy.

Expand All @@ -46,5 +66,4 @@ Step 3: Test MeshPy

Just type::

$ cd test
$ py.test
$ python -m pytest -v -s test
3 changes: 2 additions & 1 deletion doc/tri-tet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ Some common notions

:mod:`meshpy.triangle` -- Triangular Meshing
--------------------------------------------

.. module:: meshpy.triangle
:synopsis: Generate triangular meshes
.. moduleauthor:: Andreas Klöckner <[email protected]>

.. moduleauthor:: Andreas Klöckner <[email protected]>

.. class:: ForeignArray

Expand Down

0 comments on commit d4c9d3b

Please sign in to comment.