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

python313Packages.orgparse: re-work (#446751)

parents 4dcc0e5f 4dcbb0c6
Loading
Loading
Loading
Loading
+36 −8
Original line number Diff line number Diff line
{
  lib,
  setuptools-scm,
  fetchPypi,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  hatch-vcs,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "orgparse";
  version = "0.4.20250520";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-ZHL9Ft3Ku1I5GFBchlJjq/oFrIC1k+ZooInNopGxot4=";
  src = fetchFromGitHub {
    owner = "karlicoss";
    repo = "orgparse";
    tag = "v${version}";
    hash = "sha256-y3mkGCZvikbmymgvPOWq4GLxoFmslXGm/cxR2PZ6DRM=";
  };

  nativeBuildInputs = [ setuptools-scm ];
  build-system = [
    hatchling
    hatch-vcs
  ];

  pyproject = true;
  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "orgparse" ];

  preCheck = ''
    rm conftest.py
  '';

  disabledTestPaths = [
    # Ignoring doc folder
    "doc/"
  ];

  disabledTests = [
    # AssertionError
    "test_data[01_attributes]"
    "test_data[03_repeated_tasks]"
    "test_data[04_logbook]"
    "test_level_0_timestamps"
  ];

  meta = with lib; {
    description = "Emacs org-mode parser in Python";
    homepage = "https://github.com/karlicoss/orgparse";
    description = "Orgparse - Emacs org-mode parser in Python";
    changelog = "https://github.com/karlicoss/orgparse/releases/tag/${src.tag}";
    license = licenses.bsd2;
    maintainers = with maintainers; [ twitchy0 ];
  };