From 69af2918359a1bec1d9dd66057e684be176ce8472e7834ecd7429c16aec0fe15 Mon Sep 17 00:00:00 2001 From: Nico Krapp Date: Wed, 4 Sep 2024 15:34:09 +0000 Subject: [PATCH] Initial Package OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-rank-bm25?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++++ .gitignore | 1 + python-rank-bm25.changes | 9 ++++++ python-rank-bm25.spec | 65 +++++++++++++++++++++++++++++++++++++++ rank-bm25-0.2.2-gh.tar.gz | 3 ++ rank_bm25-0.2.2.tar.gz | 3 ++ 6 files changed, 104 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-rank-bm25.changes create mode 100644 python-rank-bm25.spec create mode 100644 rank-bm25-0.2.2-gh.tar.gz create mode 100644 rank_bm25-0.2.2.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-rank-bm25.changes b/python-rank-bm25.changes new file mode 100644 index 0000000..9f2908d --- /dev/null +++ b/python-rank-bm25.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 4 15:18:42 UTC 2024 - Meera Belur + +- Rename github source tarball + +------------------------------------------------------------------- +Fri Aug 30 16:33:36 UTC 2024 - Meera Belur + +- Initial Package diff --git a/python-rank-bm25.spec b/python-rank-bm25.spec new file mode 100644 index 0000000..bbf4d5b --- /dev/null +++ b/python-rank-bm25.spec @@ -0,0 +1,65 @@ +# +# spec file for package python-rank-bm25 +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + +%{?sle15_python_module_pythons} +Name: python-rank-bm25 +Version: 0.2.2 +Release: 0 +Summary: Various BM25 algorithms for document ranking +License: Apache-2.0 +URL: https://github.com/dorianbrown/rank_bm25 +Group: Development/Libraries/Python +Source0: https://files.pythonhosted.org/packages/source/r/rank-bm25/rank_bm25-%{version}.tar.gz +Source1: https://github.com/dorianbrown/rank_bm25/archive/refs/tags/%{version}.tar.gz#/rank-bm25-%{version}-gh.tar.gz +BuildRequires: python-rpm-macros +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: %{python_module pytest} +Requires: %{python_module numpy} +BuildArch: noarch +%python_subpackages + +%description +Rank-BM25: A two line search engine +A collection of algorithms for querying a set of documents and returning the ones most relevant to the query. The most common use case for these algorithms is, as you might have guessed, to create search engines. + +%prep +%autosetup -p1 -n rank_bm25-%{version} +# version.py and tests are not included in the tarball from pypi +(cd ..; tar xf %{SOURCE1} rank_bm25-%{version}/{version.py,tests}) +# Fix non-executable scripts +sed -i "s|^#!.*||" rank_bm25.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest tests + +%files %{python_files} +%license LICENSE +%{python_sitelib}/rank_bm25.* +%{python_sitelib}/rank_bm25-%{version}.dist-info +%pycache_only %{python_sitelib}/__pycache__/*.pyc +%changelog diff --git a/rank-bm25-0.2.2-gh.tar.gz b/rank-bm25-0.2.2-gh.tar.gz new file mode 100644 index 0000000..3dd1ad0 --- /dev/null +++ b/rank-bm25-0.2.2-gh.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53f557974936b76228892d20cb89c0227eed27c2773fc3c9e68bbb7e8eebefee +size 10159 diff --git a/rank_bm25-0.2.2.tar.gz b/rank_bm25-0.2.2.tar.gz new file mode 100644 index 0000000..736ea41 --- /dev/null +++ b/rank_bm25-0.2.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:096ccef76f8188563419aaf384a02f0ea459503fdf77901378d4fd9d87e5e51d +size 8347