Skip to content

Commit d2e0f3e

Browse files
committed
docs(install): document pure-Python vs accelerated installs and verification snippet
1 parent caf5455 commit d2e0f3e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docs/install.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,39 @@ <h2>Installing with <code>pip</code></h2>
120120
<code>svv</code> and other python packages you might already use
121121
or need later.
122122
</div>
123+
124+
<h3>Choose pure‑Python or accelerated</h3>
125+
<p>svVascularize runs entirely in pure Python, but ships optional C/Cython
126+
accelerators for heavier routines. You can select either experience at
127+
install time:</p>
128+
<ul>
129+
<li><strong>Pure‑Python (default):</strong>
130+
<pre data-copy><code class="language-shell">pip install svv</code></pre>
131+
<em>No compiler required.</em> All performance‑critical paths have
132+
Python fallbacks.</li>
133+
<li><strong>Accelerated (prebuilt extensions):</strong>
134+
<pre data-copy><code class="language-shell">pip install "svv[accel]"</code></pre>
135+
The <code>[accel]</code> extra pulls in a small companion wheel,
136+
<code>svv-accelerated</code>, which contains compiled accelerators.
137+
When present, <code>svv</code> automatically prefers those modules.
138+
</li>
139+
</ul>
140+
141+
<div class="callout info">
142+
<strong>Advanced (optional):</strong> To force a local from‑source build
143+
of extensions instead of using the companion wheel, set the env var
144+
and ask pip to build from source:
145+
<pre data-copy><code class="language-shell">SVV_BUILD_EXTENSIONS=1 pip install --no-binary svv "svv[accel]"</code></pre>
146+
This requires a C++17 tool‑chain, CMake, Cython, and NumPy headers.
147+
</div>
148+
149+
<h3>Verify which backend is active</h3>
150+
<pre data-copy><code class="language-python">import importlib
151+
m = importlib.import_module('svv.tree.utils.c_local_optimize')
152+
print(getattr(m, '__file__', '&lt;builtin&gt;'))
153+
</code></pre>
154+
<p>If you see a <code>.so</code>/<code>.pyd</code> path, the accelerated backend
155+
is active. A <code>.py</code> path indicates the pure‑Python fallback.</p>
123156
</section>
124157

125158
<!-- CONDA -->

0 commit comments

Comments
 (0)