Unverified Commit 360cf296 authored by Nick Cao's avatar Nick Cao
Browse files

python312Packages.transaction: modernize, add nickcao to maintainers

parent c50c65c9
Loading
Loading
Loading
Loading
+27 −12
Original line number Diff line number Diff line
{
  lib,
  fetchPypi,
  fetchFromGitHub,
  buildPythonPackage,
  setuptools,
  zope-interface,
  mock,
  pytestCheckHook,
  pythonOlder,
}:

buildPythonPackage rec {
  pname = "transaction";
  version = "5.0";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.7";
  disabled = pythonOlder "3.8";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-EG5714K8wMtRGfySJbDJpx38U625OL6QUiOtrvIrEXQ=";
  src = fetchFromGitHub {
    owner = "zopefoundation";
    repo = "transaction";
    rev = "refs/tags/${version}";
    hash = "sha256-8yvA2dvB69+EqsAa+hc93rgg6D64lcajl6JgFabhjwY=";
  };

  propagatedBuildInputs = [
  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail "setuptools<74" "setuptools"
  '';

  build-system = [
    setuptools
  ];

  dependencies = [
    zope-interface
    mock
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [ "transaction" ];

  meta = with lib; {
  meta = {
    description = "Transaction management";
    homepage = "https://transaction.readthedocs.io/";
    changelog = "https://github.com/zopefoundation/transaction/blob/${version}/CHANGES.rst";
    license = licenses.zpl20;
    maintainers = [ ];
    license = lib.licenses.zpl21;
    maintainers = with lib.maintainers; [ nickcao ];
  };
}