# Generated by rust2rpm 27 %bcond check 1 %global debug_package %{nil} %global crate tokenizers Name: rust-tokenizers Version: 0.21.4 Release: 2%{?dist} Summary: Implementation of today's most used tokenizers in Rust License: Apache-2.0 URL: https://crates.io/crates/tokenizers Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Allow indicatif dependency to vary between 0.17 and 0.18 # * Downgrade onig dependency from 6.5.1 to 6.4.0 # * Drop criterion dev-dependency Patch: tokenizers-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Provides an implementation of today's most used tokenizers, with a focus on performances and versatility.} %description %{_description} %package devel Summary: %{summary} BuildArch: noarch %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE %doc %{crate_instdir}/CHANGELOG.md %doc %{crate_instdir}/README.md %{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+esaxx_fast-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+esaxx_fast-devel %{_description} This package contains library source intended for building other packages which use the "esaxx_fast" feature of the "%{crate}" crate. %files -n %{name}+esaxx_fast-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+fancy-regex-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+fancy-regex-devel %{_description} This package contains library source intended for building other packages which use the "fancy-regex" feature of the "%{crate}" crate. %files -n %{name}+fancy-regex-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+hf-hub-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+hf-hub-devel %{_description} This package contains library source intended for building other packages which use the "hf-hub" feature of the "%{crate}" crate. %files -n %{name}+hf-hub-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+http-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+http-devel %{_description} This package contains library source intended for building other packages which use the "http" feature of the "%{crate}" crate. %files -n %{name}+http-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+indicatif-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+indicatif-devel %{_description} This package contains library source intended for building other packages which use the "indicatif" feature of the "%{crate}" crate. %files -n %{name}+indicatif-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+onig-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+onig-devel %{_description} This package contains library source intended for building other packages which use the "onig" feature of the "%{crate}" crate. %files -n %{name}+onig-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+progressbar-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+progressbar-devel %{_description} This package contains library source intended for building other packages which use the "progressbar" feature of the "%{crate}" crate. %files -n %{name}+progressbar-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+rustls-tls-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+rustls-tls-devel %{_description} This package contains library source intended for building other packages which use the "rustls-tls" feature of the "%{crate}" crate. %files -n %{name}+rustls-tls-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+unstable_wasm-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+unstable_wasm-devel %{_description} This package contains library source intended for building other packages which use the "unstable_wasm" feature of the "%{crate}" crate. %files -n %{name}+unstable_wasm-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check # * skip doctest that's missing a data file # * skip failing tests that are missing data files %cargo_test -- --doc -- --skip 926 %{cargo_test -- --tests -- --exact %{shrink: --skip overlapping_tokens --skip lstrip_tokens --skip rstrip_tokens --skip single_word_tokens --skip load_tokenizer --skip pipeline --skip pipeline_bert --skip quicktour --skip streaming_tokenizer --skip train_tokenizer --skip byte_level_basic --skip byte_level_double_sequence --skip byte_level_pre_tokenized_sequence --skip byte_level_unicode --skip split_on_added_tokens_bert --skip bpe_serde --skip test_deserialize_long_file --skip wordlevel_serde --skip wordpiece_serde --skip test_decoding_with_added_bpe --skip test_decode_stream_step_no_panic --skip bpe_values_after_training --skip bpe_continuing_subword_prefix_error --skip test_train_unigram_from_file --skip test_unigram_from_file }} %endif %changelog %autochangelog