Package with some fast Rust functions for use with FRC resolution determination for microscopy. TU Delft BEP 2021-2022.
Project description
rustfrc
Installation
Wheel (Windows)
There is a Windows-compatible .whl file available in releases. Use pip install <.whl filename>
in your Python environment, for example: pip install rustfrc-0.1.0-cp39-none-win_amd64.whl
, to install it. Then, use import rustfrc
in your Python script to be able to use the Rust functions.
From source (using maturin)
rustfrc
uses poetry
as its Python dependency manager. For best results, create a poetry
virtualenv with the pyproject.toml
and run poetry update
to install the required packages.
Otherwise, installing maturin
manually should also work.
Build a wheel file like this (if using poetry, append poetry run
before the command) from the project directory:
maturin build --release
If you want to choose which versions of Python to build for, you can append e.g. -i python3.9 python3.8 python3.7
This generates .whl
files in \target\wheels
. Then, create a Python environment of your choosing (with numpy ^1.18
and python ^3.7
), drop the .whl
file in it and run pip install <.whl filename>
, for example: pip install rustfrc-0.1.0-cp39-none-win_amd64.whl
. Then, use import rustfrc
in your Python script to be able to use the Rust functions. Building for Linux is a bit more challenging, take a look at the maturin page.
Take a look at PyO3 for other installation options as the only true requirement for building is using a tool that understands PyO3 bindings, as those are used in the Rust code.
Manylinux
If you want to build .whl files that are compatible with a wide range of Linux distributions, using a manylinux container is necessary.
Go into the rustfrc/docker
directory and run:
docker pull quay.io/pypa/manylinux2014_x86_64
docker build -t tmtenbrink/manylinux2014-rustfrc --build-arg PY_ABI=cp39-cp39 .
After the image is built, run it as a container:
docker run -it tmtenbrink/manylinux2014-rustfrc
Then follow the same steps as above, but when the wheels are built do, which should resolve any issues:
find . -name '*.whl' -exec auditwheel repair {} \;
Uploading to PyPI (test)
(Again, use poetry run
)
twine upload --repository testpypi wheelhouse/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for rustfrc-0.1.2-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b19a25b4b34c3861b84812e0e2fb222573ae6f9f5c914964c2a071fb2806e929 |
|
MD5 | da31f71efe2254cb505fb24a320fcb1d |
|
BLAKE2b-256 | 913875ce0aa10597a343307da466e7446441da41a213e46589914de796bc81de |
Hashes for rustfrc-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e8dabb38595b27e846b5c89407c0f66c90e4d04dc3e532e240f56ae2b40cfee |
|
MD5 | 2811be79b33e01695f19d3224e1875f8 |
|
BLAKE2b-256 | e11a2b0baff7dc090464ce99a894d0c510b7b353299efa003061379975eed761 |
Hashes for rustfrc-0.1.2-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0160b303b1e4f3857daf9fcfbdfbb8d41717fa66bdfdc777ece23ac3edbc7158 |
|
MD5 | ad1575295f00747665155c0bc778d85d |
|
BLAKE2b-256 | d3505478177d363c2ed6b9e84a9ce027998c1e602dce2c557a84834336de9158 |
Hashes for rustfrc-0.1.2-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f47639af625568ee9d27e6bc706ba32de0c9f838036e752e74abdff122a62b3 |
|
MD5 | 565276b0cb6b6575a373b8c4cc9212cc |
|
BLAKE2b-256 | d612796d92291e95f88fdb9ced43b6247800a840df7cae45dc9388717733f450 |
Hashes for rustfrc-0.1.2-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88353d7d84d1085b52b927fbc3028bc617024e9fc7323ba171e0a52ec779ff95 |
|
MD5 | 4e09f9cb58065920b9c34097d166a75d |
|
BLAKE2b-256 | 89c5fc46c493cb81c1a6ca33781d0f7d00b7238242bfc28eceee2e49ec5b6f4e |
Hashes for rustfrc-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20d6a1d98d9364e207478906c1728c7628c7aef96293664156c5489e08abd1e0 |
|
MD5 | b129c076876af8b3de6885bb4fc9816e |
|
BLAKE2b-256 | a7ac8e2e5c9e4e138dff7b9154672293ec61c478dd2c998150f01ea32f3be785 |
Hashes for rustfrc-0.1.2-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77356c77729b33086bace7dc7f6967cab1bae8afd16406ad8665084ddc6df88f |
|
MD5 | 3d5b53bdaf4b55990b5bed2b82001144 |
|
BLAKE2b-256 | 9c97b1d8099157fd49c33d5067b332c9568fdd125cf6696350b3552fa4edfa1b |
Hashes for rustfrc-0.1.2-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33ef0bfbb7999d2d69fdfd4e1c9126247f2c0c8ce767341c4d6c6efd0c14c27e |
|
MD5 | b5b6dd7322739033b8df7fdd39acbec1 |
|
BLAKE2b-256 | 4c0b7eb5eb89350ca1352936d66072b0e94d942490972933d887e19612e4fc21 |
Hashes for rustfrc-0.1.2-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd9f569f56d6c2cf57fb1f81dc3af05197205fcda20171a68e244d89ffe164b7 |
|
MD5 | d1bb4141b716c39857be0d9277390697 |
|
BLAKE2b-256 | f3c0e756cead4e23e08c902019092767ffc5be58c60f1b5b907f7cb6a01ee2d3 |
Hashes for rustfrc-0.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ec122222a1bae0dec425a47f37f7762592e619ac715effcb38d8b00394037e6 |
|
MD5 | c68a9f72a5e01b84618718c649e8cdee |
|
BLAKE2b-256 | 45a6bd65a64e24765f8abf3035fa40c999e99daa6c6ad252f6f554c1092b4d5b |
Hashes for rustfrc-0.1.2-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a1ab5a50df4f5085ffd87b7bfd5a3c1d8dc343b4d94ea771d1a0fe4f4464b15 |
|
MD5 | 357e1579f771abd422df5e0bbb9048a8 |
|
BLAKE2b-256 | fe47f70afa3ae8b52f81102b49b2ca0f16cbcb98dfb5a3e40172b595474dc948 |
Hashes for rustfrc-0.1.2-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 423e6d61f560d193ef92a13d054e5cabaaca4f1463d80d0cfa3d01ec3f087b05 |
|
MD5 | 8f64054117f759ab52c4891d8a505d5e |
|
BLAKE2b-256 | df9a0f4873f1319d894de8c40b2dadcfb284f2f7fb6200bafc2ceb1d6ebff494 |