python3Packages.setuptools-rust: add passthru test that uses maturinBuildHook
The test builds the PyO3 word_count example module using setuptools-rust. The motivation is to have a trivial test that does not regress for reasons unrelated to setuptools-rust or hook updates.
This commit is contained in:
parent
2e76fa453f
commit
3bdae33948
@ -1,4 +1,5 @@
|
|||||||
{ lib
|
{ callPackage
|
||||||
|
, lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, isPy27
|
, isPy27
|
||||||
@ -23,6 +24,8 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
propagatedBuildInputs = [ semantic-version setuptools toml ];
|
propagatedBuildInputs = [ semantic-version setuptools toml ];
|
||||||
|
|
||||||
|
passthru.tests.pyo3 = callPackage ./pyo3-test {};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Setuptools plugin for Rust support";
|
description = "Setuptools plugin for Rust support";
|
||||||
homepage = "https://github.com/PyO3/setuptools-rust";
|
homepage = "https://github.com/PyO3/setuptools-rust";
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
{ callPackage
|
||||||
|
, rustPlatform
|
||||||
|
, setuptools-rust
|
||||||
|
}:
|
||||||
|
|
||||||
|
callPackage ../../../tools/rust/maturin/pyo3-test/generic.nix {
|
||||||
|
# Isolated builds break for this package, because PyO3 is not
|
||||||
|
# in the build root of the Python Package:
|
||||||
|
#
|
||||||
|
# https://github.com/pypa/pip/issues/6276
|
||||||
|
#
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [
|
||||||
|
cargoSetupHook
|
||||||
|
rust.cargo
|
||||||
|
rust.rustc
|
||||||
|
]);
|
||||||
|
|
||||||
|
sourceRoot = "source/examples/word-count";
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user