python311Packages.karton-classifier: modernize

This commit is contained in:
Peder Bergebakken Sundt 2024-08-12 02:32:18 +02:00
parent 485e368751
commit 35db852051

View File

@ -3,6 +3,7 @@
buildPythonPackage,
chardet,
fetchFromGitHub,
setuptools,
karton-core,
pytestCheckHook,
python-magic,
@ -12,18 +13,25 @@
buildPythonPackage rec {
pname = "karton-classifier";
version = "2.0.0";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "CERT-Polska";
repo = pname;
repo = "karton-classifier";
rev = "refs/tags/v${version}";
hash = "sha256-DH8I4Lbbs2TVMvYlvh/P2I/7O4+VechP2JDDVHNsTSg=";
};
propagatedBuildInputs = [
pythonRelaxDeps = [
"chardet"
"python-magic"
];
build-system = [ setuptools ];
dependencies = [
chardet
karton-core
python-magic
@ -31,12 +39,6 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ];
postPatch = ''
substituteInPlace requirements.txt \
--replace "chardet==3.0.4" "chardet" \
--replace "python-magic==0.4.18" "python-magic"
'';
pythonImportsCheck = [ "karton.classifier" ];
disabledTests = [