mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 01:04:25 +00:00
python310Packages.wordcloud: switch to pytestCheckHook
This commit is contained in:
parent
33c6d916c7
commit
c78821e0fd
@ -1,35 +1,44 @@
|
||||
{ lib, buildPythonPackage, fetchFromGitHub
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, cython
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, matplotlib
|
||||
, mock
|
||||
, numpy
|
||||
, pillow
|
||||
, cython
|
||||
, pytest-cov
|
||||
, pytest
|
||||
, fetchpatch
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "word_cloud";
|
||||
pname = "wordcloud";
|
||||
version = "1.8.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
# tests are not included in pypi tarball
|
||||
src = fetchFromGitHub {
|
||||
owner = "amueller";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-4EFQfv+Jn9EngUAyDoJP0yv9zr9Tnbrdwq1YzDacB9Q=";
|
||||
hash = "sha256-4EFQfv+Jn9EngUAyDoJP0yv9zr9Tnbrdwq1YzDacB9Q=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cython ];
|
||||
propagatedBuildInputs = [ matplotlib numpy pillow ];
|
||||
nativeBuildInputs = [
|
||||
cython
|
||||
];
|
||||
|
||||
# Tests require extra dependencies
|
||||
checkInputs = [ mock pytest pytest-cov ];
|
||||
propagatedBuildInputs = [
|
||||
matplotlib
|
||||
numpy
|
||||
pillow
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
PATH=$out/bin:$PATH pytest test
|
||||
'';
|
||||
checkInputs = [
|
||||
mock
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
@ -39,8 +48,26 @@ buildPythonPackage rec {
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace " --cov --cov-report xml --tb=short" ""
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
cd test
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"wordcloud"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Don't tests CLI
|
||||
"test_cli_as_executable"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A little word cloud generator in Python";
|
||||
description = "Word cloud generator in Python";
|
||||
homepage = "https://github.com/amueller/word_cloud";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ jm2dev ];
|
||||
|
Loading…
Reference in New Issue
Block a user