Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions SPECS/python-rjieba/python-rjieba.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: Suyun <ziyu.oerv@isrc.iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0

%global srcname rjieba

Name: python-%{srcname}
Version: 0.2.1
Release: %autorelease
Summary: jieba-rs Python binding
License: MIT
URL: https://github.com/messense/rjieba-py
#!RemoteAsset: sha256:af96d4a14f24b68e053024ab993ec008c868d85598f8af928f2424ff4d86bc44
Source0: https://files.pythonhosted.org/packages/source/r/%{srcname}/%{srcname}-%{version}.tar.gz
#!RemoteAsset: sha256:c8bd8b356407b49f20161165441e7e821c215e5e2f3c9f95276de5253456ecb0
Source1: https://github.com/software-vendor/python-rjieba-vendor/releases/download/vendor-%{version}/rjieba-%{version}-vendor.tar.bz2
BuildSystem: pyproject

BuildOption(prep): -a1
BuildOption(install): -l %{srcname} -L

BuildRequires: pyproject-rpm-macros
BuildRequires: pkgconfig(python3)
BuildRequires: rust
BuildRequires: python3dist(maturin)

Provides: python3-%{srcname}
%python_provide python3-%{srcname}

%description
%{summary}.

%prep -a
mkdir -p .cargo
cat > .cargo/config.toml <<'EOF'
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF

%generate_buildrequires
%pyproject_buildrequires

%files -f %{pyproject_files}
%doc README.md
%license LICENSE

%changelog
%autochangelog
Loading