## START: Set by rpmautospec
## (rpmautospec version 0.3.0)
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 5;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

Name:           shybrid
Version:        0.4.3
Release:        %autorelease
Summary:        GUI for generating hybrid ground-truth spiking data

License:        GPLv3+
URL:            https://github.com/jwouters91/shybrid
Source0:        %{pypi_source shybrid}
Source1:        %{name}.desktop

BuildArch:      noarch 
BuildRequires:  python3-devel
BuildRequires:  python3-matplotlib-qt5
BuildRequires:  desktop-file-utils
BuildRequires:  libappstream-glib

Requires:       python3-matplotlib-qt5

%description
SHYBRID is a graphical user interface that allows 
for the easy creation of hybrid ground 
truth extracellular recordings

%prep
%autosetup -n shybrid-%{version}
sed -i 's/PyQt5==5.13/PyQt5>=5.13/' setup.py

find . -type f -name "*.py" -exec sed -i '/^#![  ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'

%generate_buildrequires
%pyproject_buildrequires -r


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files hybridizer
desktop-file-install                                    \
--dir=%{buildroot}%{_datadir}/applications              \
%{SOURCE1}

%check
%pyproject_check_import

%files -f %{pyproject_files}
%doc README.*
%license LICENSE*
%{_bindir}/shybrid
%{_datadir}/applications/%{name}.desktop


%changelog
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> 0.4.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> 0.4.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> 0.4.3-3
- Rebuilt for Python 3.11

* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> 0.4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Mon Dec 27 2021 Vanessa_kris <vanessaigwe1@gmail.com> 0.4.3-1
- Initial import (#2031721).