Commit f541c121 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python310Packages.effect: fix build

- add changelog to meta
- disable on older Python releases
- add pythonImportsCheck
parent 39af68a7
Loading
Loading
Loading
Loading
+29 −17
Original line number Diff line number Diff line
{ buildPythonPackage
{ lib
, attrs
, buildPythonPackage
, fetchPypi
, lib
, isPy3k
, pytestCheckHook
, pythonOlder
, six
, attrs
, pytest
, testtools
}:

buildPythonPackage rec {
  version = "1.1.0";
  pname = "effect";
  disabled = (!isPy3k);
  version = "1.1.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "7affb603707c648b07b11781ebb793a4b9aee8acf1ac5764c3ed2112adf0c9ea";
    hash = "sha256-ev+2A3B8ZIsHsReB67eTpLmu6KzxrFdkw+0hEq3wyeo=";
  };

  nativeCheckInputs = [
    pytest
    testtools
  ];
  postPatch = ''
    substituteInPlace effect/test_do.py \
      --replace "py.test" "pytest"
  '';

  propagatedBuildInputs = [
    six
    attrs
    six
  ];

  checkPhase = ''
    pytest
  '';
  nativeCheckInputs = [
    pytestCheckHook
  ];

  checkInputs = [
    testtools
  ];

  pythonImportsCheck = [
    "effect"
  ];

  meta = with lib; {
    description = "Pure effects for Python";
    homepage = "https://github.com/python-effect/effect";
    homepage = "https://effect.readthedocs.io/";
    changelog = "https://github.com/python-effect/effect/releases/tag/${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}