Unverified Commit 2e0f6749 authored by éclairevoyant's avatar éclairevoyant Committed by GitHub
Browse files

Merge pull request #334019 from pbsds/migrate-replace-fail-2-1723415142

treewide: modernize python packages
parents 2966d46f 4fe439e4
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
buildPythonPackage rec {
  pname = "hydrus-api";
  version = "5.0.1";
  format = "pyproject";
  pyproject = true;

  disabled = pythonOlder "3.9";

@@ -20,15 +20,9 @@ buildPythonPackage rec {
    hash = "sha256-3Roeab9/woGF/aZYm9nbqrcyYN8CKA1k66cTRxx6jM4=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml --replace \
      "poetry.masonry.api" \
      "poetry.core.masonry.api"
  '';
  build-system = [ poetry-core ];

  nativeBuildInputs = [ poetry-core ];

  propagatedBuildInputs = [ requests ];
  dependencies = [ requests ];

  pythonImportsCheck = [ "hydrus_api" ];

+6 −6
Original line number Diff line number Diff line
{
  buildPythonPackage,
  fetchPypi,
  setuptools,
  numpy,
  scikit-image,
  lib,
@@ -10,19 +11,18 @@
buildPythonPackage rec {
  pname = "imagecorruptions";
  version = "1.1.2";
  format = "setuptools";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    sha256 = "044e173f24d5934899bdbf3596bfbec917e8083e507eed583ab217abebbe084d";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "'opencv-python >= 3.4.5'," ""
  '';
  pythonRemoveDeps = [ "opencv-python" ];

  propagatedBuildInputs = [
  build-system = [ setuptools ];

  dependencies = [
    numpy
    scikit-image
    opencv4
+7 −7
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  buildPythonPackage,
  fetchFromGitHub,
  lib,
  setuptools,
  numpy,
  opencv4,
  lxml,
@@ -12,7 +13,7 @@
buildPythonPackage rec {
  pname = "imantics";
  version = "0.1.12";
  format = "setuptools";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "jsbroks";
@@ -21,18 +22,17 @@ buildPythonPackage rec {
    sha256 = "1zv2gj8cbakhh2fyr2611cbqhfk37a56x973ny9n43y70n26pzm8";
  };

  propagatedBuildInputs = [
  pythonRemoveDeps = [ "opencv-python" ];

  build-system = [ setuptools ];

  dependencies = [
    numpy
    opencv4
    lxml
    xmljson
  ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "'opencv-python>=3'," ""
  '';

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "imantics" ];
+6 −3
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  setuptools,
  fetchPypi,
  ipykernel,
  gcc,
@@ -9,7 +10,7 @@
buildPythonPackage rec {
  pname = "jupyter-c-kernel";
  version = "1.2.2";
  format = "setuptools";
  pyproject = true;

  src = fetchPypi {
    pname = "jupyter_c_kernel";
@@ -19,10 +20,12 @@ buildPythonPackage rec {

  postPatch = ''
    substituteInPlace jupyter_c_kernel/kernel.py \
      --replace "'gcc'" "'${gcc}/bin/gcc'"
      --replace-fail "'gcc'" "'${gcc}/bin/gcc'"
  '';

  propagatedBuildInputs = [ ipykernel ];
  build-system = [ setuptools ];

  dependencies = [ ipykernel ];

  # no tests in repository
  doCheck = false;
+5 −7
Original line number Diff line number Diff line
@@ -5,13 +5,14 @@
  fetchFromGitHub,
  jupyterhub,
  pythonOlder,
  setuptools,
  tornado,
}:

buildPythonPackage rec {
  pname = "jupyterhub-systemdspawner";
  version = "1.0.1";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.8";

@@ -23,16 +24,13 @@ buildPythonPackage rec {
  };

  postPatch = ''
    substituteInPlace systemdspawner/systemd.py \
      --replace "/bin/bash" "${bash}/bin/bash"

    substituteInPlace systemdspawner/systemdspawner.py \
      --replace "/bin/bash" "${bash}/bin/bash"
      --replace-fail "/bin/bash" "${bash}/bin/bash"
  '';

  buildInputs = [ bash ];
  build-system = [ setuptools ];

  propagatedBuildInputs = [
  dependencies = [
    jupyterhub
    tornado
  ];
Loading