Merge pull request #119157 from fabaff/karton-classifier
python3Packages.karton-classifier: init at 1.0.0
This commit is contained in:
commit
f0ada2d57b
@ -0,0 +1,48 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, chardet
|
||||||
|
, fetchFromGitHub
|
||||||
|
, karton-core
|
||||||
|
, python
|
||||||
|
, python_magic
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "karton-classifier";
|
||||||
|
version = "1.0.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "CERT-Polska";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "05pxv0smrzgmljykc6yx0rx8b85ck7fa09xjkjw0dd7lb6bb19a6";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
chardet
|
||||||
|
karton-core
|
||||||
|
python_magic
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace requirements.txt \
|
||||||
|
--replace "chardet==3.0.4" "chardet" \
|
||||||
|
--replace "karton-core==4.0.4" "karton-core" \
|
||||||
|
--replace "python-magic==0.4.18" "python-magic"
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
${python.interpreter} -m unittest discover
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "karton.classifier" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "File type classifier for the Karton framework";
|
||||||
|
homepage = "https://github.com/CERT-Polska/karton-classifier";
|
||||||
|
license = with licenses; [ bsd3 ];
|
||||||
|
maintainers = with maintainers; [ fab ];
|
||||||
|
};
|
||||||
|
}
|
@ -3671,6 +3671,8 @@ in {
|
|||||||
|
|
||||||
kaptan = callPackage ../development/python-modules/kaptan { };
|
kaptan = callPackage ../development/python-modules/kaptan { };
|
||||||
|
|
||||||
|
karton-classifier = callPackage ../development/python-modules/karton-classifier { };
|
||||||
|
|
||||||
karton-core = callPackage ../development/python-modules/karton-core { };
|
karton-core = callPackage ../development/python-modules/karton-core { };
|
||||||
|
|
||||||
kazoo = callPackage ../development/python-modules/kazoo { };
|
kazoo = callPackage ../development/python-modules/kazoo { };
|
||||||
|
Loading…
Reference in New Issue
Block a user