python312Packages.ctranslate2: migrate to pep517 builder

and update disabled tests.
This commit is contained in:
Martin Weinelt
2025-04-09 02:09:07 +02:00
parent b0a34d3180
commit d7a6d3e33b
@@ -20,19 +20,19 @@
buildPythonPackage rec {
inherit (ctranslate2-cpp) pname version src;
format = "setuptools";
pyproject = true;
# https://github.com/OpenNMT/CTranslate2/tree/master/python
sourceRoot = "${src.name}/python";
nativeBuildInputs = [
build-system = [
pybind11
setuptools
];
buildInputs = [ ctranslate2-cpp ];
propagatedBuildInputs = [
dependencies = [
numpy
pyyaml
];
@@ -59,21 +59,6 @@ buildPythonPackage rec {
export HOME=$TMPDIR
'';
disabledTests = [
# AssertionError: assert 'int8' in {'float32'}
"test_get_supported_compute_types"
# Tensorflow (tf) not available in Python 3.12 yet
# To remove when https://github.com/NixOS/nixpkgs/pull/325224 is fixed
"test_opennmt_tf_model_conversion"
"test_opennmt_tf_model_quantization"
"test_opennmt_tf_model_conversion_invalid_vocab"
"test_opennmt_tf_model_conversion_invalid_dir"
"test_opennmt_tf_shared_embeddings_conversion"
"test_opennmt_tf_postnorm_transformer_conversion"
"test_opennmt_tf_gpt_conversion"
"test_opennmt_tf_multi_features"
];
disabledTestPaths = [
# TODO: ModuleNotFoundError: No module named 'opennmt'
"tests/test_opennmt_tf.py"