Merge pull request #198273 from fabaff/chispa-fix

python310Packages.chispa: disable tests and adjust inputs
This commit is contained in:
Fabian Affolter 2022-10-28 23:00:47 +02:00 committed by GitHub
commit 4eb3b7c909
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 10 deletions

View file

@ -1,26 +1,41 @@
{ buildPythonPackage, fetchFromGitHub, lib, poetry-core, pyspark }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "chispa";
version = "0.8.3";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
repo = "chispa";
owner = "MrPowers";
repo = "chispa";
rev = "v${version}";
sha256 = "sha256-1ePx8VbU8pMd5EsZhFp6qyMptlUxpoCvJfuDm9xXOdc=";
hash = "sha256-1ePx8VbU8pMd5EsZhFp6qyMptlUxpoCvJfuDm9xXOdc=";
};
checkInputs = [ pyspark ];
nativeBuildInputs = [
poetry-core
];
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
setuptools
];
pythonImportsCheck = [ "chispa" ];
# Tests require a spark installation
doCheck = false;
# pythonImportsCheck needs spark installation
meta = with lib; {
homepage = "https://github.com/MrPowers/chispa";
description = "PySpark test helper methods with beautiful error messages";
homepage = "https://github.com/MrPowers/chispa";
license = licenses.mit;
maintainers = with maintainers; [ ratsclub ];
};

View file

@ -1,16 +1,23 @@
{ lib
, buildPythonPackage
, fetchPypi
, numpy
, pandas
, py4j
, pyarrow
, pythonOlder
}:
buildPythonPackage rec {
pname = "pyspark";
version = "3.3.0";
version = "3.3.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-fr6OlQVke00STVqC/KYN/TiRAhz4rWxeyId37uzpLPc=";
hash = "sha256-6Z+n3pK+QGiEv9gxwyuTBqOpneRM/Dmi7vtu0HRF1fo=";
};
# pypandoc is broken with pandoc2, so we just lose docs.
@ -25,6 +32,20 @@ buildPythonPackage rec {
py4j
];
passthru.optional-dependencies = {
ml = [
numpy
];
mllib = [
numpy
];
sql = [
numpy
pandas
pyarrow
];
};
# Tests assume running spark instance
doCheck = false;
@ -40,6 +61,6 @@ buildPythonPackage rec {
binaryBytecode
];
license = licenses.asl20;
maintainers = [ maintainers.shlevy ];
maintainers = with maintainers; [ shlevy ];
};
}