mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
python3Packages.binaryornot: migrate to pyproject (#528735)
This commit is contained in:
commit
d95add19e9
1 changed files with 14 additions and 7 deletions
|
|
@ -2,33 +2,40 @@
|
|||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
setuptools,
|
||||
chardet,
|
||||
hypothesis,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "binaryornot";
|
||||
version = "0.4.4";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061";
|
||||
inherit (finalAttrs) pname version;
|
||||
hash = "sha256-NZUB38nUBjLtyfrIkOGVQtsaKHu8+lgXW2Zlg5IBgGE=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
prePatch = ''
|
||||
# TypeError: binary() got an unexpected keyword argument 'average_size'
|
||||
substituteInPlace tests/test_check.py \
|
||||
--replace "average_size=512" ""
|
||||
--replace-fail "average_size=512" ""
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ chardet ];
|
||||
dependencies = [ chardet ];
|
||||
|
||||
nativeCheckInputs = [ hypothesis ];
|
||||
|
||||
pythonImportsCheck = [ "binaryornot" ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/audreyr/binaryornot";
|
||||
description = "Ultra-lightweight pure Python package to check if a file is binary or text";
|
||||
license = lib.licenses.bsd3;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue