python3Packages.sklearn2pmml: init at 0.129.2 (#494361)
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
setuptools,
|
||||
|
||||
# dependencies
|
||||
dill,
|
||||
jre_minimal,
|
||||
joblib,
|
||||
pandas,
|
||||
scikit-learn,
|
||||
|
||||
# tests
|
||||
pytestCheckHook,
|
||||
statsmodels,
|
||||
}:
|
||||
|
||||
let
|
||||
jre = jre_minimal.override {
|
||||
modules = [
|
||||
"java.base"
|
||||
"java.desktop"
|
||||
"java.instrument"
|
||||
"java.logging"
|
||||
"java.net.http"
|
||||
"java.sql"
|
||||
"java.xml"
|
||||
];
|
||||
};
|
||||
in
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "sklearn2pmml";
|
||||
version = "0.129.2";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jpmml";
|
||||
repo = "sklearn2pmml";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-xntm+AUwylJuMhTAYi6o2tIxlzzeo8lkwtSvgeuQpQU=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace sklearn2pmml/__init__.py \
|
||||
--replace-fail 'result.extend(["java"])' 'result.extend(["${lib.getExe jre}"])'
|
||||
|
||||
# Fix deprecated dash-separated key in setup.cfg
|
||||
substituteInPlace setup.cfg \
|
||||
--replace-fail "description-file" "description_file"
|
||||
'';
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
dill
|
||||
joblib
|
||||
pandas
|
||||
scikit-learn
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
statsmodels
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
# Only run the main test suite; subpackage tests require
|
||||
# sklearn-pandas which is not available in nixpkgs
|
||||
"sklearn2pmml/tests"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "sklearn2pmml" ];
|
||||
|
||||
meta = {
|
||||
description = "Python library for converting Scikit-Learn pipelines to PMML";
|
||||
homepage = "https://github.com/jpmml/sklearn2pmml";
|
||||
changelog = "https://github.com/jpmml/sklearn2pmml/blob/${finalAttrs.version}/NEWS.md";
|
||||
sourceProvenance = with lib.sourceTypes; [
|
||||
fromSource
|
||||
binaryBytecode # bundled JAR files
|
||||
];
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = with lib.maintainers; [ b-rodrigues ];
|
||||
};
|
||||
})
|
||||
@@ -17753,6 +17753,8 @@ self: super: with self; {
|
||||
|
||||
sklearn-deap = callPackage ../development/python-modules/sklearn-deap { };
|
||||
|
||||
sklearn2pmml = callPackage ../development/python-modules/sklearn2pmml { };
|
||||
|
||||
skodaconnect = callPackage ../development/python-modules/skodaconnect { };
|
||||
|
||||
skops = callPackage ../development/python-modules/skops { };
|
||||
|
||||
Reference in New Issue
Block a user