Skip to content

Commit a9b0ae2

Browse files
committed
docs: clarify Installation — slim (PyPI) vs full (GitHub Release) wheels, platforms, sdist/Rust fallback
1 parent 97f082a commit a9b0ae2

1 file changed

Lines changed: 29 additions & 5 deletions

File tree

README.rst

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,43 @@ corpus of cardinals, ordinals, currency, years, fractions, floats and strings.
113113
Installation
114114
------------
115115

116-
Install from PyPI — the wheels bundle the Python binder and the compiled Rust
117-
extension, built per platform::
116+
Install from PyPI (Python 3.10+) — the wheel bundles the Python binder and the
117+
compiled Rust extension, built per platform::
118118

119119
pip install num2words2
120120

121-
Wheels for every version are also attached to the `GitHub Releases`_ page; the
122-
compiled extension is distributed **only** through those release wheels (it is not
121+
Prebuilt wheels are published for:
122+
123+
* **Linux** — x86_64 and aarch64 (manylinux2014)
124+
* **macOS** — Apple Silicon (arm64); Intel (x86_64) from a later release
125+
* **Windows** — x86_64
126+
127+
On any other platform, pip falls back to the source distribution and builds the
128+
extension locally — this needs a **stable Rust toolchain** (`rustup
129+
<https://rustup.rs>`_).
130+
131+
Slim vs. full wheels
132+
~~~~~~~~~~~~~~~~~~~~~~
133+
134+
``num2words2`` ships in two flavours:
135+
136+
* **slim** (the PyPI default, ~2 MB) — everything except native
137+
language-detection. ``num2words_sentence(lang=None)`` auto-detect is disabled;
138+
pass an explicit ``lang`` and every converter works.
139+
* **full** (~140 MB) — embeds the lingua-rs models so
140+
``num2words_sentence(lang=None)`` auto-detects the language natively. Full
141+
wheels are attached to each `GitHub Releases`_ entry; install one directly::
142+
143+
pip install https://github.com/jqueguiner/num2words2/releases/download/v1.0.18/num2words2-1.0.18-cp38-abi3-<platform>.whl
144+
145+
The compiled extension is distributed **only** through these wheels (it is not
123146
committed to the repository).
124147

125148
To build from source you need a stable Rust toolchain and `maturin
126149
<https://www.maturin.rs>`_::
127150

128-
maturin build --release
151+
maturin build --release # full (bundles lingua models)
152+
maturin build --release --no-default-features # slim (~2 MB, no models)
129153

130154

131155

0 commit comments

Comments
 (0)