Unverified Commit df97754c authored by OTABI Tomoya's avatar OTABI Tomoya Committed by GitHub
Browse files

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

parents d284d018 f192fada
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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
+2 −6
Original line number Diff line number Diff line
@@ -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
+30 −11
Original line number Diff line number Diff line
@@ -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
  ];

  pythonRelaxDeps = [
    "torchvision"
  ];

  pythonRemoveDeps = [
    "ninja"
  ];

  propagatedBuildInputs = [
  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" ];

+6 −5
Original line number Diff line number Diff line
@@ -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
+14 −0
Original line number Diff line number Diff line
{
  mkPythonMetaPackage,
  opencv4,
}:

mkPythonMetaPackage {
  pname = "opencv-python-headless";
  inherit (opencv4) version;
  dependencies = [ opencv4 ];
  optional-dependencies = opencv4.optional-dependencies or { };
  meta = {
    inherit (opencv4.meta) description homepage;
  };
}
Loading