pythonPackages.buildSetupcfg: Allow disabling tests.
This commit is contained in:
parent
293e18d9c4
commit
da8fc391a0
@ -5,18 +5,20 @@
|
|||||||
# * meta: Standard nixpkgs metadata.
|
# * meta: Standard nixpkgs metadata.
|
||||||
# * application: Whether this package is a python library or an
|
# * application: Whether this package is a python library or an
|
||||||
# application which happens to be written in python.
|
# application which happens to be written in python.
|
||||||
pythonPackages: { src, info, meta ? {}, application ? false }: let
|
# * doCheck: Whether to run the test suites.
|
||||||
|
pythonPackages:
|
||||||
|
{ src, info, meta ? {}, application ? false, doCheck ? true }: let
|
||||||
build = if application
|
build = if application
|
||||||
then pythonPackages.buildPythonApplication
|
then pythonPackages.buildPythonApplication
|
||||||
else pythonPackages.buildPythonPackage;
|
else pythonPackages.buildPythonPackage;
|
||||||
in build {
|
in build {
|
||||||
inherit (info) pname version;
|
inherit (info) pname version;
|
||||||
|
|
||||||
inherit src meta;
|
inherit src meta doCheck;
|
||||||
|
|
||||||
nativeBuildInputs = map (p: pythonPackages.${p}) (
|
nativeBuildInputs = map (p: pythonPackages.${p}) (
|
||||||
(info.setup_requires or []) ++
|
(info.setup_requires or []) ++
|
||||||
(info.tests_require or []));
|
(if doCheck then (info.tests_require or []) else []));
|
||||||
|
|
||||||
propagatedBuildInputs = map (p: pythonPackages.${p})
|
propagatedBuildInputs = map (p: pythonPackages.${p})
|
||||||
(info.install_requires or []);
|
(info.install_requires or []);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user