Commit d9945ffa authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

python3Packages.logistro: init at 2.0.1

parent b0c463fb
Loading
Loading
Loading
Loading
+48 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  setuptools,

  # tests
  pytestCheckHook,
}:

buildPythonPackage (finalAttrs: {
  pname = "logistro";
  version = "2.0.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "geopozo";
    repo = "logistro";
    tag = "v${finalAttrs.version}";
    hash = "sha256-c/wHOXDPDUYvfJCcLodbHzFdXGscvXEmOyPKCuzPIT0=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail ', "setuptools-git-versioning"' "" \
      --replace-fail 'dynamic = ["version"]' 'version = "${finalAttrs.version}"'
  '';

  build-system = [
    setuptools
  ];

  pythonImportsCheck = [ "logistro" ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  meta = {
    description = "Wrapper for logging";
    homepage = "https://github.com/geopozo/logistro";
    changelog = "https://github.com/geopozo/logistro/blob/${finalAttrs.src.tag}/CHANGELOG.txt";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
})
+2 −0
Original line number Diff line number Diff line
@@ -9237,6 +9237,8 @@ self: super: with self; {
  logilab-constraint = callPackage ../development/python-modules/logilab/constraint.nix { };
  logistro = callPackage ../development/python-modules/logistro { };
  logmatic-python = callPackage ../development/python-modules/logmatic-python { };
  logster = callPackage ../development/python-modules/logster { };