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

Merge pull request #324820 from natsukium/fix/python-modules

[staging-next] fix python modules
parents 16b93da1 9516a3b7
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -8,8 +8,8 @@
  importlib-metadata,
  mock,
  openssh,
  packaging,
  pexpect,
  psutil,
  pytest-mock,
  pytest-timeout,
  pytest-xdist,
@@ -19,7 +19,6 @@
  pyyaml,
  setuptools,
  setuptools-scm,
  six,
}:

buildPythonPackage rec {
@@ -27,25 +26,28 @@ buildPythonPackage rec {
  version = "2.4.0";
  pyproject = true;

  disabled = pythonOlder "3.8";
  disabled = pythonOlder "3.9";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-gtArJUiDDzelNRe2XII8SvNxBpQGx9ITtckEHUXgxbY=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace '"setuptools>=45, <=69.0.2", "setuptools-scm[toml]>=6.2, <=8.0.4"' '"setuptools", "setuptools-scm"'
  '';

  build-system = [
    setuptools
    setuptools-scm
  ];

  dependencies = [
    ansible-core
    psutil
    packaging
    pexpect
    python-daemon
    pyyaml
    six
  ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];

  nativeCheckInputs = [
+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
  hatch-fancy-pypi-readme,
  hatchling,
  httpx,
  jiter,
  pydantic,
  pytest-asyncio,
  pytestCheckHook,
@@ -42,6 +43,7 @@ buildPythonPackage rec {
    anyio
    distro
    httpx
    jiter
    sniffio
    pydantic
    tokenizers
+6 −8
Original line number Diff line number Diff line
@@ -36,22 +36,18 @@ buildPythonPackage rec {
    hash = "sha256-zAjGVICrYgai6GFpcJyigKxn7kNEZKclggR5ktzrCQ0=";
  };

  pythonRelaxDeps = [ "clarifai-grpc" ];

  pythonRemoveDeps = [ "opencv-python" ];
  pythonRelaxDeps = [
    "clarifai-grpc"
    "schema"
  ];

  build-system = [ setuptools ];


  dependencies = [
    clarifai-grpc
    inquirerpy
    llama-index-core
    numpy
    opencv4
    pandas
    pillow
    pypdf
    pyyaml
    rich
    schema
@@ -73,6 +69,8 @@ buildPythonPackage rec {
  disabledTests = [
    # Test requires network access and API key
    "test_export_workflow_general"
    "test_validate_invalid_id"
    "test_validate_invalid_hex_id"
  ];

  disabledTestPaths = [
+52 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  agate,
  dbt-common,
  mashumaro,
  protobuf,
  pytz,
  typing-extensions,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "dbt-adapters";
  version = "1.3.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "dbt-labs";
    repo = "dbt-adapters";
    rev = "refs/tags/v${version}";
    hash = "sha256-Erx/j1x+I4ypPqBFzJRZk3ILr3ZG97Hvk4vXe2p6cDc=";
  };

  build-system = [ hatchling ];

  dependencies = [
    agate
    dbt-common
    mashumaro
    protobuf
    pytz
    typing-extensions
  ] ++ mashumaro.optional-dependencies.msgpack;

  pythonImportsCheck = [ "dbt.adapters" ];

  # circular dependencies
  doCheck = false;

  nativeCheckInputs = [ pytestCheckHook ];

  meta = {
    description = "The set of adapter protocols and base functionality that supports integration with dbt-core";
    homepage = "https://github.com/dbt-labs/dbt-adapters";
    changelog = "https://github.com/dbt-labs/dbt-adapters/blob/${src.rev}/CHANGELOG.md";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ ];
  };
}
+65 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  agate,
  colorama,
  isodate,
  jinja2,
  jsonschema,
  mashumaro,
  pathspec,
  protobuf,
  python-dateutil,
  requests,
  typing-extensions,
  pytest-mock,
  pytest-xdist,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "dbt-common";
  version = "1.3.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "dbt-labs";
    repo = "dbt-common";
    rev = "refs/tags/v${version}";
    hash = "sha256-3UjwQy257ks21fQV0uZNKu5EsuzjlIAEcVtRWkR9x/4=";
  };

  build-system = [ hatchling ];

  dependencies = [
    agate
    colorama
    isodate
    jinja2
    jsonschema
    mashumaro
    pathspec
    protobuf
    python-dateutil
    requests
    typing-extensions
  ] ++ mashumaro.optional-dependencies.msgpack;

  pythonImportsCheck = [ "dbt_common" ];

  nativeCheckInputs = [
    pytest-mock
    pytest-xdist
    pytestCheckHook
  ];

  meta = {
    description = "Shared common utilities for dbt-core and adapter implementations use";
    homepage = "https://github.com/dbt-labs/dbt-common";
    changelog = "https://github.com/dbt-labs/dbt-common/blob/${src.rev}/CHANGELOG.md";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ ];
  };
}
Loading