mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
python312Packages.videocr: modernize
This commit is contained in:
parent
dda86a4a7b
commit
7b602b5456
@ -2,6 +2,7 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
setuptools,
|
||||
levenshtein,
|
||||
pytesseract,
|
||||
opencv4,
|
||||
@ -11,14 +12,16 @@
|
||||
buildPythonPackage rec {
|
||||
pname = "videocr";
|
||||
version = "0.1.6";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1clifwczvhvbaw2spgxkkyqsbqh21vyfw3rh094pxfmq89ylyj63";
|
||||
hash = "sha256-w0hPfUK4un5JAjAP7vwOAuKlsZ+zv6sFV2vD/Rl3kbI=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
levenshtein
|
||||
pytesseract
|
||||
opencv4
|
||||
@ -27,12 +30,12 @@ buildPythonPackage rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "python-Levenshtein" "Levenshtein" \
|
||||
--replace "opencv-python" "opencv"
|
||||
--replace-fail "python-Levenshtein" "Levenshtein" \
|
||||
--replace-fail "opencv-python" "opencv"
|
||||
substituteInPlace videocr/constants.py \
|
||||
--replace "master" "main"
|
||||
--replace-fail "master" "main"
|
||||
substituteInPlace videocr/video.py \
|
||||
--replace '--tessdata-dir "{}"' '--tessdata-dir="{}"'
|
||||
--replace-fail '--tessdata-dir "{}"' '--tessdata-dir="{}"'
|
||||
'';
|
||||
|
||||
# Project has no tests
|
||||
|
Loading…
Reference in New Issue
Block a user