commit: fe00622168823bf41594d7db05968710636386c6
Author: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT>
de>
AuthorDate: Sun May 4 14:26:27 2025 +0000
Commit: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT>
de>
CommitDate: Tue May 6 14:20:29 2025 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=fe006221
dev-python/autograd: new package, add 1.8.0, 9999
Signed-off-by: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik.de>
dev-python/autograd/autograd-1.8.0.ebuild | 39 +++++++++++++++++++++++++++++++
dev-python/autograd/autograd-9999.ebuild | 39 +++++++++++++++++++++++++++++++
dev-python/autograd/metadata.xml | 19 +++++++++++++++
3 files changed, 97 insertions(+)
diff --git a/dev-python/autograd/autograd-1.8.0.ebuild
b/dev-python/autograd/autograd-1.8.0.ebuild
new file mode 100644
index 000000000..1ed04dc75
--- /dev/null
+++ b/dev-python/autograd/autograd-1.8.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..13} )
+DISTUTILS_USE_PEP517=hatchling
+inherit distutils-r1
+
+DESCRIPTION="Efficiently computes derivatives of numpy code."
+HOMEPAGE="
+ https://github.com/HIPS/autograd
+"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/HIPS/autograd"
+ EGIT_BRANCH="master"
+else
+
SRC_URI="https://github.com/HIPS/autograd/archive/refs/tags/v${PV}.tar.gz ->
${P}.gh.tar.gz" # no pypi release yet...
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+RDEPEND="
+ >=dev-python/numpy-1.12[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+"
+
+python_prepare_all() {
+ # remove pytest-cov dep
+ sed -i -e 's/"pytest-cov",//g' pyproject.toml || die
+ sed -i -e "s/--cov=autograd --cov-report=xml --cov-report=term//"
pyproject.toml || die
+ distutils-r1_python_prepare_all
+}
+
+distutils_enable_tests pytest
diff --git a/dev-python/autograd/autograd-9999.ebuild
b/dev-python/autograd/autograd-9999.ebuild
new file mode 100644
index 000000000..1ed04dc75
--- /dev/null
+++ b/dev-python/autograd/autograd-9999.ebuild
@@ -0,0 +1,39 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..13} )
+DISTUTILS_USE_PEP517=hatchling
+inherit distutils-r1
+
+DESCRIPTION="Efficiently computes derivatives of numpy code."
+HOMEPAGE="
+ https://github.com/HIPS/autograd
+"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/HIPS/autograd"
+ EGIT_BRANCH="master"
+else
+
SRC_URI="https://github.com/HIPS/autograd/archive/refs/tags/v${PV}.tar.gz ->
${P}.gh.tar.gz" # no pypi release yet...
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+RDEPEND="
+ >=dev-python/numpy-1.12[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+"
+
+python_prepare_all() {
+ # remove pytest-cov dep
+ sed -i -e 's/"pytest-cov",//g' pyproject.toml || die
+ sed -i -e "s/--cov=autograd --cov-report=xml --cov-report=term//"
pyproject.toml || die
+ distutils-r1_python_prepare_all
+}
+
+distutils_enable_tests pytest
diff --git a/dev-python/autograd/metadata.xml b/dev-python/autograd/metadata.xml
new file mode 100644
index 000000000..e47d7e870
--- /dev/null
+++ b/dev-python/autograd/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>[email protected]</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>[email protected]</email>
+ <name>Alexander Puck Neuwirth</name>
+ </maintainer>
+ <longdescription lang="en">
+ 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.
+ </longdescription>
+ <upstream>
+ <remote-id type="pypi">autograd</remote-id>
+ <remote-id type="github">HIPS/autograd</remote-id>
+ </upstream>
+</pkgmetadata>