File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1133,10 +1133,23 @@ If someone implements it well.
11331133To package orjson requires [ Rust] ( https://www.rust-lang.org/ ) on the
11341134 nightly channel and the [ maturin] ( https://github.com/PyO3/maturin )
11351135build tool. maturin can be installed from PyPI or packaged as
1136- well. maturin can be invoked like:
1136+ well. This is the simplest and recommended way of installing
1137+ from source, assuming ` rustup ` is available from a
1138+ package manager:
11371139
11381140``` sh
1141+ rustup default nightly
1142+ pip wheel --no-binary=orjson orjson
1143+ ```
1144+
1145+ This is an example of building a wheel using the repository as source,
1146+ ` rustup ` installed from upstream, and a pinned version of Rust:
1147+
1148+ ``` sh
1149+ pip install maturin
1150+ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2020-10-19 --profile minimal -y
11391151maturin build --no-sdist --release --strip --manylinux off
1152+ ls -1 target/wheels
11401153```
11411154
11421155Problems with the Rust nightly channel may require pinning a version.
@@ -1156,7 +1169,12 @@ necessarily to install dependencies from PyPI specified in
11561169` test/requirements.txt ` . These require a C compiler. The tests do not
11571170make network requests.
11581171
1159- The tests should be run as part of the build.
1172+ The tests should be run as part of the build. It can be run like this:
1173+
1174+ ``` sh
1175+ pip install -r test/requirements.txt
1176+ pytest -q test
1177+ ```
11601178
11611179## License
11621180
You can’t perform that action at this time.
0 commit comments