mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 10:43:27 +00:00
python39Packages.tomli: break infinite recursion with setuptools-scm by splitting tests, add SuperSandro2000 as maintainer
This commit is contained in:
parent
e0620c63a7
commit
ce240f5ca1
@ -1,9 +1,8 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
, flit-core
|
||||
, pytestCheckHook
|
||||
, python-dateutil
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -11,6 +10,11 @@ buildPythonPackage rec {
|
||||
version = "1.1.0";
|
||||
format = "pyproject";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"testsout"
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hukkin";
|
||||
repo = pname;
|
||||
@ -20,17 +24,24 @@ buildPythonPackage rec {
|
||||
|
||||
nativeBuildInputs = [ flit-core ];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
python-dateutil
|
||||
];
|
||||
postInstall = ''
|
||||
mkdir $testsout
|
||||
cp -R benchmark/ pyproject.toml tests/ $testsout/
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "tomli" ];
|
||||
|
||||
# check in passthru.tests.pytest to escape infinite recursion with setuptools-scm
|
||||
doCheck = false;
|
||||
|
||||
passthru.tests = {
|
||||
pytest = callPackage ./tests.nix { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Python library for parsing TOML, fully compatible with TOML v1.0.0";
|
||||
homepage = "https://github.com/hukkin/tomli";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ veehaitch ];
|
||||
maintainers = with maintainers; [ veehaitch SuperSandro2000 ];
|
||||
};
|
||||
}
|
||||
|
21
pkgs/development/python-modules/tomli/tests.nix
Normal file
21
pkgs/development/python-modules/tomli/tests.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ buildPythonPackage
|
||||
, tomli
|
||||
, pytestCheckHook
|
||||
, python-dateutil
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "tomli-tests";
|
||||
inherit (tomli) version;
|
||||
|
||||
src = tomli.testsout;
|
||||
|
||||
dontBuild = true;
|
||||
dontInstall = true;
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
python-dateutil
|
||||
tomli
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user