Skip to content

Commit 9e13ea7

Browse files
committed
towards multiple routes: pixi, uv or pipx.
1 parent 045a821 commit 9e13ea7

3 files changed

Lines changed: 785 additions & 129 deletions

File tree

docs/content/installation.rst

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,105 @@ In case you would like to install an unreleased or development version, deepTool
4747
$ cd deepTools
4848
$ pip install .
4949
50+
Command line installation using ``uv``
51+
--------------------------------------
52+
53+
`uv <https://docs.astral.sh/uv/>`_ can install deepTools as a standalone command line
54+
application, fully isolated from your other Python environments:
55+
56+
.. code:: bash
57+
58+
$ uv tool install deeptools
59+
60+
The ``deeptools`` commands (``bamCoverage``, ``computeMatrix``, ...) are then available on
61+
your ``PATH`` without activating any environment. Upgrade or remove with
62+
``uv tool upgrade deeptools`` / ``uv tool uninstall deeptools``.
63+
64+
To run deepTools once without installing it, use:
65+
66+
.. code:: bash
67+
68+
$ uvx --from deeptools bamCoverage --help
69+
70+
Inside a project you can instead add it as a dependency with ``uv add deeptools`` and run
71+
the tools via ``uv run bamCoverage ...``.
72+
73+
Command line installation using ``pipx``
74+
----------------------------------------
75+
76+
`pipx <https://pipx.pypa.io/>`_ installs deepTools into its own isolated environment while
77+
exposing the command line tools globally:
78+
79+
.. code:: bash
80+
81+
$ pipx install deeptools
82+
83+
Run a single tool without a persistent install using:
84+
85+
.. code:: bash
86+
87+
$ pipx run --spec deeptools bamCoverage --help
88+
89+
Upgrade with ``pipx upgrade deeptools`` and remove with ``pipx uninstall deeptools``.
90+
91+
Command line installation using ``pixi``
92+
----------------------------------------
93+
94+
`pixi <https://pixi.sh/>`_ can install deepTools globally from the ``bioconda`` channel,
95+
which ships prebuilt binaries (no compiler needed):
96+
97+
.. code:: bash
98+
99+
$ pixi global install -c conda-forge -c bioconda deeptools
100+
101+
To hack on deepTools from a checkout, the repository ships a pixi workspace that pins the
102+
build toolchain (Rust, ``maturin``, ``libclang``, ``htslib``). This builds the Rust
103+
extension from source and installs deepTools in editable mode:
104+
105+
.. code:: bash
106+
107+
$ git clone https://github.com/deeptools/deepTools.git
108+
$ cd deepTools
109+
$ pixi install
110+
$ pixi run build # maturin develop --release
111+
$ pixi run test # pytest pydeeptools/deeptools/test/
112+
113+
Building from source
114+
--------------------
115+
116+
Installs from `pypi <https://pypi.org/>`_ (``pip``, ``uv``, ``pipx``) use a prebuilt wheel
117+
when one is available for your platform, so **no compiler is needed**. deepTools is only
118+
built from source when no matching wheel exists (an unsupported platform, or a git
119+
checkout / source distribution). In that case its Rust extension has to be compiled, which
120+
needs a build toolchain: **Rust (>= 1.85)**, ``maturin``, ``libclang``, ``perl`` (to build
121+
the vendored OpenSSL) and the usual HTSlib system libraries (``zlib``, ``bzip2``,
122+
``liblzma``, ``libcurl``).
123+
124+
There are two equally supported ways to provide that toolchain -- pick whichever suits
125+
your setup:
126+
127+
1. **Self-contained, via the pixi workspace (recommended for reproducible builds).**
128+
``pixi install`` pins Rust, ``maturin``, ``libclang`` and ``htslib`` from conda-forge,
129+
so nothing has to be present on the host -- it works identically on Linux and macOS.
130+
The workspace also links conda-forge's OpenSSL (``OPENSSL_NO_VENDOR``), so no ``perl``
131+
toolchain is needed on this route. Use the ``pixi install`` / ``pixi run build`` steps
132+
shown above.
133+
134+
2. **System toolchain, via ``pip`` / ``uv`` / ``pipx``.** Install Rust yourself (for
135+
example with `rustup <https://rustup.rs/>`_ or Homebrew) plus the system libraries
136+
listed above, then build with any of:
137+
138+
.. code:: bash
139+
140+
$ pip install . # from a checkout
141+
$ uv tool install deeptools
142+
$ pipx install deeptools
143+
144+
This is the same path deepTools' CI uses, so it is well exercised across platforms.
145+
146+
Both routes produce the same package; they differ only in where the build toolchain comes
147+
from.
148+
50149
Galaxy installation
51150
--------------------
52151

0 commit comments

Comments
 (0)