diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2023-11-26 16:24:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-26 16:24:48 -0500 |
commit | 19eb8a60fa38d7895b0900d7b0ba8034487574aa (patch) | |
tree | bae0a71f85b7a266f79093ce9c8fb15d2473d188 /pkgs/development/python-modules | |
parent | 52ebd318531d8806a338bc420752f90e11e9a1fa (diff) | |
parent | 937edb6590d2977a6f59eab7694ce33ea95c477b (diff) |
Merge pull request #270044 from NixOS/backport-269810-to-release-23.11
[Backport release-23.11] python311Packages.uri-template: 1.2.0 -> 1.3.0
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r-- | pkgs/development/python-modules/phik/default.nix | 68 | ||||
-rw-r--r-- | pkgs/development/python-modules/uri-template/default.nix | 33 |
2 files changed, 68 insertions, 33 deletions
diff --git a/pkgs/development/python-modules/phik/default.nix b/pkgs/development/python-modules/phik/default.nix index adf507cb048b3..bbc26de99cf74 100644 --- a/pkgs/development/python-modules/phik/default.nix +++ b/pkgs/development/python-modules/phik/default.nix @@ -2,27 +2,29 @@ , buildPythonPackage , cmake , fetchFromGitHub -, isPy3k -, pytestCheckHook -, nbconvert , joblib , jupyter , jupyter-client -, numpy -, scipy -, pandas , matplotlib +, nbconvert , ninja , numba +, numpy +, pandas , pybind11 +, pytestCheckHook +, pythonOlder , scikit-build +, scipy +, setuptools }: buildPythonPackage rec { pname = "phik"; version = "0.12.3"; - disabled = !isPy3k; - format = "pyproject"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "KaveIO"; @@ -31,11 +33,11 @@ buildPythonPackage rec { hash = "sha256-9o3EDhgmne2J1QfzjjNQc1mUcyCzoVrCnWXqjWkiZU0="; }; - nativeCheckInputs = [ - pytestCheckHook - nbconvert - jupyter - jupyter-client + nativeBuildInputs = [ + cmake + ninja + scikit-build + setuptools ]; propagatedBuildInputs = [ @@ -48,17 +50,20 @@ buildPythonPackage rec { pybind11 ]; - # uses setuptools to drive build process + nativeCheckInputs = [ + pytestCheckHook + nbconvert + jupyter + jupyter-client + ]; + + # Uses setuptools to drive build process dontUseCmakeConfigure = true; - nativeBuildInputs = [ - cmake - ninja - scikit-build + pythonImportsCheck = [ + "phik" ]; - pythonImportsCheck = [ "phik" ]; - postInstall = '' rm -r $out/bin ''; @@ -68,12 +73,27 @@ buildPythonPackage rec { 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; { description = "Phi_K correlation analyzer library"; - longDescription = "Phi_K is a new and practical correlation coefficient based on several refinements to Pearson’s hypothesis test of independence of two variables."; - homepage = "https://phik.readthedocs.io/en/latest/"; - changelog = "https://github.com/KaveIO/PhiK/blob/${src.rev}/CHANGES.rst"; - maintainers = with maintainers; [ melsigl ]; + longDescription = '' + Phi_K is a new and practical correlation coefficient based on several refinements to + Pearson’s hypothesis test of independence of two variables. + ''; + homepage = "https://phik.readthedocs.io/"; + changelog = "https://github.com/KaveIO/PhiK/blob/${version}/CHANGES.rst"; license = licenses.asl20; + maintainers = with maintainers; [ melsigl ]; }; } diff --git a/pkgs/development/python-modules/uri-template/default.nix b/pkgs/development/python-modules/uri-template/default.nix index db7dc602aea05..7bebffce194a3 100644 --- a/pkgs/development/python-modules/uri-template/default.nix +++ b/pkgs/development/python-modules/uri-template/default.nix @@ -1,30 +1,45 @@ -{ lib, buildPythonPackage, fetchFromGitHub, python }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, python +, pythonOlder +, setuptools +, setuptools-scm +}: buildPythonPackage rec { pname = "uri-template"; - version = "1.2.0"; + version = "1.3.0"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "plinss"; repo = "uri_template"; - rev = "v${version}"; - hash = "sha256-IAq6GpEwimq45FU0QugLZLSOhwAmC1KbpZKD0zyxsUs="; + rev = "refs/tags/v${version}"; + hash = "sha256-38HFFqM6yfpsPrhIpE639ePy/NbLqKw7gbnE3y8sL3w="; }; - postPatch = '' - sed -i -e 's/0.0.0/${version}/' setup.py - ''; + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; checkPhase = '' ${python.interpreter} test.py ''; - pythonImportsCheck = [ "uri_template" ]; + pythonImportsCheck = [ + "uri_template" + ]; meta = with lib; { description = "An implementation of RFC 6570 URI Templates"; homepage = "https://github.com/plinss/uri_template/"; license = licenses.mit; - maintainers = []; + maintainers = with maintainers; [ ]; }; } |