2021-01-30 11:39:41 +00:00
#
# spec file for package python-openTSNE
#
2023-09-17 09:46:22 +00:00
# Copyright (c) 2023 SUSE LLC
2021-01-30 11:39:41 +00:00
#
# 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/
#
2022-02-06 15:34:36 +00:00
%{?!python_module:%define python_module() python3-%{**}}
2021-01-30 11:39:41 +00:00
%define skip_python2 1
Name : python-openTSNE
2023-09-17 09:46:22 +00:00
Version : 1.0.0
2021-01-30 11:39:41 +00:00
Release : 0
Summary : Extensible, parallel implementations of t-SNE
License : BSD-3-Clause
URL : https://github.com/pavlin-policar/openTSNE
# tests are not packaged in the PyPI sdist, use GitHub instead
Source : %{url} /archive/v%{version} .tar.gz#/openTSNE-%{version}-gh.tar.gz
2021-04-01 10:32:47 +00:00
Patch0 : python-openTSNE-disable-CPU-autodetection.patch
2023-09-17 09:46:22 +00:00
# PATCH-FIX-UPSTREAM https://github.com/pavlin-policar/openTSNE/commit/07d8ad1f89356dc77a503071a16516873f4d4e30 Fix #248: get_numpy_include class error in new pip
Patch1 : get-numpy-include.patch
2022-03-21 07:33:54 +00:00
BuildRequires : %{python_module Cython}
2022-02-06 15:34:36 +00:00
BuildRequires : %{python_module devel >= 3.7}
2021-01-30 11:39:41 +00:00
BuildRequires : %{python_module numpy-devel >= 1.16.6}
BuildRequires : %{python_module scikit-learn >= 0.20}
BuildRequires : %{python_module scipy}
2022-02-06 15:34:36 +00:00
BuildRequires : %{python_module setuptools}
2021-01-30 11:39:41 +00:00
BuildRequires : c++_compiler
2022-03-21 07:33:54 +00:00
BuildRequires : fdupes
2022-02-06 15:34:36 +00:00
BuildRequires : fftw3-devel
BuildRequires : python-rpm-macros
2021-01-30 11:39:41 +00:00
# SECTION test requirements
BuildRequires : %{python_module pytest}
# /SECTION
Requires : python-numpy >= 1.16.6
Requires : python-scikit-learn >= 0.20
Requires : python-scipy
Suggests : python-hnswlib
Suggests : python-pynndescent
Provides : python-fastTSNE = %{version}
Obsoletes : python-fastTSNE < %{version}
%python_subpackages
%description
Extensible, parallel implementations of t-SNE
%prep
2021-04-01 10:32:47 +00:00
%autosetup -p1 -n openTSNE-%{version}
2021-01-30 11:39:41 +00:00
%build
export CFLAGS=" %{optflags} "
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot} %{$python_sitearch}
%check
2022-03-21 07:33:54 +00:00
%ifarch %ix86 %arm32
# precision errors on 32bit
%define donttest -k "not TestTSNECorrectnessUsingPrecomputedDistanceMatrix"
%endif
%pytest_arch --import-mode append %{?donttest}
2021-01-30 11:39:41 +00:00
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitearch} /openTSNE
%{python_sitearch} /openTSNE-%{version} *-info
%changelog