diff options
author | wangjiezhe <wangjiezhe@gmail.com> | 2024-01-20 19:24:58 +0800 |
---|---|---|
committer | Jason Zaman <perfinion@gentoo.org> | 2024-02-03 11:33:01 -0800 |
commit | ba0f5232c5d77be561fafb77e5e8fa173b5bd641 (patch) | |
tree | 0cb11fa307efe145fcafcfcd07d0d360a349a375 /sci-libs | |
parent | sci-libs/tensorflow: add 2.15.0 (diff) | |
download | gentoo-ba0f5232c5d77be561fafb77e5e8fa173b5bd641.tar.gz gentoo-ba0f5232c5d77be561fafb77e5e8fa173b5bd641.tar.bz2 gentoo-ba0f5232c5d77be561fafb77e5e8fa173b5bd641.zip |
sci-libs/keras: add 2.15.0
Signed-off-by: wangjiezhe <wangjiezhe@gmail.com>
Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/keras/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/keras/keras-2.15.0.ebuild | 84 |
2 files changed, 85 insertions, 0 deletions
diff --git a/sci-libs/keras/Manifest b/sci-libs/keras/Manifest index 0032aa4f3fac..d05d881937da 100644 --- a/sci-libs/keras/Manifest +++ b/sci-libs/keras/Manifest @@ -6,3 +6,4 @@ DIST keras-2.11.0.tar.gz 2260857 BLAKE2B 9c85e0f64176848886509fbf269b85732f8ad98 DIST keras-2.12.0.tar.gz 2319287 BLAKE2B 332b2b02eecac2da7c87c1f051c56d495027630e2e0254d543897e462f7f44a282bff6cf3cbe2602663cae2e2c76ab45c9b3b53cadbc3317b3e2dd366bdf7ace SHA512 10d034abc9b159a0945610dcfb2fc58d8143267629b8f59496b4e5f097b1220bdb02a269f135f05b8abed56c2d5237b3e0c2b74882cd3f321850fc7f47694dbb DIST keras-2.13.1.tar.gz 2373567 BLAKE2B 8b8b0c51fa9c0f53baa2306d0ee4361aaeaed272d887e0fb2f4289696a74e2cb45239fb378db70d954346b30124255a16002555002813656607721b3f393d0c2 SHA512 0f0c93f31d555e27e3f4268af7749b4c494a1f698bc763cebc4efe55e8011dbf637b978ca976ed61c46e8b11b8267b1a277d5048c3d3bcbe47005ee8960a1fc3 DIST keras-2.14.0.tar.gz 2385374 BLAKE2B adca6634e06130d6f238d58e1d94ddd435b30da9b9cc8dd46f40d3ceec98cc6a82c37c3454c438f79b22da1aee223fcae99cf73fe1348383669c5176ee9ef225 SHA512 aeb89c8186410d0a5b36b3293d5e36111755716adde1b89fc33a3cc35f8dbdd297a8f8c7f54c9ca21835bc430ba0886a1eee13febe0dbcc510bfab602a6ddc81 +DIST keras-2.15.0.tar.gz 2389088 BLAKE2B 8cadb992f8e23568a1680d825b382c25d5ec5b82be758289c977a071cb5000429d40738c1462c292f53cda20fbfdc499c025b2fbb1ca9637eb2a8e5789c0a5bf SHA512 2ce001d8dadda2a3df24420a512822204795300215db4496003c1f1a317223f1a8aa6f8b2493a67fbaf9986c2a48e1fd1065828eac6a6f3953bad3db66ed7515 diff --git a/sci-libs/keras/keras-2.15.0.ebuild b/sci-libs/keras/keras-2.15.0.ebuild new file mode 100644 index 000000000000..c67472647c1b --- /dev/null +++ b/sci-libs/keras/keras-2.15.0.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) +inherit bazel distutils-r1 + +DESCRIPTION="Deep Learning for humans" +HOMEPAGE="https://keras.io/" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +bazel_external_uris=" + https://github.com/bazelbuild/rules_cc/releases/download/0.0.2/rules_cc-0.0.2.tar.gz -> bazelbuild-rules_cc-0.0.2.tar.gz + https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip -> bazelbuild-rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip" + +SRC_URI="https://github.com/keras-team/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + ${bazel_external_uris}" + +RDEPEND=" + >=dev-libs/protobuf-3.13.0:= + dev-python/absl-py[${PYTHON_USEDEP}] + dev-python/h5py[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/pandas[${PYTHON_USEDEP}] + dev-python/pillow[${PYTHON_USEDEP}] + >=dev-python/protobuf-python-3.13.0[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + >=sci-libs/keras-applications-1.0.8[${PYTHON_USEDEP}] + >=sci-libs/keras-preprocessing-1.1.2[${PYTHON_USEDEP}] + >=sci-libs/tensorflow-2.15[python,${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}]" +BDEPEND=" + app-arch/unzip + >=dev-libs/protobuf-3.13.0 + dev-java/java-config + >=dev-build/bazel-5.3.0" + +# Bazel tests not pytest, also want GPU access +RESTRICT="test" +DOCS=( CONTRIBUTING.md README.md ) +PATCHES=( + "${FILESDIR}/keras-2.14.0-0001-bazel-Use-system-protobuf.patch" +) + +src_unpack() { + unpack "${P}.tar.gz" + bazel_load_distfiles "${bazel_external_uris}" +} + +src_prepare() { + bazel_setup_bazelrc + default + python_copy_sources +} + +python_compile() { + pushd "${BUILD_DIR}" >/dev/null || die + + ebazel build //keras/tools/pip_package:build_pip_package + ebazel shutdown + + local srcdir="${T}/src-${EPYTHON/./_}" + mkdir -p "${srcdir}" || die + bazel-bin/keras/tools/pip_package/build_pip_package --src "${srcdir}" || die + + popd || die +} + +src_compile() { + export JAVA_HOME=$(java-config --jre-home) + distutils-r1_src_compile +} + +python_install() { + pushd "${T}/src-${EPYTHON/./_}" >/dev/null || die + esetup.py install + python_optimize + popd || die +} |