Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/tensorflow-estimator/
Date: Fri, 23 Sep 2022 03:07:00
Message-Id: 1663902405.a65bfc870c43d99cd08d4da3de319b2e5245dd06.perfinion@gentoo
1 commit: a65bfc870c43d99cd08d4da3de319b2e5245dd06
2 Author: Jason Zaman <perfinion <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 19 01:52:22 2022 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 23 03:06:45 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a65bfc87
7
8 sci-libs/tensorflow-estimator: add 2.10
9
10 Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>
11
12 sci-libs/tensorflow-estimator/Manifest | 1 +
13 .../tensorflow-estimator-2.10.ebuild | 75 ++++++++++++++++++++++
14 2 files changed, 76 insertions(+)
15
16 diff --git a/sci-libs/tensorflow-estimator/Manifest b/sci-libs/tensorflow-estimator/Manifest
17 index c272eb0e409c..6e57a118cf8d 100644
18 --- a/sci-libs/tensorflow-estimator/Manifest
19 +++ b/sci-libs/tensorflow-estimator/Manifest
20 @@ -1,4 +1,5 @@
21 DIST bazelbuild-rules_cc-b1c40e1de81913a3c40e5948f78719c28152486d.zip 201360 BLAKE2B 0173a8edb17f344b18e42026e2f8a62a1909d4694ab0be83562b6437a3f1ef38889f069269ddd2308b41062e5f375f791be0d2631a8e52ede668203779813b56 SHA512 2ba1dc316d88947c1d17ec67154c052700e3571b8d03370a9f204cf9fe94a1bd58f93a2c4a3c0b02233ee3250053a4c30a4133b5b38745858c1d04be8c9d973f
22 DIST bazelbuild-rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip 9422 BLAKE2B bbc45c97551ee8126335b611ffca6574dac843d4db9b3221b10d26487f8eecfe38ba0cd67a4039a3ad921c25fea6294c43e4f4e7a57a060a30791acd6c4f9d39 SHA512 ba06242feb711e7fb6e821fd9ac029248b4f3e466fb1acf971d0db8196f3efe4d114ef137acbe4913073f8cbe8ccab4d47d8bafa21b867b2d6a6d57f5a647f0c
23 +DIST tensorflow-estimator-2.10.tar.gz 655011 BLAKE2B 465b405bfc5b776bc9722407f0d475b4ce8a520bded4b6f0db4c9fc771b9486a4ef08ae460f2e1c8c4be1d2882b942fff79f7f08a458eaa444f1bb44eb66e91c SHA512 63cdc97d9abf3551a931372ab91e86b1cab761ea7476182ed82ac7c56884d315107b1873376385bcdfc531465c11fe0273aefe8b88e8b333d8e7b54e7d0a09eb
24 DIST tensorflow-estimator-2.8.0.tar.gz 691913 BLAKE2B 7c8059ec3c5e94f67b7fbb49b508e313f0a12eac0627b04471fe1ac82c26aaae2a120a834ce3dc5a16931119ffc31a9d96935b8f727d851885fa132eb08fa2ea SHA512 02a3009fd8f9f560dea6190989af7c58402777a414cd4bf036d24546fc4a747bb8a5515a5d6fea3bdb848cb9604239b19d43096c5f125a1fa434ae8fee44cf0a
25 DIST tensorflow-estimator-2.9.0.tar.gz 654755 BLAKE2B 24cd6fc0b78144f8b529ef5b502cdbf9702dc630ac28256a99d68b98b51518b65af533897e837ced6a6da11e1260847aa0e4ebdf90d37aa22bb3bcd2841bd3ea SHA512 277e398104ac92a48e481e0ee4d3bbc607ae79d0a03c6685723a2430117461c1f17090f56ab88b2ae1c86c8dfc6ec1b44a478a1b606b4432bd68d79ac0720475
26
27 diff --git a/sci-libs/tensorflow-estimator/tensorflow-estimator-2.10.ebuild b/sci-libs/tensorflow-estimator/tensorflow-estimator-2.10.ebuild
28 new file mode 100644
29 index 000000000000..df19c5f9a037
30 --- /dev/null
31 +++ b/sci-libs/tensorflow-estimator/tensorflow-estimator-2.10.ebuild
32 @@ -0,0 +1,75 @@
33 +# Copyright 1999-2022 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=8
37 +
38 +PYTHON_COMPAT=( python3_{8,9,10} )
39 +MY_PN="estimator"
40 +MY_PV=${PV/_rc/-rc}
41 +MY_P=${MY_PN}-${MY_PV}
42 +
43 +inherit bazel distutils-r1
44 +
45 +DESCRIPTION="A high-level TensorFlow API that greatly simplifies machine learning programming"
46 +HOMEPAGE="https://www.tensorflow.org/"
47 +
48 +LICENSE="Apache-2.0"
49 +SLOT="0"
50 +KEYWORDS="~amd64"
51 +IUSE=""
52 +
53 +bazel_external_uris="
54 + https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip -> bazelbuild-rules_cc-b1c40e1de81913a3c40e5948f78719c28152486d.zip
55 + https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip -> bazelbuild-rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip"
56 +
57 +SRC_URI="https://github.com/tensorflow/${MY_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz
58 + ${bazel_external_uris}"
59 +
60 +RDEPEND="
61 + sci-libs/tensorflow[python,${PYTHON_USEDEP}]
62 + sci-libs/keras[${PYTHON_USEDEP}]"
63 +DEPEND="${RDEPEND}"
64 +BDEPEND="
65 + app-arch/unzip
66 + dev-java/java-config
67 + >=dev-util/bazel-4.2.2"
68 +
69 +S="${WORKDIR}/${MY_P}"
70 +
71 +DOCS=( CONTRIBUTING.md README.md )
72 +
73 +src_unpack() {
74 + unpack "${P}.tar.gz"
75 + bazel_load_distfiles "${bazel_external_uris}"
76 +}
77 +
78 +src_prepare() {
79 + bazel_setup_bazelrc
80 + default
81 + python_copy_sources
82 +}
83 +
84 +python_compile() {
85 + pushd "${BUILD_DIR}" >/dev/null || die
86 +
87 + ebazel build //tensorflow_estimator/tools/pip_package:build_pip_package
88 + ebazel shutdown
89 +
90 + local srcdir="${T}/src-${EPYTHON/./_}"
91 + mkdir -p "${srcdir}" || die
92 + bazel-bin/tensorflow_estimator/tools/pip_package/build_pip_package --src "${srcdir}" || die
93 +
94 + popd || die
95 +}
96 +
97 +src_compile() {
98 + export JAVA_HOME=$(java-config --jre-home)
99 + distutils-r1_src_compile
100 +}
101 +
102 +python_install() {
103 + pushd "${T}/src-${EPYTHON/./_}" >/dev/null || die
104 + esetup.py install
105 + python_optimize
106 + popd || die
107 +}