Merge pull request #310894 from TomaSajt/phik

python312Packages.phik: fix dependencies, clean up
This commit is contained in:
OTABI Tomoya 2024-05-12 08:33:05 +09:00 committed by GitHub
commit 62e7060bba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,20 +3,17 @@
, cmake , cmake
, fetchFromGitHub , fetchFromGitHub
, joblib , joblib
, jupyter
, jupyter-client
, matplotlib , matplotlib
, nbconvert
, ninja , ninja
, numba
, numpy , numpy
, pandas , pandas
, pathspec
, pyproject-metadata
, pybind11 , pybind11
, pytestCheckHook , pytestCheckHook
, pythonOlder , pythonOlder
, scikit-build , scikit-build-core
, scipy , scipy
, setuptools
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -24,7 +21,7 @@ buildPythonPackage rec {
version = "0.12.4"; version = "0.12.4";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.8";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "KaveIO"; owner = "KaveIO";
@ -33,58 +30,39 @@ buildPythonPackage rec {
hash = "sha256-YsH7vVn6gzejunUjUY/RIcvWtaQ/W1gbciJWKi5LDTk="; hash = "sha256-YsH7vVn6gzejunUjUY/RIcvWtaQ/W1gbciJWKi5LDTk=";
}; };
nativeBuildInputs = [ build-system = [
cmake cmake
ninja ninja
scikit-build pathspec
setuptools pybind11
pyproject-metadata
scikit-build-core
]; ];
propagatedBuildInputs = [ dependencies = [
joblib joblib
numpy
scipy
pandas
matplotlib matplotlib
numba numpy
pybind11 pandas
scipy
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook pytestCheckHook
nbconvert
jupyter
jupyter-client
]; ];
# Uses setuptools to drive build process # Uses scikit-build-core to drive build process
dontUseCmakeConfigure = true; dontUseCmakeConfigure = true;
pythonImportsCheck = [ pythonImportsCheck = [
"phik" "phik"
]; ];
postInstall = ''
rm -r $out/bin
'';
preCheck = '' preCheck = ''
# import from $out # import from $out
rm -r phik rm -r phik
''; '';
disabledTests = [
# TypeError: 'numpy.float64' object cannot be interpreted as an integer
# https://github.com/KaveIO/PhiK/issues/73
"test_significance_matrix_hybrid"
"test_significance_matrix_mc"
];
disabledTestPaths = [
# Don't test integrations
"tests/phik_python/integration/"
];
meta = with lib; { meta = with lib; {
description = "Phi_K correlation analyzer library"; description = "Phi_K correlation analyzer library";
longDescription = '' longDescription = ''