ae01b1d
%global modname visionegg-quest
ae01b1d
%global srcname Quest
ae01b1d
ae01b1d
# https://fedoraproject.org/wiki/Packaging:DistTag?rd=Packaging/DistTag#Conditionals
ae01b1d
%if 0%{?fedora} < 30
ae01b1d
%global with_py2 1
ae01b1d
%else
ae01b1d
%global with_py2 0
ae01b1d
%endif
ae01b1d
ae01b1d
Name:           python-%{modname}
ae01b1d
Version:        1.1
8f0c0b1
Release:        4%{?dist}
ae01b1d
Summary:        QUEST algorithm for finding threshold
ae01b1d
ae01b1d
License:        BSD
ae01b1d
URL:            http://visionegg.readthedocs.org/en/latest/Quest.html
ae01b1d
Source0:        http://downloads.sourceforge.net/visionegg/%{srcname}-%{version}.tar.gz
ae01b1d
Patch0:         0001-Fix-tab-mixing.patch
ae01b1d
Patch1:         0002-py3-print_function.patch
ae01b1d
Patch2:         0003-py3-raw_input.patch
ae01b1d
Patch3:         0004-rename-to-visionegg-quest.patch
ae01b1d
Patch4:         0005-remove-bool-constants-hack.patch
ae01b1d
ae01b1d
BuildArch:      noarch
ae01b1d
ae01b1d
%description
ae01b1d
%{summary}.
ae01b1d
ae01b1d
%if %{with_py2}
ae01b1d
%package -n python2-%{modname}
ae01b1d
Summary:        %{summary}
ae01b1d
%{?python_provide:%python_provide python2-%{modname}}
ae01b1d
BuildRequires:  python2-devel
ae01b1d
Requires:       %{py2_dist numpy}
ae01b1d
ae01b1d
%description -n python2-%{modname}
ae01b1d
%{summary}.
ae01b1d
ae01b1d
Python 2 version.
ae01b1d
%endif
ae01b1d
ae01b1d
%package -n python3-%{modname}
ae01b1d
Summary:        %{summary}
ae01b1d
%{?python_provide:%python_provide python3-%{modname}}
ae01b1d
BuildRequires:  python3-devel
ae01b1d
Requires:       %{py3_dist numpy}
ae01b1d
ae01b1d
%description -n python3-%{modname}
ae01b1d
%{summary}.
ae01b1d
ae01b1d
Python 3 version.
ae01b1d
ae01b1d
%prep
ae01b1d
%autosetup -n %{srcname}-%{version} -p1
ae01b1d
ae01b1d
%build
ae01b1d
%if %{with_py2}
ae01b1d
%py2_build
ae01b1d
%endif
ae01b1d
ae01b1d
%py3_build
ae01b1d
ae01b1d
%install
ae01b1d
%if %{with_py2}
ae01b1d
%py2_install
ae01b1d
%endif
ae01b1d
ae01b1d
%py3_install
ae01b1d
ae01b1d
%if %{with_py2}
ae01b1d
%files -n python2-%{modname}
ae01b1d
%{python2_sitelib}/visionegg_quest-*.egg-info
ae01b1d
%{python2_sitelib}/%{srcname}.py*
ae01b1d
%endif
ae01b1d
ae01b1d
%files -n python3-%{modname}
ae01b1d
%{python3_sitelib}/visionegg_quest-*.egg-info
ae01b1d
%{python3_sitelib}/%{srcname}.py
ae01b1d
%{python3_sitelib}/__pycache__/%{srcname}.*
ae01b1d
ae01b1d
%changelog
8f0c0b1
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-4
8f0c0b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
8f0c0b1
a8a87b8
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-3
a8a87b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
a8a87b8
ae01b1d
* Sat Nov 03 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.1-2
ae01b1d
- Initial import
ae01b1d
- Use conditional to disable py2 builds on F30+
ae01b1d
- Use pyX_dist macro
ae01b1d
ae01b1d
* Sat Dec 12 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.1-1
ae01b1d
- Initial package