Merge pull request #116954 from danieldk/setuptools-rust-0.12.1

python3Packages.setuptools-rust: 0.11.6 -> 0.12.1
This commit is contained in:
Daniël de Kok 2021-03-22 11:54:00 +01:00 committed by GitHub
commit 611ba48b71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 12 deletions

View file

@ -2,7 +2,7 @@
, lib
, buildPythonPackage
, fetchPypi
, isPy27
, pythonOlder
, semantic-version
, setuptools
, setuptools-scm
@ -11,12 +11,12 @@
buildPythonPackage rec {
pname = "setuptools-rust";
version = "0.11.6";
disabled = isPy27;
version = "0.12.1";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "a5b5954909cbc5d66b914ee6763f81fa2610916041c7266105a469f504a7c4ca";
sha256 = "647009e924f0ae439c7f3e0141a184a69ad247ecb9044c511dabde232d3d570e";
};
nativeBuildInputs = [ setuptools-scm ];

View file

@ -17,5 +17,9 @@ callPackage ../../../tools/rust/maturin/pyo3-test/generic.nix {
rust.rustc
]);
sourceRoot = "source/examples/word-count";
preConfigure = ''
# sourceRoot puts Cargo.lock in the wrong place due to the
# example setup.
cd examples/word-count
'';
}

View file

@ -1,8 +1,8 @@
{ callPackage
{ python3
, rustPlatform
}:
callPackage ./generic.nix {
python3.pkgs.callPackage ./generic.nix {
buildAndTestSubdir = "examples/word-count";
nativeBuildInputs = with rustPlatform; [

View file

@ -3,17 +3,17 @@
{ lib
, fetchFromGitHub
, python3Packages
, python
, rustPlatform
, nativeBuildInputs
, buildAndTestSubdir ? null
, format ? "pyproject"
, sourceRoot ? "source"
, preConfigure ? ""
}:
python3Packages.buildPythonPackage rec {
python.pkgs.buildPythonPackage rec {
pname = "word-count";
version = "0.13.2";
@ -25,14 +25,14 @@ python3Packages.buildPythonPackage rec {
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src sourceRoot patches;
inherit src patches;
name = "${pname}-${version}";
hash = "sha256-//TmozgWy9zrSpMKX92XdHj4fw/T1Elfgn4YhhR7ot0=";
};
patches = [ ./Cargo.lock.patch ];
inherit buildAndTestSubdir format nativeBuildInputs sourceRoot;
inherit buildAndTestSubdir format nativeBuildInputs preConfigure;
pythonImportsCheck = [ "word_count" ];