Skip to content

Commit

Permalink
pythonPackages.buildSetupcfg: Allow disabling tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
shlevy committed Apr 13, 2018
1 parent 293e18d commit da8fc39
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkgs/build-support/build-setupcfg/default.nix
Expand Up @@ -5,18 +5,20 @@
# * meta: Standard nixpkgs metadata.
# * application: Whether this package is a python library or an
# 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
then pythonPackages.buildPythonApplication
else pythonPackages.buildPythonPackage;
in build {
inherit (info) pname version;

inherit src meta;
inherit src meta doCheck;

nativeBuildInputs = map (p: pythonPackages.${p}) (
(info.setup_requires or []) ++
(info.tests_require or []));
(if doCheck then (info.tests_require or []) else []));

propagatedBuildInputs = map (p: pythonPackages.${p})
(info.install_requires or []);
Expand Down

0 comments on commit da8fc39

Please sign in to comment.