mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 00:33:10 +00:00
python311Packages.karton-classifier: modernize
This commit is contained in:
parent
485e368751
commit
35db852051
@ -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 = [
|
||||
|
Loading…
Reference in New Issue
Block a user