lol

python312Packages.mrsqm: fix build (#362775)

authored by

Aleksana and committed by
GitHub
8627d7ad c381e76e

+37 -11
+37 -11
pkgs/development/python-modules/mrsqm/default.nix
··· 1 1 { 2 2 lib, 3 3 buildPythonPackage, 4 - fetchPypi, 4 + fetchFromGitHub, 5 5 pythonOlder, 6 6 cython, 7 7 fftw, 8 8 pandas, 9 9 scikit-learn, 10 10 numpy, 11 + pip, 12 + setuptools, 13 + pytestCheckHook, 11 14 }: 12 15 13 16 buildPythonPackage rec { 14 17 pname = "mrsqm"; 15 18 version = "0.0.7"; 16 - format = "setuptools"; 19 + pyproject = true; 20 + 21 + build-system = [ 22 + setuptools 23 + ]; 17 24 18 25 disabled = pythonOlder "3.8"; 19 26 20 - src = fetchPypi { 21 - inherit pname version; 22 - hash = "sha256-kZwgRazvPCmARcfhLByh1E8VPurrb8gVZc96hFfDOvs="; 27 + src = fetchFromGitHub { 28 + owner = "mlgig"; 29 + repo = "mrsqm"; 30 + tag = "v.${version}"; 31 + hash = "sha256-5K6vCU0HExnmYNThZNDCbEtII9bUGauxDtKkJXe/85Q="; 23 32 }; 24 33 25 34 buildInputs = [ fftw ]; 26 35 27 36 nativeBuildInputs = [ cython ]; 28 37 29 - propagatedBuildInputs = [ 38 + dependencies = [ 30 39 pandas 31 40 scikit-learn 32 41 numpy 42 + pip 33 43 ]; 34 44 35 - # Package has no tests 36 - doCheck = false; 45 + postPatch = '' 46 + substituteInPlace setup.py \ 47 + --replace-fail "'pytest-runner'" "" 48 + substituteInPlace pyproject.toml \ 49 + --replace-fail "numpy==" "numpy>=" 50 + ''; 51 + 52 + preBuild = '' 53 + export HOME=$(mktemp -d) 54 + ''; 55 + 56 + nativeCheckInputs = [ 57 + pytestCheckHook 58 + ]; 59 + 60 + pytestFlagsArray = [ 61 + "tests/mrsqm" 62 + ]; 37 63 38 64 pythonImportsCheck = [ "mrsqm" ]; 39 65 40 - meta = with lib; { 66 + meta = { 41 67 description = "MrSQM (Multiple Representations Sequence Miner) is a time series classifier"; 42 68 homepage = "https://pypi.org/project/mrsqm"; 43 69 changelog = "https://github.com/mlgig/mrsqm/releases/tag/v.${version}"; 44 - license = licenses.gpl3Only; 45 - maintainers = with maintainers; [ mbalatsko ]; 70 + license = lib.licenses.gpl3Only; 71 + maintainers = with lib.maintainers; [ mbalatsko ]; 46 72 }; 47 73 }