python39Packages.flit-core: break infinite recursion with setuptools-scm by splitting tests, add SuperSandro2000 as maintainer

This commit is contained in:
Sandro Jäckel 2021-08-27 02:35:00 +02:00 committed by Martin Weinelt
parent 96b33e5997
commit 8d1439ee85
2 changed files with 39 additions and 8 deletions

View file

@ -1,7 +1,7 @@
{ lib
, buildPythonPackage
, callPackage
, flit
, isPy3k
, toml
, pytestCheckHook
, testpath
@ -12,6 +12,11 @@ buildPythonPackage rec {
version = "3.2.0";
format = "pyproject";
outputs = [
"out"
"testsout"
];
inherit (flit) src patches;
preConfigure = ''
@ -22,19 +27,23 @@ buildPythonPackage rec {
toml
];
checkInputs = [
pytestCheckHook
testpath
];
postInstall = ''
mkdir $testsout
cp -R ../tests $testsout/tests
'';
# check in passthru.tests.pytest to escape infinite recursion with setuptools-scm
doCheck = false;
passthru.tests = {
inherit flit;
pytest = callPackage ./tests.nix { };
};
meta = {
meta = with lib; {
description = "Distribution-building parts of Flit. See flit package for more information";
homepage = "https://github.com/takluyver/flit";
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.fridh ];
license = licenses.bsd3;
maintainers = with maintainers; [ fridh SuperSandro2000 ];
};
}

View file

@ -0,0 +1,22 @@
{ buildPythonPackage
, flit
, flit-core
, pytestCheckHook
, testpath
}:
buildPythonPackage rec {
pname = "flit-core";
inherit (flit-core) version;
src = flit-core.testsout;
dontBuild = true;
dontInstall = true;
checkInputs = [
flit
pytestCheckHook
testpath
];
}