|
|
09755b0 |
# Why not use forge macros when pulling from GitHub
|
|
|
09755b0 |
%global forgeurl https://github.com/HIPS/autograd
|
|
|
09755b0 |
|
|
|
073f407 |
# We’re using a git commit because the PyPI tar does not contain any tests but
|
|
|
073f407 |
# the github source does; unfortunately, upstream does not tag releases on
|
|
|
073f407 |
# GitHub, but we are confident we are using the git commit that corresponds to
|
|
|
073f407 |
# the PyPI release.
|
|
|
2354d18 |
# https://github.com/HIPS/autograd/issues/392
|
|
|
2354d18 |
%global commit 1bb5cbc21d2aa06e0c61654a9cc6f38c174dacc0
|
|
|
f6ea24b |
|
|
|
09755b0 |
# Don't use commit in dist tag
|
|
|
09755b0 |
%global distprefix %{nil}
|
|
|
09755b0 |
|
|
|
c9b9db7 |
Name: python-autograd
|
|
|
073f407 |
# Because we are using the commit that corresponds to the PyPI release (even
|
|
|
073f407 |
# though it is not tagged), we do not use the snapinfo version field even
|
|
|
073f407 |
# though our source URL is based on the git commit hash.
|
|
|
2354d18 |
Version: 1.6.2
|
|
|
791aa6d |
Release: %autorelease
|
|
|
791aa6d |
Summary: Efficiently computes derivatives of numpy code
|
|
|
09755b0 |
%forgemeta
|
|
|
b0117c1 |
# SPDX
|
|
|
c9b9db7 |
License: MIT
|
|
|
09755b0 |
URL: %forgeurl
|
|
|
09755b0 |
Source0: %forgesource
|
|
|
91924c4 |
|
|
|
c9b9db7 |
BuildArch: noarch
|
|
|
073f407 |
|
|
|
c9b9db7 |
BuildRequires: python3-devel
|
|
|
32d4e8e |
BuildRequires: python3-pytest
|
|
|
32d4e8e |
BuildRequires: python3-scipy
|
|
|
073f407 |
|
|
|
c9b9db7 |
%global _description %{expand:
|
|
|
f6ea24b |
Autograd can automatically differentiate native Python and Numpy code. It can
|
|
|
f6ea24b |
handle a large subset of Python's features, including loops, ifs, recursion and
|
|
|
f6ea24b |
closures, and it can even take derivatives of derivatives of derivatives. It
|
|
|
f6ea24b |
supports reverse-mode differentiation (a.k.a. backpropagation), which means it
|
|
|
f6ea24b |
can efficiently take gradients of scalar-valued functions with respect to
|
|
|
f6ea24b |
array-valued arguments, as well as forward-mode differentiation, and the two
|
|
|
f6ea24b |
can be composed arbitrarily. The main intended application of Autograd is
|
|
|
f6ea24b |
gradient-based optimization.}
|
|
|
c9b9db7 |
|
|
|
c9b9db7 |
%description %_description
|
|
|
c9b9db7 |
|
|
|
c9b9db7 |
%package -n python3-autograd
|
|
|
c9b9db7 |
Summary: %{summary}
|
|
|
c9b9db7 |
|
|
|
32d4e8e |
Recommends: python3-scipy
|
|
|
073f407 |
|
|
|
c9b9db7 |
%description -n python3-autograd %_description
|
|
|
c9b9db7 |
|
|
|
62d826d |
%package doc
|
|
|
62d826d |
Summary: %{summary}
|
|
|
62d826d |
|
|
|
62d826d |
%description doc
|
|
|
62d826d |
Documentation for %{name}.
|
|
|
62d826d |
|
|
|
c9b9db7 |
|
|
|
c9b9db7 |
%prep
|
|
|
09755b0 |
%forgeautosetup -p1
|
|
|
c9b9db7 |
|
|
|
c9b9db7 |
|
|
|
073f407 |
%generate_buildrequires
|
|
|
073f407 |
%pyproject_buildrequires
|
|
|
c9b9db7 |
|
|
|
c9b9db7 |
|
|
|
c9b9db7 |
%build
|
|
|
c9b9db7 |
%pyproject_wheel
|
|
|
c9b9db7 |
|
|
|
c9b9db7 |
|
|
|
c9b9db7 |
%install
|
|
|
c9b9db7 |
%pyproject_install
|
|
|
c9b9db7 |
%pyproject_save_files autograd
|
|
|
c9b9db7 |
|
|
|
c9b9db7 |
|
|
|
c9b9db7 |
%check
|
|
|
073f407 |
%pyproject_check_import
|
|
|
073f407 |
|
|
|
9fcc15a |
# https://github.com/HIPS/autograd/issues/588#issuecomment-1479446916
|
|
|
073f407 |
k="${k-}${k+ and }not test_odeint"
|
|
|
073f407 |
|
|
|
073f407 |
%pytest -k "${k-}"
|
|
|
c9b9db7 |
|
|
|
c9b9db7 |
|
|
|
c9b9db7 |
%files -n python3-autograd -f %{pyproject_files}
|
|
|
8092150 |
%license license.txt
|
|
|
450cbb1 |
%doc README.md
|
|
|
62d826d |
|
|
|
073f407 |
|
|
|
62d826d |
%files doc
|
|
|
073f407 |
%doc examples/
|
|
|
49200a9 |
%license license.txt
|
|
|
c9b9db7 |
|
|
|
62d826d |
|
|
|
c9b9db7 |
%changelog
|
|
|
791aa6d |
%autochangelog
|