## START: Set by rpmautospec
## (rpmautospec version 0.6.0)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 4;
    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:           python-qcengine
Version:        0.30.0
Release:        %autorelease
Summary:        A compute wrapper for Quantum Chemistry

License:        BSD-3-Clause
URL:            https://github.com/MolSSI/QCEngine
Source:         %{pypi_source qcengine}
Patch0:         https://github.com/MolSSI/QCEngine/pull/451.patch

BuildArch:      noarch
BuildRequires:  python3-devel
# for testing
BuildRequires:  python3-pytest
# https://kojipkgs.fedoraproject.org//work/tasks/9840/108019840/build.log
BuildRequires:  python3-msgpack

# For running the tests
#BuildRequires:  xtb # requires xtb-python which is not available in Fedora and whose development appears to be ceased
BuildRequires:  psi4
BuildRequires:  mrchem
#BuildRequires: python3-dftd4 # Package still in review https://bugzilla.redhat.com/show_bug.cgi?id=2310392

%global _description %{expand:
Quantum chemistry program executor and IO standardizer (QCSchema) for quantum
chemistry.}

%description
%{_description}

%package -n     python3-qcengine
Summary:        %{summary}

%description -n python3-qcengine
%{_description}

%prep
%setup -n qcengine-%{version}
%patch 0 -p1 -b .psi4

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install

%pyproject_save_files qcengine

%check
%pytest

%files -n python3-qcengine -f %{pyproject_files}
%license LICENSE
%doc README.md
%{_bindir}/qcengine

%changelog
## START: Generated by rpmautospec
* Sat Sep 07 2024 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.30.0-4
- Enable psi4 and mrchem tests in the build

* Sat Sep 07 2024 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.30.0-3
- Fix psi4 backend (BZ#2309462)

* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Thu Jul 04 2024 Packit <hello@packit.dev> - 0.30.0-1
- Update to 0.30.0 upstream release
- Resolves: rhbz#2256371

* Sat Jun 29 2024 Python Maint <python-maint@redhat.com> - 0.29.0-5
- Rebuilt for Python 3.13

* Thu Jun 27 2024 topazus <topazus@outlook.com> - 0.29.0-4
- rebuild for python 3.13

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 01 2024 Packit <hello@packit.dev> - 0.29.0-1
- [packit] 0.29.0 upstream release

* Mon Jan 01 2024 topazus <topazus@outlook.com> - 0.28.1-2
- fix packit file

* Tue Oct 24 2023 topazus <topazus@outlook.com> - 0.28.1-1
- update to 0.28.1

* Fri Aug 11 2023 topazus <topazus@outlook.com> - 0.27.0-1
- bump to 0.27.0

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Fri Apr 14 2023 topazus <topazus@outlook.com> - 0.26.0-1
- Initial import (rhbz#2186489)
## END: Generated by rpmautospec