From 20fa066623ca74adb1cf2d5880cf54ade16567ca Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Sun, 29 Mar 2026 20:12:29 -0700 Subject: [PATCH] add: python-opencc (#10906) (#10940) * add: python-opencc * Update opencc.spec --------- (cherry picked from commit 144b126b0399856de7c20a21bad0fe9b8eaac5f8) Signed-off-by: Owen-sz Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> --- anda/langs/python/opencc/anda.hcl | 5 +++ anda/langs/python/opencc/opencc.spec | 47 ++++++++++++++++++++++++++++ anda/langs/python/opencc/update.rhai | 1 + 3 files changed, 53 insertions(+) create mode 100644 anda/langs/python/opencc/anda.hcl create mode 100644 anda/langs/python/opencc/opencc.spec create mode 100644 anda/langs/python/opencc/update.rhai diff --git a/anda/langs/python/opencc/anda.hcl b/anda/langs/python/opencc/anda.hcl new file mode 100644 index 0000000000..8a2a74ce34 --- /dev/null +++ b/anda/langs/python/opencc/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "opencc.spec" + } +} diff --git a/anda/langs/python/opencc/opencc.spec b/anda/langs/python/opencc/opencc.spec new file mode 100644 index 0000000000..4a9d1c1efe --- /dev/null +++ b/anda/langs/python/opencc/opencc.spec @@ -0,0 +1,47 @@ +%global pypi_name opencc +%global _desc Open Chinese Convert. + +Name: python-%{pypi_name} +Version: 1.2.0 +Release: 1%?dist +Summary: Open Chinese Convert +License: Apache-2.0 +URL: https://github.com/BYVoid/OpenCC +Source0: %{pypi_source} + +BuildRequires: python3-devel +BuildRequires: python3-wheel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: gcc-c++ +BuildRequires: cmake + +Packager: Owen Zimmerman + +%description +%_desc + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +%_desc + +%prep +%autosetup -n %{pypi_name}-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files %{pypi_name} + +%files -n python3-%{pypi_name} -f %{pyproject_files} +%doc README.md AUTHORS +%license LICENSE + +%changelog +* Sun Mar 29 2026 Owen Zimmerman +- Initial commit diff --git a/anda/langs/python/opencc/update.rhai b/anda/langs/python/opencc/update.rhai new file mode 100644 index 0000000000..df2b57b416 --- /dev/null +++ b/anda/langs/python/opencc/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("opencc"));