python312Packages.opencv-python: init at 4.9.0 (#353249)

This commit is contained in:
Robert Schütz
2024-11-03 21:24:56 -08:00
committed by GitHub
23 changed files with 73 additions and 109 deletions
@@ -5,7 +5,7 @@
, lxml
, matplotlib
, numpy
, opencv4
, opencv-python
, pymavlink
, pyserial
, setuptools
@@ -25,16 +25,11 @@ buildPythonApplication rec {
hash = "sha256-A7tqV1kBCSuWHJUTdUZGcPY/r7X1edGZs6xDctpMbMI=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "opencv-python" ""
'';
propagatedBuildInputs = [
lxml
matplotlib
numpy
opencv4
opencv-python
pymavlink
pyserial
setuptools
+1 -6
View File
@@ -29,7 +29,7 @@ python3.pkgs.buildPythonApplication rec {
numpy
onnx
onnxruntime # Nixpkgs onnxruntime is missing CUDA support
opencv4
opencv-python
scikit-image
tqdm
];
@@ -39,11 +39,6 @@ python3.pkgs.buildPythonApplication rec {
''--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ pkgs.onnxruntime ]}"''
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "opencv-python" "opencv"
'';
pythonImportsCheck = [ "deface" "onnx" "onnxruntime" ];
meta = {
+1 -7
View File
@@ -17,12 +17,6 @@ python3Packages.buildPythonApplication rec {
fetchSubmodules = true;
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'opencv-python' 'opencv'
'';
pythonRelaxDeps = [ "torchvision" ];
build-system = with python3Packages; [ setuptools-scm ];
@@ -33,7 +27,7 @@ python3Packages.buildPythonApplication rec {
manga-ocr
natsort
numpy
opencv4
opencv-python
pillow
pyclipper
requests
@@ -6,7 +6,7 @@
setuptools,
pytestCheckHook,
numpy,
opencv4,
opencv-python,
stringzilla,
}:
@@ -24,13 +24,13 @@ buildPythonPackage rec {
hash = "sha256-GwT7Py7pKbpHxx4avj37/hRjSJXdH5uBU11nCITysVw=";
};
pythonRemoveDeps = [ "opencv-python" ];
pythonRelaxDeps = [ "opencv-python" ];
build-system = [ setuptools ];
dependencies = [
numpy
opencv4
opencv-python
stringzilla
];
@@ -11,7 +11,7 @@
albucore,
eval-type-backport,
numpy,
opencv4,
opencv-python,
pydantic,
pyyaml,
scikit-image,
@@ -47,7 +47,7 @@ buildPythonPackage rec {
./dont-check-for-updates.patch
];
pythonRemoveDeps = [ "opencv-python" ];
pythonRelaxDeps = [ "opencv-python" ];
build-system = [ setuptools ];
@@ -55,7 +55,7 @@ buildPythonPackage rec {
albucore
eval-type-backport
numpy
opencv4
opencv-python
pydantic
pyyaml
scikit-image
@@ -8,7 +8,7 @@
fetchFromGitHub,
fetchPypi,
minexr,
opencv4,
opencv-python,
requests,
runCommand,
zcs,
@@ -29,14 +29,10 @@ buildPythonPackage rec {
minexr
zcs
requests
opencv4
opencv-python
boxx
];
postPatch = ''
sed -i 's/opencv-python//g' requirements.txt
'';
# pythonImportsCheck = [ "bpycv" ]; # this import depends on bpy that is only available inside blender
doCheck = false;
@@ -6,7 +6,7 @@
lib,
libjpeg,
numba,
opencv4,
opencv-python,
pandas,
pkg-config,
pytorch-pfn-extras,
@@ -40,7 +40,6 @@ buildPythonPackage rec {
substituteInPlace setup.py \
--replace-fail "'assertpy'," "" \
--replace-fail "'fastargs'," "" \
--replace-fail "'opencv-python'," "" \
--replace-fail "'psutil'," "" \
'';
@@ -48,7 +47,7 @@ buildPythonPackage rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libjpeg ];
propagatedBuildInputs = [
opencv4
opencv-python
numba
pandas
pytorch-pfn-extras
@@ -6,7 +6,7 @@
setuptools,
matplotlib,
numpy,
opencv4,
opencv-python,
pillow,
scikit-learn,
torch,
@@ -27,11 +27,6 @@ buildPythonPackage rec {
hash = "sha256-q9PcG836Az+2o1XqeKNh0+z9GN9UGinmGyOAhD5B3Zw=";
};
postPatch = ''
substituteInPlace requirements.txt\
--replace "opencv-python" "opencv"
'';
nativeBuildInputs = [
];
@@ -46,7 +41,7 @@ buildPythonPackage rec {
dependencies = [
matplotlib
numpy
opencv4
opencv-python
pillow
scikit-learn
torchvision
@@ -5,7 +5,7 @@
numpy,
scikit-image,
lib,
opencv4,
opencv-python,
}:
buildPythonPackage rec {
@@ -18,14 +18,12 @@ buildPythonPackage rec {
sha256 = "044e173f24d5934899bdbf3596bfbec917e8083e507eed583ab217abebbe084d";
};
pythonRemoveDeps = [ "opencv-python" ];
build-system = [ setuptools ];
dependencies = [
numpy
scikit-image
opencv4
opencv-python
];
doCheck = false;
@@ -4,7 +4,7 @@
lib,
setuptools,
numpy,
opencv4,
opencv-python,
lxml,
xmljson,
pytestCheckHook,
@@ -22,13 +22,11 @@ buildPythonPackage rec {
sha256 = "1zv2gj8cbakhh2fyr2611cbqhfk37a56x973ny9n43y70n26pzm8";
};
pythonRemoveDeps = [ "opencv-python" ];
build-system = [ setuptools ];
dependencies = [
numpy
opencv4
opencv-python
lxml
xmljson
];
@@ -4,7 +4,7 @@
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
opencv4,
opencv-python,
torch,
onnx,
onnxruntime,
@@ -30,7 +30,7 @@ buildPythonPackage rec {
propagatedBuildInputs =
[
opencv4
opencv-python
torch
pillow
pywavelets
@@ -42,8 +42,6 @@ buildPythonPackage rec {
];
postPatch = ''
substituteInPlace setup.py \
--replace 'opencv-python>=4.1.0.25' 'opencv'
substituteInPlace imwatermark/rivaGan.py --replace \
'You can install it with pip: `pip install onnxruntime`.' \
'You can install it with an override: `python3Packages.invisible-watermark.override { withOnnx = true; };`.'
@@ -4,7 +4,7 @@
fetchFromGitHub,
# build inputs
numpy,
opencv4,
opencv-python,
scipy,
pandas,
pillow,
@@ -54,14 +54,9 @@ buildPythonPackage {
hash = "sha256-qBzcIUmgnGy/Xn/B+7UrLrRhCvCkapL+ymqGS2sMVgA=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "opencv-python" "opencv"
'';
propagatedBuildInputs = [
numpy
opencv4
opencv-python
scipy
pandas
pillow
@@ -15,7 +15,7 @@
jinja2,
lxml,
numpy,
opencv4,
opencv-python,
pillow,
pydantic,
pydantic-extra-types,
@@ -52,8 +52,6 @@ buildPythonPackage rec {
hatch-fancy-pypi-readme
];
pythonRemoveDeps = [ "opencv-python" ];
pythonRelaxDeps = [
"rtoml"
"qtpy"
@@ -67,7 +65,7 @@ buildPythonPackage rec {
jinja2
lxml
numpy
opencv4
opencv-python
pillow
pydantic
pydantic-extra-types
@@ -12,12 +12,8 @@
texliveInfraOnly,
click,
click-default-group,
cloup,
colour,
grpcio,
grpcio-tools,
importlib-metadata,
decorator,
isosurfaces,
jupyterlab,
manimpango,
@@ -25,6 +21,7 @@
moderngl,
moderngl-window,
networkx,
notebook,
numpy,
pillow,
pycairo,
@@ -37,6 +34,7 @@
srt,
svgelements,
tqdm,
typing-extensions,
watchdog,
}:
@@ -188,7 +186,7 @@ buildPythonPackage rec {
hash = "sha256-o+Wl3NMK6yopcsRVFtZuUE9c1GABa5d8rbQNHDJ4OiQ=";
};
nativeBuildInputs = [
build-system = [
poetry-core
];
@@ -209,16 +207,11 @@ buildPythonPackage rec {
buildInputs = [ cairo ];
propagatedBuildInputs = [
dependencies = [
click
click-default-group
cloup
colour
grpcio
grpcio-tools
importlib-metadata
decorator
isosurfaces
jupyterlab
manimpango
mapbox-earcut
moderngl
@@ -236,9 +229,19 @@ buildPythonPackage rec {
srt
svgelements
tqdm
typing-extensions
watchdog
];
optional-dependencies = {
jupyterlab = [
jupyterlab
notebook
];
# TODO package dearpygui
# gui = [ dearpygui ];
};
makeWrapperArgs = [
"--prefix"
"PATH"
@@ -2,7 +2,7 @@
lib,
buildPythonPackage,
fetchFromGitHub,
opencv4,
opencv-python,
pytestCheckHook,
pythonOlder,
setuptools,
@@ -28,7 +28,6 @@ buildPythonPackage {
substituteInPlace setup.py \
--replace-fail "setup, setuptools" "setup, find_packages"\
--replace-fail "setuptools.find_packages" "find_packages"\
--replace-fail "opencv-python>=4.1.0" ""\
--replace-fail "keras>=2.0.0" ""\
--replace-fail "tests_require=['nose']," ""
'';
@@ -36,7 +35,7 @@ buildPythonPackage {
build-system = [ setuptools ];
dependencies = [
opencv4
opencv-python
tensorflow
];
@@ -0,0 +1,14 @@
{
mkPythonMetaPackage,
opencv4,
}:
mkPythonMetaPackage {
pname = "opencv-python";
inherit (opencv4) version;
dependencies = [ opencv4 ];
optional-dependencies = opencv4.optional-dependencies or { };
meta = {
inherit (opencv4.meta) description homepage;
};
}
@@ -10,7 +10,7 @@
lmdb,
lxml,
numpy,
opencv4,
opencv-python,
openpyxl,
pdf2docx,
pillow,
@@ -58,7 +58,6 @@ buildPythonPackage {
pythonRemoveDeps = [
"imgaug"
"visualdl"
"opencv-python"
"opencv-contrib-python"
];
@@ -71,7 +70,7 @@ buildPythonPackage {
lmdb
lxml
numpy
opencv4
opencv-python
openpyxl
pdf2docx
pillow
@@ -9,7 +9,7 @@
fire,
fonttools,
numpy,
opencv4,
opencv-python-headless,
tkinter,
python-docx,
setuptools,
@@ -34,8 +34,6 @@ buildPythonPackage {
setuptools
];
pythonRemoveDeps = [ "opencv-python" ];
preBuild = "echo '${version}' > version.txt";
dependencies = [
@@ -43,7 +41,7 @@ buildPythonPackage {
fire
fonttools
numpy
opencv4
opencv-python-headless
python-docx
];
@@ -3,7 +3,7 @@
buildPythonPackage,
fetchPypi,
numpy,
opencv4,
opencv-python,
pythonOlder,
scikit-learn,
typing-extensions,
@@ -21,12 +21,9 @@ buildPythonPackage rec {
hash = "sha256-2xmOKIerDJqgAj5WWvv/Qd+3azYfhf1eE/eA11uhjMg=";
};
pythonRemoveDeps = [ "opencv-python" ];
propagatedBuildInputs = [
numpy
opencv4
opencv-python
scikit-learn
typing-extensions
];
@@ -10,7 +10,7 @@
setuptools,
pyclipper,
opencv4,
opencv-python,
numpy,
six,
shapely,
@@ -90,7 +90,7 @@ buildPythonPackage {
dependencies = [
pyclipper
opencv4
opencv-python
numpy
six
shapely
@@ -99,9 +99,6 @@ buildPythonPackage {
onnxruntime
];
# Remove because we have adopted the `opencv4` as an attribute name.
pythonRemoveDeps = [ "opencv-python" ];
pythonImportsCheck = [ "rapidocr_onnxruntime" ];
nativeCheckInputs = [ pytestCheckHook ];
@@ -6,7 +6,7 @@
layoutparser,
python-multipart,
huggingface-hub,
opencv,
opencv-python,
onnxruntime,
transformers,
detectron2,
@@ -33,17 +33,12 @@ buildPythonPackage rec {
hash = "sha256-2k7gFlBUevVnz2A5pvUE4eIGmXwEr5s4F8BbX6j5lzc=";
};
postPatch = ''
substituteInPlace requirements/base.in \
--replace "opencv-python" "opencv"
'';
propagatedBuildInputs =
[
layoutparser
python-multipart
huggingface-hub
opencv
opencv-python
onnxruntime
transformers
detectron2
@@ -5,7 +5,7 @@
setuptools,
levenshtein,
pytesseract,
opencv4,
opencv-python,
fuzzywuzzy,
}:
@@ -24,14 +24,13 @@ buildPythonPackage rec {
dependencies = [
levenshtein
pytesseract
opencv4
opencv-python
fuzzywuzzy
];
postPatch = ''
substituteInPlace setup.py \
--replace-fail "python-Levenshtein" "Levenshtein" \
--replace-fail "opencv-python" "opencv"
--replace-fail "python-Levenshtein" "Levenshtein"
substituteInPlace videocr/constants.py \
--replace-fail "master" "main"
substituteInPlace videocr/video.py \
+2
View File
@@ -9420,6 +9420,8 @@ self: super: with self; {
pythonPackages = self;
});
opencv-python = callPackage ../development/python-modules/opencv-python { };
opencv-python-headless = callPackage ../development/python-modules/opencv-python-headless { };
openerz-api = callPackage ../development/python-modules/openerz-api { };