mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
python312Packages.opencv-python-headless: init at 4.9.0 (#351712)
This commit is contained in:
commit
df97754cec
|
@ -25,9 +25,12 @@ python.pkgs.buildPythonApplication rec {
|
|||
|
||||
pythonRelaxDeps = [
|
||||
"pydantic-settings"
|
||||
];
|
||||
|
||||
pythonRemoveDeps = [
|
||||
# https://github.com/immich-app/immich/pull/13762
|
||||
"setuptools"
|
||||
];
|
||||
pythonRemoveDeps = [ "opencv-python-headless" ];
|
||||
|
||||
build-system = with python.pkgs; [
|
||||
poetry-core
|
||||
|
@ -38,7 +41,7 @@ python.pkgs.buildPythonApplication rec {
|
|||
with python.pkgs;
|
||||
[
|
||||
insightface
|
||||
opencv4
|
||||
opencv-python-headless
|
||||
pillow
|
||||
fastapi
|
||||
uvicorn
|
||||
|
@ -47,7 +50,6 @@ python.pkgs.buildPythonApplication rec {
|
|||
aiocache
|
||||
rich
|
||||
ftfy
|
||||
setuptools
|
||||
python-multipart
|
||||
orjson
|
||||
gunicorn
|
||||
|
|
|
@ -55,10 +55,6 @@ python3.pkgs.buildPythonApplication rec {
|
|||
pythonRelaxDeps = true;
|
||||
|
||||
pythonRemoveDeps = [
|
||||
# using `opencv4`
|
||||
"opencv-python-headless"
|
||||
# using `psycopg2` instead
|
||||
"psycopg2-binary"
|
||||
"docker"
|
||||
"pytest"
|
||||
"pytest-docker"
|
||||
|
@ -97,14 +93,14 @@ python3.pkgs.buildPythonApplication rec {
|
|||
markdown
|
||||
nltk
|
||||
openai
|
||||
opencv4
|
||||
opencv-python-headless
|
||||
openpyxl
|
||||
pandas
|
||||
passlib
|
||||
peewee
|
||||
peewee-migrate
|
||||
psutil
|
||||
psycopg2
|
||||
psycopg2-binary
|
||||
pydub
|
||||
pyjwt
|
||||
pymilvus
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
hdf5,
|
||||
numpy,
|
||||
onnx,
|
||||
opencv4,
|
||||
opencv-python-headless,
|
||||
pillow,
|
||||
pyaml,
|
||||
pyclipper,
|
||||
|
@ -16,12 +16,13 @@
|
|||
shapely,
|
||||
torch,
|
||||
torchvision,
|
||||
python,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "easyocr";
|
||||
version = "1.7.2";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
|
@ -32,16 +33,22 @@ buildPythonPackage rec {
|
|||
hash = "sha256-9mrAxt2lphYtLW81lGO5SYHsnMnSA/VpHiY2NffD/Js=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt \
|
||||
--replace "opencv-python-headless" "" \
|
||||
--replace "ninja" ""
|
||||
'';
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pythonRelaxDeps = [
|
||||
"torchvision"
|
||||
];
|
||||
|
||||
pythonRemoveDeps = [
|
||||
"ninja"
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
hdf5
|
||||
numpy
|
||||
opencv4
|
||||
opencv-python-headless
|
||||
pillow
|
||||
pyaml
|
||||
pyclipper
|
||||
|
@ -53,7 +60,19 @@ buildPythonPackage rec {
|
|||
torchvision
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ onnx ];
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
export HOME="$(mktemp -d)"
|
||||
pushd unit_test
|
||||
${python.interpreter} run_unit_test.py --easyocr "$out/${python.sitePackages}/easyocr"
|
||||
popd
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
# downloads detection model from the internet
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "easyocr" ];
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
nbconvert,
|
||||
nbformat,
|
||||
numpy,
|
||||
opencv4,
|
||||
opencv-python-headless,
|
||||
pillow,
|
||||
pydantic,
|
||||
pyproj,
|
||||
|
@ -45,9 +45,10 @@ buildPythonPackage rec {
|
|||
|
||||
sourceRoot = "${src.name}/libs/labelbox";
|
||||
|
||||
pythonRelaxDeps = [ "python-dateutil" ];
|
||||
|
||||
pythonRemoveDeps = [ "opencv-python-headless" ];
|
||||
pythonRelaxDeps = [
|
||||
"mypy"
|
||||
"python-dateutil"
|
||||
];
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
|
@ -67,7 +68,7 @@ buildPythonPackage rec {
|
|||
shapely
|
||||
numpy
|
||||
pillow
|
||||
opencv4
|
||||
opencv-python-headless
|
||||
typeguard
|
||||
imagesize
|
||||
pyproj
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
mkPythonMetaPackage,
|
||||
opencv4,
|
||||
}:
|
||||
|
||||
mkPythonMetaPackage {
|
||||
pname = "opencv-python-headless";
|
||||
inherit (opencv4) version;
|
||||
dependencies = [ opencv4 ];
|
||||
optional-dependencies = opencv4.optional-dependencies or { };
|
||||
meta = {
|
||||
inherit (opencv4.meta) description homepage;
|
||||
};
|
||||
}
|
|
@ -9376,6 +9376,8 @@ self: super: with self; {
|
|||
pythonPackages = self;
|
||||
});
|
||||
|
||||
opencv-python-headless = callPackage ../development/python-modules/opencv-python-headless { };
|
||||
|
||||
openerz-api = callPackage ../development/python-modules/openerz-api { };
|
||||
|
||||
openevsewifi = callPackage ../development/python-modules/openevsewifi { };
|
||||
|
|
Loading…
Reference in a new issue