## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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 # We’re using a git commit because the PyPI tar does not contain any tests but # the github source does; unfortunately, upstream does not tag releases on # GitHub, but we are confident we are using the git commit that corresponds to # the PyPI release. %global commit c6d81ce7eede6db801d4e9a92b27ec5d409d0eab Name: python-autograd # Because we are using the commit that corresponds to the PyPI release (even # though it is not tagged), we do not use the snapinfo version field even # though our source URL is based on the git commit hash. Version: 1.5 Release: %autorelease Summary: Efficiently computes derivatives of numpy code # SPDX License: MIT URL: https://github.com/HIPS/autograd Source0: %{url}/archive/%{commit}/autograd-%{commit}.tar.gz # Fix mvn tests (fixes #588) # https://github.com/HIPS/autograd/commit/7a66f14b9d3b8c371c803b9519de0c6db36d1eef # Fixes: # Four scipy tests are failing # https://github.com/HIPS/autograd/issues/588 Patch: %{url}/commit/7a66f14b9d3b8c371c803b9519de0c6db36d1eef.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pytest) BuildRequires: python3dist(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: python3dist(scipy) %description -n python3-autograd %_description %package doc Summary: %{summary} %description doc Documentation for %{name}. %prep %autosetup -n autograd-%{commit} -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} %doc README.md %files doc %doc examples/ %license license.txt %changelog * Wed Mar 22 2023 Benjamin A. Beasley 1.5-2 - Patch mvn tests that were failing (no change to library code) * Fri Mar 17 2023 Benjamin A. Beasley 1.5-1 - Update to 1.5 - Add a weak dependency on scipy * Fri Mar 17 2023 Benjamin A. Beasley 1.3-19 - Confirm License is SPDX MIT * Fri Mar 17 2023 Mamoru TASAKA 1.3-18 - Backport upstream fix for build with numpy 2.24 * Fri Jan 20 2023 Fedora Release Engineering 1.3-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering 1.3-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint 1.3-15 - Rebuilt for Python 3.11 * Sat Jun 11 2022 Benjamin A. Beasley 1.3-14 - Fix Python 3.11 compatibility (close RHBZ#2094014) * Tue Feb 15 2022 hardeborlaa 1.3-13 - initial import to src.fp.o * Tue Feb 15 2022 hardeborlaa 1.3-12 - updated spec doc * Tue Feb 15 2022 hardeborlaa 1.3-11 - updated spec file * Tue Feb 15 2022 hardeborlaa 1.3-10 - add comment * Tue Feb 15 2022 Ankur Sinha (Ankur Sinha Gmail) 1.3-9 - chore: regenerate srcrpm * Tue Feb 15 2022 Ankur Sinha (Ankur Sinha Gmail) 1.3-8 - feat: reformat description * Tue Feb 15 2022 Ankur Sinha (Ankur Sinha Gmail) 1.3-7 - chore: clean up old files * Tue Feb 15 2022 hardeborlaa 1.3-6 - spec and srpm updated * Tue Feb 15 2022 hardeborlaa 1.3-5 - %%autorelease and %%autochangelog changes * Tue Feb 15 2022 hardeborlaa 1.3-4 - license text included in its file * Tue Feb 15 2022 hardeborlaa 1.3-3 - Add Spec and Srcrpm for Review * Tue Feb 15 2022 hardeborlaa 1.3-2 - Add spec and tar file for Review * Tue Feb 15 2022 hardeborlaa 1.3-1 - Add Spec and tar file