Merge pull request #269810 from fabaff/uri-template-bump

python311Packages.uri-template: 1.2.0 -> 1.3.0
This commit is contained in:
OTABI Tomoya 2023-11-26 13:52:16 +09:00 committed by GitHub
commit 1fb12b8475
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 69 additions and 34 deletions

View file

@ -2,27 +2,29 @@
, buildPythonPackage , buildPythonPackage
, cmake , cmake
, fetchFromGitHub , fetchFromGitHub
, isPy3k
, pytestCheckHook
, nbconvert
, joblib , joblib
, jupyter , jupyter
, jupyter-client , jupyter-client
, numpy
, scipy
, pandas
, matplotlib , matplotlib
, nbconvert
, ninja , ninja
, numba , numba
, numpy
, pandas
, pybind11 , pybind11
, pytestCheckHook
, pythonOlder
, scikit-build , scikit-build
, scipy
, setuptools
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "phik"; pname = "phik";
version = "0.12.3"; version = "0.12.3";
disabled = !isPy3k; pyproject = true;
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "KaveIO"; owner = "KaveIO";
@ -31,11 +33,11 @@ buildPythonPackage rec {
hash = "sha256-9o3EDhgmne2J1QfzjjNQc1mUcyCzoVrCnWXqjWkiZU0="; hash = "sha256-9o3EDhgmne2J1QfzjjNQc1mUcyCzoVrCnWXqjWkiZU0=";
}; };
nativeCheckInputs = [ nativeBuildInputs = [
pytestCheckHook cmake
nbconvert ninja
jupyter scikit-build
jupyter-client setuptools
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
@ -48,16 +50,19 @@ buildPythonPackage rec {
pybind11 pybind11
]; ];
# uses setuptools to drive build process nativeCheckInputs = [
dontUseCmakeConfigure = true; pytestCheckHook
nbconvert
nativeBuildInputs = [ jupyter
cmake jupyter-client
ninja
scikit-build
]; ];
pythonImportsCheck = [ "phik" ]; # Uses setuptools to drive build process
dontUseCmakeConfigure = true;
pythonImportsCheck = [
"phik"
];
postInstall = '' postInstall = ''
rm -r $out/bin rm -r $out/bin
@ -68,12 +73,27 @@ buildPythonPackage rec {
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 = "Phi_K is a new and practical correlation coefficient based on several refinements to Pearsons hypothesis test of independence of two variables."; longDescription = ''
homepage = "https://phik.readthedocs.io/en/latest/"; Phi_K is a new and practical correlation coefficient based on several refinements to
changelog = "https://github.com/KaveIO/PhiK/blob/${src.rev}/CHANGES.rst"; Pearsons hypothesis test of independence of two variables.
maintainers = with maintainers; [ melsigl ]; '';
homepage = "https://phik.readthedocs.io/";
changelog = "https://github.com/KaveIO/PhiK/blob/${version}/CHANGES.rst";
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ melsigl ];
}; };
} }

View file

@ -1,30 +1,45 @@
{ lib, buildPythonPackage, fetchFromGitHub, python }: { lib
, buildPythonPackage
, fetchFromGitHub
, python
, pythonOlder
, setuptools
, setuptools-scm
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "uri-template"; pname = "uri-template";
version = "1.2.0"; version = "1.3.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "plinss"; owner = "plinss";
repo = "uri_template"; repo = "uri_template";
rev = "v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-IAq6GpEwimq45FU0QugLZLSOhwAmC1KbpZKD0zyxsUs="; hash = "sha256-38HFFqM6yfpsPrhIpE639ePy/NbLqKw7gbnE3y8sL3w=";
}; };
postPatch = '' env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
sed -i -e 's/0.0.0/${version}/' setup.py
''; nativeBuildInputs = [
setuptools
setuptools-scm
];
checkPhase = '' checkPhase = ''
${python.interpreter} test.py ${python.interpreter} test.py
''; '';
pythonImportsCheck = [ "uri_template" ]; pythonImportsCheck = [
"uri_template"
];
meta = with lib; { meta = with lib; {
description = "An implementation of RFC 6570 URI Templates"; description = "An implementation of RFC 6570 URI Templates";
homepage = "https://github.com/plinss/uri_template/"; homepage = "https://github.com/plinss/uri_template/";
license = licenses.mit; license = licenses.mit;
maintainers = []; maintainers = with maintainers; [ ];
}; };
} }