Unverified Commit 92b0affd authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #281300 from fabaff/ad-miner-fix

ad-miner: 0.6.0 -> 1.0.0, python311Packages.neo4j: refactor 
parents ba493285 0838d4b8
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -5,18 +5,22 @@

python3.pkgs.buildPythonApplication rec {
  pname = "ad-miner";
  version = "0.6.0";
  version = "1.0.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Mazars-Tech";
    repo = "AD_Miner";
    rev = "refs/tags/v${version}";
    hash = "sha256-Iwg00vAnCs9FbEAmB54vNDLmxyZeCtZMl/VEFoYeEcM=";
    hash = "sha256-HM7PR1i7/L3MuUaTBPcDblflCH40NmEYSCTJUB06Fjg=";
  };

  # ALl requirements are pinned
  pythonRelaxDeps = true;

  nativeBuildInputs = with python3.pkgs; [
    poetry-core
    pythonRelaxDepsHook
  ];

  propagatedBuildInputs = with python3.pkgs; [
+30 −1
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, pandas
, pyarrow
, pythonOlder
, pytz
, setuptools
, tomlkit
}:

buildPythonPackage rec {
  pname = "neo4j";
  version = "5.16.0";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.7";

@@ -20,11 +24,36 @@ buildPythonPackage rec {
    hash = "sha256-ly/R2ufd5gEkUyfajpeMQblTiKipC9HFtxkWkh16zLo=";
  };

  postPatch = ''
    # The dynamic versioning adds a postfix (.dev0) to the version
    substituteInPlace pyproject.toml \
      --replace '"tomlkit ~= 0.11.6"' '"tomlkit >= 0.11.6"' \
      --replace 'dynamic = ["version", "readme"]' 'dynamic = ["readme"]' \
      --replace '#readme = "README.rst"' 'version = "${version}"'
  '';

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    pytz
    tomlkit
  ];

  passthru.optional-dependencies = {
    numpy = [
      numpy
    ];
    pandas = [
      numpy
      pandas
    ];
    pyarrow = [
      pyarrow
    ];
  };

  # Missing dependencies
  doCheck = false;