Gentoo Archives: gentoo-commits

From: Aisha Tammy <gentoo@×××××.cc>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/tensorflow/
Date: Sat, 26 Sep 2020 17:35:08
Message-Id: 1601141618.e9da317aa051172dcdffc6cfa472fac67d4586d3.epsilon-0@gentoo
1 commit: e9da317aa051172dcdffc6cfa472fac67d4586d3
2 Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
3 AuthorDate: Sat Sep 26 17:33:38 2020 +0000
4 Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
5 CommitDate: Sat Sep 26 17:33:38 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=e9da317a
7
8 sci-libs/tensorflow: drop package
9
10 present in ::gentoo
11 (recommended additions - pointy stick in eye)
12
13 Package-Manager: Portage-3.0.8, Repoman-3.0.1
14 Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
15
16 sci-libs/tensorflow/metadata.xml | 15 ---
17 sci-libs/tensorflow/tensorflow-1.0.1.ebuild | 28 ----
18 sci-libs/tensorflow/tensorflow-1.5.0.ebuild | 43 ------
19 sci-libs/tensorflow/tensorflow-1.7.0.ebuild | 111 ---------------
20 sci-libs/tensorflow/tensorflow-1.8.0.ebuild | 200 ----------------------------
21 5 files changed, 397 deletions(-)
22
23 diff --git a/sci-libs/tensorflow/metadata.xml b/sci-libs/tensorflow/metadata.xml
24 deleted file mode 100644
25 index b94b432fa..000000000
26 --- a/sci-libs/tensorflow/metadata.xml
27 +++ /dev/null
28 @@ -1,15 +0,0 @@
29 -<?xml version="1.0" encoding="UTF-8"?>
30 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
31 -<pkgmetadata>
32 - <maintainer type="person">
33 - <email>mmokrejs@×××××××××××××××.cz</email>
34 - <name>Martin Mokrejs</name>
35 - </maintainer>
36 - <maintainer type="project">
37 - <email>sci-biology@g.o</email>
38 - <name>Gentoo Biology Project</name>
39 - </maintainer>
40 - <use>
41 - <flag name="cuda">Enable CUDA support</flag>
42 - </use>
43 -</pkgmetadata>
44
45 diff --git a/sci-libs/tensorflow/tensorflow-1.0.1.ebuild b/sci-libs/tensorflow/tensorflow-1.0.1.ebuild
46 deleted file mode 100644
47 index b2e2e596a..000000000
48 --- a/sci-libs/tensorflow/tensorflow-1.0.1.ebuild
49 +++ /dev/null
50 @@ -1,28 +0,0 @@
51 -# Copyright 1999-2018 Gentoo Foundation
52 -# Distributed under the terms of the GNU General Public License v2
53 -
54 -EAPI=6
55 -
56 -PYTHON_COMPAT=( python2_7 python3_{3,4,5,6} )
57 -
58 -inherit distutils-r1 eutils
59 -
60 -DESCRIPTION="Library for numerical computation using data flow graphs"
61 -HOMEPAGE="https://www.tensorflow.org
62 - https://github.com/tensorflow/tensorflow"
63 -SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
64 -
65 -LICENSE="Apache-2.0"
66 -SLOT="0"
67 -KEYWORDS=""
68 -IUSE="cuda mpi"
69 -
70 -DEPEND="dev-util/bazel
71 - dev-python/wheel
72 - dev-python/numpy
73 - dev-libs/protobuf-c
74 - cuda? ( x11-drivers/nvidia-drivers dev-util/nvidia-cuda-toolkit )
75 - mpi? ( virtual/mpi )"
76 -RDEPEND="${DEPEND}"
77 -
78 -# TODO: seems it also support some MPI implementation
79
80 diff --git a/sci-libs/tensorflow/tensorflow-1.5.0.ebuild b/sci-libs/tensorflow/tensorflow-1.5.0.ebuild
81 deleted file mode 100644
82 index 0dae0c1d0..000000000
83 --- a/sci-libs/tensorflow/tensorflow-1.5.0.ebuild
84 +++ /dev/null
85 @@ -1,43 +0,0 @@
86 -# Copyright 1999-2018 Gentoo Foundation
87 -# Distributed under the terms of the GNU General Public License v2
88 -
89 -EAPI=6
90 -
91 -PYTHON_COMPAT=( python2_7 python3_{3,4,5,6} )
92 -
93 -inherit distutils-r1 eutils
94 -
95 -DESCRIPTION="Library for numerical computation using data flow graphs"
96 -HOMEPAGE="https://www.tensorflow.org
97 - https://github.com/tensorflow/tensorflow"
98 -SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
99 -
100 -LICENSE="Apache-2.0"
101 -SLOT="0"
102 -KEYWORDS=""
103 -IUSE="cuda mpi"
104 -
105 -# TensorFlow 1.7 may be the last time we support Cuda versions below 8.0.
106 -# Starting with TensorFlow 1.8 release, 8.0 will be the minimum supported
107 -# version.
108 -# TensorFlow 1.7 may be the last time we support cuDNN versions below 6.0.
109 -# Starting with TensorFlow 1.8 release, 6.0 will be the minimum supported
110 -# version.
111 -DEPEND="dev-util/bazel
112 - dev-python/wheel
113 - dev-python/numpy
114 - dev-libs/protobuf-c
115 - cuda? ( >=dev-util/nvidia-cuda-toolkit-7.0[profiler] >=dev-libs/cudnn-3 )
116 - mpi? ( virtual/mpi )"
117 -RDEPEND="${DEPEND}"
118 -
119 -# TODO: seems it also supports some MPI implementation
120 -
121 -src_configure(){
122 - # there is no setup.py but there is configure
123 - # https://www.tensorflow.org/install/install_sources
124 - # https://www.tensorflow.org/install/install_linux#InstallingNativePip
125 - #
126 - # usage: configure.py [-h] [--workspace WORKSPACE]
127 - ./configure || die
128 -}
129
130 diff --git a/sci-libs/tensorflow/tensorflow-1.7.0.ebuild b/sci-libs/tensorflow/tensorflow-1.7.0.ebuild
131 deleted file mode 100644
132 index 758872b99..000000000
133 --- a/sci-libs/tensorflow/tensorflow-1.7.0.ebuild
134 +++ /dev/null
135 @@ -1,111 +0,0 @@
136 -# Copyright 1999-2018 Gentoo Foundation
137 -# Distributed under the terms of the GNU General Public License v2
138 -
139 -EAPI=6
140 -
141 -PYTHON_COMPAT=( python2_7 python3_{3,4,5,6} )
142 -
143 -inherit python-r1 distutils-r1 eutils
144 -
145 -DESCRIPTION="Library for numerical computation using data flow graphs"
146 -HOMEPAGE="https://www.tensorflow.org
147 - https://github.com/tensorflow/tensorflow"
148 -SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
149 -
150 -LICENSE="Apache-2.0"
151 -SLOT="0"
152 -KEYWORDS=""
153 -IUSE="cuda mpi"
154 -
155 -# TensorFlow 1.7 may be the last time we support Cuda versions below 8.0.
156 -# Starting with TensorFlow 1.8 release, 8.0 will be the minimum supported
157 -# version.
158 -# TensorFlow 1.7 may be the last time we support cuDNN versions below 6.0.
159 -# Starting with TensorFlow 1.8 release, 6.0 will be the minimum supported
160 -# version.
161 -DEPEND="
162 - dev-util/bazel
163 - dev-python/wheel
164 - dev-python/numpy
165 - dev-libs/protobuf-c
166 - dev-python/absl-py
167 - cuda? ( >=dev-util/nvidia-cuda-toolkit-7.0[profiler] >=dev-libs/cudnn-3 )
168 - mpi? ( virtual/mpi )"
169 - #opencl? ( virtual/opencl )"
170 -RDEPEND="${DEPEND}"
171 -
172 -# TODO: seems it also supports some MPI implementations
173 -src_configure(){
174 - # there is no setup.py but there is configure
175 - # https://www.tensorflow.org/install/install_sources
176 - # https://www.tensorflow.org/install/install_linux#InstallingNativePip
177 - #
178 - # usage: configure.py [-h] [--workspace WORKSPACE]
179 - python_configure() {
180 - export PYTHON_BIN_PATH=${PYTHON}
181 - export PYTHON_LIB_PATH=${PYTHON_SITEDIR}
182 - export TF_NEED_JEMALLOC=1
183 - export TF_NEED_GCP=0
184 - export TF_NEED_HDFS=0
185 - export TF_NEED_S3=0
186 - export TF_NEED_KAFKA=0
187 - export TF_ENABLE_XLA=0
188 - export TF_NEED_GDR=0
189 - export TF_NEED_VERBS=0
190 - export TF_NEED_OPENCL=0
191 - if use cuda; then
192 - export TF_NEED_CUDA=1
193 - else
194 - export TF_NEED_CUDA=0
195 - fi
196 - if use mpi; then
197 - export TF_NEED_MPI=1
198 - else
199 - export TF_NEED_MPI=0
200 - fi
201 - export TF_NEED_OPENCL_SYCL=0
202 - export CC_OPT_FLAGS=${CFLAGS}
203 - export JAVA_HOME=$(java-config -O)
204 - # TODO: protect by a USE flag test --config=mkl
205 - ./configure || die
206 - }
207 - python_foreach_impl python_configure
208 -}
209 -
210 -src_compile() {
211 - python_compile() {
212 - # huh, by default tensorflow links static libs? See BUILD file
213 - # set framework_shared_object=true somehow
214 - if use cuda; then
215 - local opt="--config=cuda"
216 - else
217 - local opt=""
218 - fi
219 - bazel build --config=opt ${opt} /tensorflow/tools/pip_package:build_pip_package || die
220 - bazel-bin/tensorflow/tools/pip_package/build_pip_package tensorflow_pkg || die
221 - unzip -o -d tensorflow_pkg tensorflow_pkg/${P}-cp35-cp35m-linux_x86_64.whl || die
222 - python_domodule tensorflow_pkg/${P}.data/purelib/tensorflow
223 - bazel test || die
224 - bazel shutdown || die
225 - }
226 - python_foreach_impl python_compile
227 -}
228 -
229 -src_test() {
230 - python_foreach_impl python_test
231 -}
232 -
233 -src_install() {
234 - python_install() {
235 - # steal site-package path determination from sci-mathematics/z3
236 - local PYTHON_SITEDIR
237 - python_export PYTHON_SITEDIR
238 - cp -av tensorflow_pkg/"${P}".data/purelib/tensorflow/ "$PYTHON_SITEDIR" || die
239 - cp -av tensorflow_pkg/"${P}".dist-info "$PYTHON_SITEDIR" || die
240 - # mkdir -p "${D}/usr/$(get_libdir)/python3.6/site-packages" || die
241 - # cp -av tensorflow_pkg/"${P}".data/purelib/tensorflow/ "${ED}/usr/$(get_libdir)/python3.6/site-packages/" || die
242 - # cp -av tensorflow_pkg/"${P}".dist-info "${ED}/usr/$(get_libdir)/python3.6/site-packages/" || die
243 - }
244 - python_foreach_impl python_install
245 - einstalldocs
246 -}
247
248 diff --git a/sci-libs/tensorflow/tensorflow-1.8.0.ebuild b/sci-libs/tensorflow/tensorflow-1.8.0.ebuild
249 deleted file mode 100644
250 index 557095bc7..000000000
251 --- a/sci-libs/tensorflow/tensorflow-1.8.0.ebuild
252 +++ /dev/null
253 @@ -1,200 +0,0 @@
254 -# Copyright 1999-2018 Gentoo Foundation
255 -# Distributed under the terms of the GNU General Public License v2
256 -
257 -EAPI=6
258 -
259 -PYTHON_COMPAT=( python2_7 python3_{3,4,5,6} )
260 -
261 -inherit python-r1 distutils-r1 eutils versionator
262 -
263 -DESCRIPTION="Library for numerical computation using data flow graphs"
264 -HOMEPAGE="https://www.tensorflow.org
265 - https://github.com/tensorflow/tensorflow"
266 -SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
267 - https://dev.gentoo.org/~gienah/snapshots/${P}-bazel-cache-repos.tar.xz"
268 -
269 -LICENSE="Apache-2.0"
270 -SLOT="0"
271 -KEYWORDS="~amd64"
272 -IUSE="cuda cxx mpi"
273 -
274 -# To create the cache repo tar file, temporarilly remove the
275 -# ${P}-bazel-cache-repos.tar.xz from SRC_URI and src_upack. Then build
276 -# it so that bazel will download the files:
277 -# FEATURES="noclean -network-sandbox" emerge -av sci-libs/tensorflow
278 -# cd /var/tmp/portage/sci-libs/${P}
279 -# tar --owner=portage --group=portage -cJvf \
280 -# /usr/portage/distfiles/${P}-bazel-cache-repos.tar.xz \
281 -# homedir/.cache/bazel/_bazel_portage/cache/repos/v1
282 -
283 -# TensorFlow 1.7 may be the last time we support Cuda versions below 8.0.
284 -# Starting with TensorFlow 1.8 release, 8.0 will be the minimum supported
285 -# version.
286 -# TensorFlow 1.7 may be the last time we support cuDNN versions below 6.0.
287 -# Starting with TensorFlow 1.8 release, 6.0 will be the minimum supported
288 -# version.
289 -# Possibly missing deps:
290 -# dev-python/gast
291 -DEPEND="
292 - cxx? ( dev-libs/protobuf )
293 - dev-python/absl-py[${PYTHON_USEDEP}]
294 - dev-python/astor[${PYTHON_USEDEP}]
295 - dev-python/numpy[${PYTHON_USEDEP}]
296 - dev-python/protobuf-python[${PYTHON_USEDEP}]
297 - dev-python/six[${PYTHON_USEDEP}]
298 - dev-python/termcolor[${PYTHON_USEDEP}]
299 - dev-python/wheel[${PYTHON_USEDEP}]
300 - dev-libs/jemalloc
301 - dev-libs/protobuf-c
302 - dev-util/bazel
303 - media-libs/giflib
304 - virtual/jpeg:0
305 - cuda? ( >=dev-util/nvidia-cuda-toolkit-8.0[profiler] >=dev-libs/cudnn-6 )
306 - mpi? ( virtual/mpi )"
307 - #opencl? ( virtual/opencl )"
308 -RDEPEND="${DEPEND}"
309 -
310 -src_unpack() {
311 - unpack ${P}.tar.gz
312 - pushd .. || die
313 - unpack distdir/${P}-bazel-cache-repos.tar.xz
314 - popd || die
315 -}
316 -
317 -# TODO: seems it also supports some MPI implementations
318 -src_configure(){
319 - # there is no setup.py but there is configure
320 - # https://www.tensorflow.org/install/install_sources
321 - # https://www.tensorflow.org/install/install_linux#InstallingNativePip
322 - #
323 - # usage: configure.py [-h] [--workspace WORKSPACE]
324 - python_configure() {
325 - export PYTHON_BIN_PATH=${PYTHON}
326 - export PYTHON_LIB_PATH=${PYTHON_SITEDIR}
327 - export TF_NEED_JEMALLOC=1
328 - export TF_NEED_GCP=0
329 - export TF_NEED_HDFS=0
330 - export TF_NEED_S3=0
331 - export TF_NEED_KAFKA=0
332 - export TF_ENABLE_XLA=0
333 - export TF_NEED_GDR=0
334 - export TF_NEED_VERBS=0
335 - export TF_NEED_OPENCL=0
336 - if use cuda; then
337 - export TF_NEED_CUDA=1
338 - else
339 - export TF_NEED_CUDA=0
340 - fi
341 - if use mpi; then
342 - export TF_NEED_MPI=1
343 - else
344 - export TF_NEED_MPI=0
345 - fi
346 - export TF_NEED_OPENCL_SYCL=0
347 - export CC_OPT_FLAGS=${CFLAGS}
348 - export JAVA_HOME=$(java-config -O)
349 - # TODO: protect by a USE flag test --config=mkl
350 - ./configure || die
351 - }
352 - python_foreach_impl python_configure
353 -}
354 -
355 -bazel-get-flags() {
356 - local fs=""
357 - for i in ${CXXFLAGS}; do
358 - [[ -n "${fs}" ]] && fs+=" "
359 - fs+="--cxxopt=${i}"
360 - done
361 - for i in ${CPPFLAGS}; do
362 - [[ -n "${fs}" ]] && fs+=" "
363 - fs+="--copt=${i}"
364 - fs+="--cxxopt=${i}"
365 - done
366 - for i in ${LDFLAGS}; do
367 - [[ -n "${fs}" ]] && fs+=" "
368 - fs+="--linkopt=${i}"
369 - done
370 - echo "${fs}"
371 -}
372 -
373 -src_compile() {
374 - # F: fopen_wr
375 - # S: deny
376 - # P: /proc/self/setgroups
377 - # A: /proc/self/setgroups
378 - # R: /proc/7712/setgroups
379 - # C: unable to read /proc/1/cmdline
380 - addpredict /proc
381 -
382 - local opt=$(usex cuda "--config=cuda" "")
383 - einfo ">>> Compiling ${PN} C"$(usex cxx " and C++" "")
384 - einfo " bazel build \\"
385 - einfo " --config=opt ${opt} \\"
386 - einfo " $(bazel-get-flags) \\"
387 - einfo " //tensorflow:libtensorflow.so \\"
388 - einfo " //tensorflow:libtensorflow_framework.so \\"
389 - einfo " "$(usex cxx "//tensorflow:libtensorflow_cc.so" "")
390 - bazel build \
391 - --config=opt ${opt} \
392 - $(bazel-get-flags) \
393 - //tensorflow:libtensorflow.so \
394 - //tensorflow:libtensorflow_framework.so \
395 - $(usex cxx "//tensorflow:libtensorflow_cc.so" "") || die
396 -
397 - python_compile() {
398 - einfo ">>> Compiling ${PN} ${MULTIBUILD_VARIANT}"
399 - einfo " bazel build \\"
400 - einfo " --config=opt ${opt} \\"
401 - einfo " $(bazel-get-flags) \\"
402 - einfo " //tensorflow/tools/pip_package:build_pip_package"
403 - bazel build \
404 - --config=opt ${opt} \
405 - $(bazel-get-flags) \
406 - //tensorflow/tools/pip_package:build_pip_package || die
407 - bazel-bin/tensorflow/tools/pip_package/build_pip_package tensorflow_pkg || die
408 - unzip -o -d ${PN}_pkg_${MULTIBUILD_VARIANT} ${PN}_pkg/${P}-*.whl || die
409 - rm -f ${PN}_pkg_${MULTIBUILD_VARIANT}/lib${PN}_framework.so || die
410 - }
411 - python_foreach_impl python_compile
412 - bazel shutdown || die
413 -}
414 -
415 -src_test() {
416 - python_foreach_impl python_test
417 -}
418 -
419 -src_install() {
420 - local SO1=$(get_major_version)
421 - local SOVER=$(version_format_string '$1.$2')
422 - local tl="${PN} ${PN}_framework"
423 - dodir /usr/include/${PN}/${PN}/c
424 - insinto /usr/include/${PN}/${PN}/c
425 - doins ${PN}/c/c_api.h
426 - if use cxx; then
427 - for i in $(find ${PN}/cc ${PN}/core third_party/eigen3 -type f \
428 - \( -name \*.h -o \
429 - -wholename third_party/eigen3/Eigen/\* \) -print); do
430 - dodir $(dirname /usr/include/${PN}/${i})
431 - insinto $(dirname /usr/include/${PN}/${i})
432 - doins ${i}
433 - done
434 - tl+=" ${PN}_cc"
435 - fi
436 - for i in ${tl}; do
437 - dolib.so bazel-bin/${PN}/lib${i}.so
438 - dosym "lib${i}.so" \
439 - "/usr/$(get_libdir)/lib${i}.so.${SO1}" \
440 - || die "Could not create /usr/$(get_libdir)/lib${i}.so.${SO1} symlink"
441 - dosym "lib${i}.so" \
442 - "/usr/$(get_libdir)/lib${i}.so.${SOVER}" \
443 - || die "Could not create /usr/$(get_libdir)/lib${i}.so.${SOVER} symlink"
444 - done
445 - python_install() {
446 - python_domodule ${PN}_pkg_${MULTIBUILD_VARIANT}/${P}.data/purelib/${PN}
447 - dosym "../../../lib${PN}_framework.so" \
448 - "$(python_get_sitedir)/${PN}/lib${PN}_framework.so" \
449 - || die "Could not create $(python_get_sitedir)/lib${PN}_framework.so symlink for python module"
450 - }
451 - python_foreach_impl python_install
452 - einstalldocs
453 -}