forked from pool/python-fasttext
- Convert to libalternatives on SLE-16-based and newer systems
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fasttext?expand=0&rev=13
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 19 13:15:46 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives on SLE-16-based and newer systems
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Oct 10 05:20:36 UTC 2024 - Jiri Slaby <jslaby@suse.cz>
|
Thu Oct 10 05:20:36 UTC 2024 - Jiri Slaby <jslaby@suse.cz>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-fasttext
|
# spec file for package python-fasttext
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -20,6 +20,11 @@
|
|||||||
%define sover 0
|
%define sover 0
|
||||||
# Using annotation futures and dataclasses
|
# Using annotation futures and dataclasses
|
||||||
%define skip_python36 1
|
%define skip_python36 1
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-fasttext
|
Name: python-fasttext
|
||||||
Version: 0.9.2
|
Version: 0.9.2
|
||||||
@@ -39,19 +44,26 @@ BuildRequires: %{python_module pybind11-devel}
|
|||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: ninja
|
BuildRequires: ninja
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: fasttext
|
||||||
|
Requires: python-numpy
|
||||||
|
Requires: python-pybind11 >= 2.2
|
||||||
|
Requires: python-setuptools >= 0.7.0
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module numpy}
|
BuildRequires: %{python_module numpy}
|
||||||
BuildRequires: %{python_module pybind11 >= 2.2}
|
BuildRequires: %{python_module pybind11 >= 2.2}
|
||||||
BuildRequires: %{python_module setuptools >= 0.7.0}
|
BuildRequires: %{python_module setuptools >= 0.7.0}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
BuildRequires: fdupes
|
|
||||||
Requires: fasttext
|
|
||||||
Requires: python-numpy
|
|
||||||
Requires: python-pybind11 >= 2.2
|
|
||||||
Requires: python-setuptools >= 0.7.0
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -106,6 +118,7 @@ export LDFLAGS=-L%{__builddir}
|
|||||||
%install
|
%install
|
||||||
%cmake_install
|
%cmake_install
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
|
%python_clone -a %{buildroot}/%{_bindir}/fasttext
|
||||||
%{python_expand :
|
%{python_expand :
|
||||||
%fdupes %{buildroot}%{$python_sitearch}
|
%fdupes %{buildroot}%{$python_sitearch}
|
||||||
}
|
}
|
||||||
@@ -115,6 +128,15 @@ export LDFLAGS=-L%{__builddir}
|
|||||||
|
|
||||||
%ldconfig_scriptlets -n libfasttext%{sover}
|
%ldconfig_scriptlets -n libfasttext%{sover}
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%python_libalternatives_reset_alternative fasttext
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative fasttext
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative fasttext
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python_sitearch}/fasttext
|
%{python_sitearch}/fasttext
|
||||||
@@ -124,7 +146,7 @@ export LDFLAGS=-L%{__builddir}
|
|||||||
%files -n fasttext
|
%files -n fasttext
|
||||||
%doc README.md docs/
|
%doc README.md docs/
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_bindir}/fasttext
|
%python_alternative %{_bindir}/fasttext
|
||||||
|
|
||||||
%files -n fasttext-devel
|
%files -n fasttext-devel
|
||||||
%dir %{_includedir}/fasttext
|
%dir %{_includedir}/fasttext
|
||||||
|
Reference in New Issue
Block a user