## START: Set by rpmautospec
## (rpmautospec version 0.6.0)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    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-autograd
Version:        1.7.0
Release:        %autorelease
Summary:        Efficiently computes derivatives of numpy code

%global forgeurl https://github.com/HIPS/autograd
%forgemeta

# SPDX
License:        MIT
URL:            %forgeurl
Source:         %forgesource

BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-pytest
BuildRequires:  python3-scipy

%global _description %{expand:
Autograd can automatically differentiate native Python and Numpy code. It can
handle a large subset of Python's features, including loops, ifs, recursion and
closures, and it can even take derivatives of derivatives of derivatives.  It
supports reverse-mode differentiation (a.k.a. backpropagation), which means it
can efficiently take gradients of scalar-valued functions with respect to
array-valued arguments, as well as forward-mode differentiation, and the two
can be composed arbitrarily. The main intended application of Autograd is
gradient-based optimization.}

%description %_description

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

Recommends:     python3-scipy

%description -n python3-autograd %_description

%package doc
Summary:        %{summary}

%description doc
Documentation for %{name}.


%prep
%forgeautosetup -p1


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files autograd


%check
%pyproject_check_import

# https://github.com/HIPS/autograd/issues/588#issuecomment-1479446916
k="${k-}${k+ and }not test_odeint"

%pytest -k "${k-}"


%files -n python3-autograd -f %{pyproject_files}
%license license.txt
%doc README.md


%files doc
%doc examples/
%license license.txt


%changelog
## START: Generated by rpmautospec
* Thu Sep 26 2024 Sandro <devel@penguinpee.nl> - 1.7.0-1
- Update to 1.7.0 (RHBZ#2307372)
- Drop patches (merged upstream)
- Use tag instead of commit (releases are tagged now)

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

* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 1.6.2-9
- Rebuilt for Python 3.13

* Mon Apr 29 2024 Sandro <devel@penguinpee.nl> - 1.6.2-8
- Apply patches for Python 3.13 (RHBZ#2276611)
- Drop dependency on future
- Fix indentation in docstring

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

* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Tue Jan 02 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 1.6.2-4
- Add missing license file

* Mon Nov 20 2023 Sandro <devel@penguinpee.nl> - 1.6.2-3
- Use user friendly package names

* Mon Nov 20 2023 Sandro <devel@penguinpee.nl> - 1.6.2-2
- Use forge macros

* Tue Sep 05 2023 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.6.2-1
- feat: update to 1.6.2 (fixes rhbz#2216768)

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

* Thu Jun 29 2023 Python Maint <python-maint@redhat.com> - 1.5-3
- Rebuilt for Python 3.12

* Wed Mar 22 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 1.5-2
- Patch mvn tests that were failing (no change to library code)

* Fri Mar 17 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 1.5-1
- Update to 1.5
- Add a weak dependency on scipy

* Fri Mar 17 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 1.3-19
- Confirm License is SPDX MIT

* Fri Mar 17 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.3-18
- Backport upstream fix for build with numpy 2.24

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.3-15
- Rebuilt for Python 3.11

* Sat Jun 11 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.3-14
- Fix Python 3.11 compatibility (close RHBZ#2094014)

* Tue Feb 15 2022 hardeborlaa <adebola786@gmail.com> - 1.3-13
- initial import to src.fp.o

* Tue Feb 15 2022 hardeborlaa <adebola786@gmail.com> - 1.3-12
- updated spec doc

* Tue Feb 15 2022 hardeborlaa <adebola786@gmail.com> - 1.3-11
- updated spec file

* Tue Feb 15 2022 hardeborlaa <adebola786@gmail.com> - 1.3-10
- add comment

* Tue Feb 15 2022 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.3-9
- chore: regenerate srcrpm

* Tue Feb 15 2022 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.3-8
- feat: reformat description

* Tue Feb 15 2022 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com> - 1.3-7
- chore: clean up old files

* Tue Feb 15 2022 hardeborlaa <adebola786@gmail.com> - 1.3-6
- spec and srpm updated

* Tue Feb 15 2022 hardeborlaa <adebola786@gmail.com> - 1.3-5
- %%autorelease and %%autochangelog changes

* Tue Feb 15 2022 hardeborlaa <adebola786@gmail.com> - 1.3-4
- license text included in its file

* Tue Feb 15 2022 hardeborlaa <adebola786@gmail.com> - 1.3-3
- Add Spec and Srcrpm for Review

* Tue Feb 15 2022 hardeborlaa <adebola786@gmail.com> - 1.3-2
- Add spec and tar file for Review

* Tue Feb 15 2022 hardeborlaa <adebola786@gmail.com> - 1.3-1
- Add Spec and tar file
## END: Generated by rpmautospec