python313Packages.sacremoses: modernize package
Co-authored-by: Sarah Clark <seclark@nextquestion.net>
This commit is contained in:
co-authored by
Sarah Clark
parent
c05a9030f1
commit
e60e61c600
@@ -1,38 +1,44 @@
|
||||
{
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user