Skip to content

armgit / mwmbl

Public Imported from GitHub
0

An open source, non-profit web search engine

Run tests with maturin

Daoud Clarke1a1746714bb8
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5126581..372833d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -44,6 +44,12 @@ jobs:
virtualenvs-in-project: true
installer-parallel: true
+ #----------------------------------------------
+ # install Rust toolchain (required by maturin)
+ #----------------------------------------------
+ - name: Install Rust toolchain
+ uses: dtolnay/rust-toolchain@stable
+
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
@@ -60,10 +66,11 @@ jobs:
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
- # install your root project, if required
+ # build and install the project with maturin
+ # (compiles the Rust extension and installs the package)
#----------------------------------------------
- - name: Install project
- run: poetry install --no-interaction
+ - name: Install project with maturin
+ run: poetry run maturin develop
#----------------------------------------------
# run test suite
#----------------------------------------------
diff --git a/poetry.lock b/poetry.lock
index 11974b5..2509ece 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1161,6 +1161,33 @@ files = [
docutils = "*"
mistune = "<2"
+[[package]]
+name = "maturin"
+version = "1.13.1"
+description = "Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "maturin-1.13.1-py3-none-linux_armv6l.whl", hash = "sha256:416e4e01cb88b798e606ee43929df897e42c1647b722ef68283816cca99a8742"},
+ {file = "maturin-1.13.1-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:72888e87819ce546d0d2df900e4b385e4ef299077d92ee37b48923a5602dae94"},
+ {file = "maturin-1.13.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:98b5fcf1a186c217830a8295ecc2989c6b1cf50945417adfc15252107b9475b7"},
+ {file = "maturin-1.13.1-py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686.whl", hash = "sha256:3da18cccf2f683c0977bff9146a0908d6ffce836d600665736ac01679f588cb9"},
+ {file = "maturin-1.13.1-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl", hash = "sha256:6b1e5916a253243e8f5f9e847b62bbc98420eec48c9ce2e2e8724c6da89d359b"},
+ {file = "maturin-1.13.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:dc91031e0619c1e28730279ef9ee5f106c9b9ec806b013f888676b242f892eb7"},
+ {file = "maturin-1.13.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:001741c6cff56aa8ea59a0d78ae990c0550d0e3e82b00b683eedb4158a8ef7e6"},
+ {file = "maturin-1.13.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.musllinux_1_1_ppc64le.whl", hash = "sha256:01c845825c917c07c1d0b2c9032c59c16a7d383d1e649a46481d3e5693c2750f"},
+ {file = "maturin-1.13.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f69093ed4a0e6464e52a7fc26d714f859ce15630ec8070743398c6bf41f38a9e"},
+ {file = "maturin-1.13.1-py3-none-manylinux_2_31_riscv64.musllinux_1_1_riscv64.whl", hash = "sha256:c1490584f3c70af45466ee99065b49e6657ebdccac6b10571bb44681309c9396"},
+ {file = "maturin-1.13.1-py3-none-win32.whl", hash = "sha256:c6a720b252c99de072922dbe4432ab19662b6f80045b0355fec23bdfccb450da"},
+ {file = "maturin-1.13.1-py3-none-win_amd64.whl", hash = "sha256:a2017d2281203d0c6570240e7d746564d766d756105823b7de68bda6ae722711"},
+ {file = "maturin-1.13.1-py3-none-win_arm64.whl", hash = "sha256:2839024dcd65776abb4759e5bca29941971e095574162a4d335191da4be9ff24"},
+ {file = "maturin-1.13.1.tar.gz", hash = "sha256:9a87ff3b8e4d1c6eac33ebfe8e261e8236516d98d45c0323550621819b5a1a2f"},
+]
+
+[package.extras]
+patchelf = ["patchelf"]
+zig = ["ziglang (>=0.10.0)"]
+
[[package]]
name = "mistune"
version = "0.8.4"
@@ -1368,13 +1395,13 @@ test = ["pytest", "pytest-cov", "scipy"]
[[package]]
name = "platformdirs"
-version = "4.9.4"
+version = "4.9.6"
description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`."
optional = false
python-versions = ">=3.10"
files = [
- {file = "platformdirs-4.9.4-py3-none-any.whl", hash = "sha256:68a9a4619a666ea6439f2ff250c12a853cd1cbd5158d258bd824a7df6be2f868"},
- {file = "platformdirs-4.9.4.tar.gz", hash = "sha256:1ec356301b7dc906d83f371c8f487070e99d3ccf9e501686456394622a01a934"},
+ {file = "platformdirs-4.9.6-py3-none-any.whl", hash = "sha256:e61adb1d5e5cb3441b4b7710bea7e4c12250ca49439228cc1021c00dcfac0917"},
+ {file = "platformdirs-4.9.6.tar.gz", hash = "sha256:3bfa75b0ad0db84096ae777218481852c0ebc6c727b3168c1b9e0118e458cf0a"},
]
[[package]]
@@ -2685,4 +2712,4 @@ indexer = ["Levenshtein", "beautifulsoup4", "idna", "langdetect", "pyarrow", "py
[metadata]
lock-version = "2.0"
python-versions = ">=3.11,<3.12"
-content-hash = "ccc25f6107d393faf10771ef89fe6de6819a2534af3fbd963877bd741f5bf408"
+content-hash = "ecf8a0708a7d4cf01077ba8e92a43fef4302bf28be80bdc381f58e78618a5d6b"
diff --git a/pyproject.toml b/pyproject.toml
index 2e0cee6..8109776 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -68,6 +68,7 @@ indexer = [
[tool.poetry.group.dev.dependencies]
pytest = "^7.0.1"
fakeredis = "^2.30.1"
+maturin = ">=1.5,<2.0"
[build-system]
requires = ["maturin>=1.5,<2.0"]