Commit e60e61c6 authored by Steven Allen's avatar Steven Allen
Browse files

python313Packages.sacremoses: modernize package

parent c05a9030
Loading
Loading
Loading
Loading
+19 −13
Original line number Diff line number Diff line
{
  buildPythonPackage,
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  # build-system
  setuptools,
  # dependencies
  click,
  joblib,
  tqdm,
  regex,
  pytest,
  tqdm,
  # tests
  pytestCheckHook,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "sacremoses";
  version = "0.1.1";
  format = "setuptools";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "hplt-project";
    repo = "sacremoses";
    rev = version;
    tag = finalAttrs.version;
    sha256 = "sha256-ked6/8oaGJwVW1jvpjrWtJYfr0GKUHdJyaEuzid/S3M=";
  };

  propagatedBuildInputs = [
  build-system = [ setuptools ];

  dependencies = [
    click
    joblib
    tqdm
    regex
    tqdm
  ];

  nativeCheckInputs = [ pytest ];
  nativeCheckInputs = [ pytestCheckHook ];
  # ignore tests which call to remote host
  checkPhase = ''
    pytest -k 'not truecase'
  '';
  disabledTestPaths = [
    "sacremoses/test/test_truecaser.py::TestTruecaser"
  ];

  meta = {
    homepage = "https://github.com/alvations/sacremoses";
@@ -42,4 +48,4 @@ buildPythonPackage rec {
    platforms = lib.platforms.unix;
    maintainers = with lib.maintainers; [ pashashocky ];
  };
}
})