summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaman <perfinion@gentoo.org>2018-05-02 15:19:06 +0800
committerJason Zaman <perfinion@gentoo.org>2018-05-02 15:19:55 +0800
commit650e372ea172f7821d6a055ff26000de387aeb30 (patch)
tree0bf0d1e4881c57ae7d3a8d7d7680a50dbcd5d752 /sci-libs
parentnet-libs/grpc: new package (diff)
downloadgentoo-650e372ea172f7821d6a055ff26000de387aeb30.tar.gz
gentoo-650e372ea172f7821d6a055ff26000de387aeb30.tar.bz2
gentoo-650e372ea172f7821d6a055ff26000de387aeb30.zip
sci-libs/tensorflow: new package 1.8.0
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/tensorflow/Manifest42
-rw-r--r--sci-libs/tensorflow/files/0001-pip_package-modularize-build-script-to-allow-distros.patch211
-rw-r--r--sci-libs/tensorflow/metadata.xml15
-rw-r--r--sci-libs/tensorflow/tensorflow-1.8.0.ebuild302
4 files changed, 570 insertions, 0 deletions
diff --git a/sci-libs/tensorflow/Manifest b/sci-libs/tensorflow/Manifest
new file mode 100644
index 000000000000..c605cf57cd4e
--- /dev/null
+++ b/sci-libs/tensorflow/Manifest
@@ -0,0 +1,42 @@
+DIST 08039ba8ca59f64248bb3b6ae016460fe9c9914f.tar.gz 433332 BLAKE2B a5a9022c046a8362681cc54e755f1ae1c96a9100be0c1891841ab0326f56f564b4c494ba268573cb5450525e9e35d337ba2505ce63e576ea37da84e7a6554b5d SHA512 9fee59ae3485cbde8adec062af68e9de6be588607bb9280fffd64edbd6ba6f973dd4e158fe229b4228a44d949e68271645f918da720a2a398d1ba30b0b31c4bf
+DIST ARM_NEON_2_x86_SSE-0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz 99753 BLAKE2B 79b0c9e2f3a8de91bb042e55cbc9f589970add4c9bdccd96c9a0f38887418c97aa67fc433b4feffb92a1384039b0d68a7cc6cda141371427a310172422bd41d6 SHA512 a21df040a5b3f67d9be006ae414113fa1ca86d38fa446acfab18afcbbb89ee7c48776fac5565d0694c99f1ff6ead3b10a9915eac7aae4d2a532ef5ac126a0072
+DIST LMDB_0.9.19.tar.gz 143141 BLAKE2B 69f39e2194638989d8a17b79edd7918966d5608f4e611a7446b45e7321adf3b7d4bd69107fe00a1476d32cbd43b83f512c8498cefa3fca7eea8ba615821341fe SHA512 1d9825f09592ad92a540a1dec232cf6649f41cc67b0d59dc8958a71f4090f347c84995f32a166e2c2efecb862981f455814dd07af99bc3489e42fe3fd8bc6191
+DIST abseil_cpp-720c017e30339fd1786ce4aac68bc8559736e53f.tar.gz 529637 BLAKE2B fea7eceda492764613ffe944331e6b08af33d600036e9b2453f4c09e892f22f79a95b00a29a9bdf9e705d11502027d88659e19aa484cf4a02158209b058cec13 SHA512 3ac70cb924518627dfc6ec2eb5f65bc0e1235898eefebb0d0410867270065aa745d21456f1212b916e732b3f5dada18b03e526e02d09a09f445531798219006e
+DIST abseil_py-acec853355ef987eae48a8d87a79351c15dff593.tar.gz 175877 BLAKE2B f3c9b36101321f1e72c4eb2cbf11b42e36dc95bb1682b124b77652d2a2bee912459fa92f40718c80aa22f18611c77d13ad08e2888b20ae8895c115191e2b7397 SHA512 154056acee09b8c193d0bc8c64dd98bab87bfd779b04f81b1da7ace3004fcdf780f3ed0066ca3204850c2b80a6b1185e5e435ed852b73af85a6d899addc1c8bc
+DIST astor-0.6.2.tar.gz 29494 BLAKE2B aec99ed7702da3125f7a8666b0e432ca7f32511451b0922a7c7b2239414674be205f555ba4d1672f3d44f9140c0690d17e0374d339b2bbcd40737d69d748e95a SHA512 a6df0e65f429025caa0fbdd95f119fff94867709c10ade99fdc681a9886e916b67411384bf6ca37ceea478c65add5dc0a74585e17aafc706c8f0363e3c8585a4
+DIST aws_sdk_cpp-1.3.15.tar.gz 14181795 BLAKE2B 8e6d407876c4d68b73e22a21c3863efe1155231835be8edb4d7c0f1cceca1880ba1c6791bc3fda8226a22a201515cd44dbe7020883f21cdbbeb3559c8c733a0e SHA512 844addabf01bdbba2c50f94303f23fd092ac5593c42c782aad5959d5edaadb0bec8a6408a91f4605cef996f0d5a23fd94ca3c194829c65db98291d5fa7150bff
+DIST backports.weakref-1.0rc1.tar.gz 7761 BLAKE2B 4cb2554a4b71bb1f8c41a790268511e4b382effc7e0328f74346d086de539a177111de9e2dabac19a44b2a1cdbf59a7425e30eee4caa4bfe66b0ca97f1f460a9 SHA512 f37e9eb0d9060d2e1588a941f623460bd4477d7e180b38b5cd46d9c1db1ee094ae63e4f5eeeb422823bf3d067f46c4124cb124a9e4ddb795bc0bfbc4802ab826
+DIST boringssl-a0fb951d2a26a8ee746b52f3ba81ab011a0af778.tar.gz 22702000 BLAKE2B d54e52832ea2655590ee6d3c9063f684cd1ac1efacc6e6c60fe3177f799eaae6cf3d6fbb1a616e98514dd0bdc84ee35731bd9e285b5cd7a91a19b9493f694582 SHA512 879a48626fb58263d117f8a8b1c5b69fa99e1f06e71d5321620b16c107011c1f22d3e3443b5ad6a908ca139fcc55bdfc36fb80e884fe4490fc4dd982b668f128
+DIST cub-1.8.0.zip 602396 BLAKE2B a5e302a52e04f85ae8e1836c59e799532a8b961a8d10c08fe1241c9045f88e31f1ebda6d26124b85c6df40968e1c7b3985a39961bf7614535aafcab2da1a576a SHA512 6167c5be94989f88e05a07508cf69cf2c6b22a5ac733804043daa46bd86a44a15a758b1ffb811bab28b82039d027516ed85b3d9f7677a740a7e00ec9c2f81aed
+DIST curl-7.49.1.tar.gz 8885826 BLAKE2B 89bcc9f775bd26ac2f7f38097c8e506a5098f22264aab1d0db9f474bd1161d434264faaf4829882cb9df8817e680d314fb2e1288fcaba3df73b6d569eba2eefe SHA512 eb7cf0d34130b7085f342d2fd44457479e6e9d55e9fc4c46b6c5631d8c792eb376275501a89867b64ef1134084ffc7cd6e91f732a2265c331dc1d405dd65d1a3
+DIST cython-3732784c45cfb040a5b0936951d196f83a12ea17.tar.gz 1796107 BLAKE2B 65cd3ec2e83cfdaec2998091eed6506071a8b28a1bf41d9f59ed8ab05a0559355e831d1c6b550aa3fcc65959e29f6c531c30bf6869a5fd968a351d3f4f8eeef8 SHA512 556377644ebe111a36061768560a06d70484749cc78be0b53a9ad4dd9d40fb7c3aac4ad09af1cf7a5e8274e7289ac540f58c3026522ff5e251ddddaf840ef955
+DIST eigen-6913f0cf7d06.tar.gz 2296773 BLAKE2B f3d4ed1577abc7f722fb600e79bcb1294ae5d6a4499668df05a8b9014bfafb576e6d15d3e311080e6e6ed3afd00e60ccd0c1092161a218d200a32668bef83ea2 SHA512 e1cbd55edfc128ee5c2d0bc08a7fec051efb5713f78e2d323ce49074bf1b86d63e7fcc06c01e469c01d2476dd369e4159ecb306f6d28371a3274402d0ea25e87
+DIST farmhash-816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz 467122 BLAKE2B 8b9dd426f4b9f732df6c8c09d868d1b1cc006c395b1525c46ea91c75318b723358c8e64bb0d86a73aace2032eded93f0d80cc7c2c77fddd6a39e3402ab4f2cb7 SHA512 7f5110514a8cdc7ce48d33fd94ad67d96a24e42e11b203e4d0986f4190545f051b2a63f8e09f2ac38c3aa4a5c62d9a0e02cd8ce02045037381fb62a99f0dcd00
+DIST fft.tgz 72213 BLAKE2B 4a3ac2b4c0bc3275b5743df59241e1cdbd0200371c153ddf54ef6c7c4ec523ee6560547e2d5ef9f3200037c0635bf41c18991ac35f271b1e600d0dbd65d1a9a7 SHA512 f1ceac00cb7b9eb8f625eee7f1f5eea8af363343589a344226628d68baf668c176e6c23b7f904c4e682330352eaa0cd5d00731340d208e94c9657b8f85ae2240
+DIST flatbuffers-971a68110e4fc1bace10fcb6deeb189e7e1a34ce.tar.gz 613854 BLAKE2B 982142b7dd81791f221d7f3cbbecf6539549c86c436e0cf3ae0c57bd7535b90083c7d2709abc811abcf3b6fee417a16b1d8dcdedcce58fd8715db7ae785a7bff SHA512 01ffc047483edaaccc13bf256d59eef0c4cb7488618f1e908c74e0dcc599f00856d052d209a079d35e385bef973a4c6daf401107c4be85bba46dcc3b4f453b26
+DIST gast-0.2.0.tar.gz 9400 BLAKE2B 1392b9ef3a007d89b6b7af5ca49f3dcaa0689e166845ea25c2e544578f65915114d763b54503825dc2b6958a71ac284ec7ae2cc2cfa861494da28df786d679b4 SHA512 651719c3035d21e02e39cd83fd54212a12c39addf69f7c9e8810ccb7bb9aae7828e176ad0adf55182f0628f18d76cb1e286e498a9665ddb12e91a51dc2303381
+DIST gemmlowp-7c7c744640ddc3d0af18fb245b4d23228813a71b.zip 903072 BLAKE2B 26e49a36f7af265ba4fd720864fd148055e9491d0c0100988b474c41920a0b9d698c634a59280f458941a21af15017966bbb2f65e3b399bbcbf836e1232b9d7e SHA512 b754e9b4fb28884e5fbca56bf0fd59d8bbfa3e01900bf6860a2ee24047b21c71cd076ac27d5cc5b3f44c325fb6fb516529dfdcf720fecdb27e7fef38a4f6da13
+DIST giflib-5.1.4.tar.gz 738552 BLAKE2B 414cfdb488a12bcebc6e6e1db9face0e69430e5af94929e7935dc38ff2355182e223b5d87aef53d405f5f79867b4bc1e756f84134d60a01bcb8b5bf5b6859fa1 SHA512 d9a98a593bcfbbfb2fcbeef1382ca9669a6b85276512e6828c92869d16c7cfe980bbb318766fc176be3c9f7deff7878d2be8aeda1d40af2cc4ac723fe6121b83
+DIST grpc-bd6bdf93279a39a8cd92978fd7c9d14eccd98fc2.tar.gz 13478349 BLAKE2B 81f6722c893332c6be7875f9bd4f8311eca989c6dcaf87e47de038abe43b4d8eef5aaa0326a15a7c4f5c7a922e85bc006ace244ef4004ed78bf91645711adc12 SHA512 9268fc28bc128d2ad944fff4d9e1764a5cf0ab7c4d3f693607f42413cccdb766ec349b8f2e487bef823ac65007da9b9e3fdf91a7f623634616d91a68477b2951
+DIST highwayhash-dfcb97ca4fe9277bf9dc1802dd979b071896453b.tar.gz 121307 BLAKE2B 73402228c12dd0044960db0a2366d63dc6aaa3b8b093bfed7a1f32dfe063499913094beb4d93d67e1926b6854625bafc2f3e279e84e01220b279a3afd1cc3300 SHA512 235ede2ca52e22aa335e31969d2318fd0e413f07492d599bfc0a605ad53090731fe1285be177e2c66b6eb8379e98cbb8389f4d1c7b2bae20d3808bbcf5ecfb51
+DIST jemalloc-4.4.0.tar.gz 444180 BLAKE2B fde0ce34e56deab10e01387aeeb3ec1c5c01a21324c2144a3dfd5c96798aa38fdd4320a91a3b4cdd0ccc956adc107f8db893a1c129a83721ec19f014cea6e638 SHA512 77ee7554e8c4621d1c8ef65402213044718137c513c4c44249929f2df7e89029ea710dec3e67b9068feeb89a87634fa5c2093cd875b8aed98153c7fb5a9d999f
+DIST jsoncpp-11086dd6a7eba04289944367ca82cea71299ed70.tar.gz 164140 BLAKE2B 17a50cbbfa95c84b746a9168670ab755424a93d60b535414d4a744631cf012499b5b0c4b33198c3744210a62bbfe5c3269aee955eb1b055076c0df748a48cb90 SHA512 8b99c55fa76661d3c37b23b3a6035b3bf1f98ef6fe336536e49ac50a92563657066677e32c6cdffff6f04848e86417144236111ce2b37fd5a84ab24754380a18
+DIST libjpeg_turbo-1.5.1.tar.gz 1204374 BLAKE2B 22463c083f1255c059e6376ea104a9eb54a18aba6c66a563dcd1173eb2a271eb1d040eb21cd1d7623d04aa99a3b1eda36de4aed6502d6a8a2d5fba93b3773383 SHA512 5dc11da0d1008dc8e288e9e3242a68c2bc6700b0dcff818d3774815ca255441e8c60eb46df6934e578383b5530e9ebdfebad47c55137ca57a109e8d2ebc66c40
+DIST libpng-v1.6.34.tar.gz 1146972 BLAKE2B 5d9c1e38cf5170b8b86a9b8bde380e735cd765bbac339cbe17269a116d64fa9e9c3b99b04e483f725b6cb1fdf778128278f1670062ecaa2565c91db59d4d2b03 SHA512 23b6112a1d16a34c8037d5c5812944d4385fc96ed819a22172776bdd5acd3a34e55f073b46087b77d1c12cecc68f9e8ba7754c86b5ab6ed3016063e1c795de7a
+DIST librdkafka-v0.11.1.tar.gz 859238 BLAKE2B bc53f358320aa40d1acb209daa2594f18421bb6913bad7ba08a5612dfd6683e65489dc31ed67adc9df090d719ea6ab1031f46e524f055c61cab3f1f941a7163b SHA512 24aba6cfbd5df6a010a735fde455a9272c85b26055b172893b8e5259c2d6a7f2adc9637699f7f3b7270200a280cd95d52779a8f89fbb6af5fc035488ff54310e
+DIST libxsmm-1.8.1.tar.gz 893332 BLAKE2B b09879ef45a8d3007846361aaad8536dac526297583d29f28378a91c05fdd3a4c51e399d7d5b05dd4456268d5fd3e7014d889a41be61c1d99425dd7234b0dd6e SHA512 30388de1edf46ae40b2ccdf224bd9febd1ffbb91f8250c89c03044fe1ea75754ce5155107ec9d027fe2e08963f1ac9d2e526ea84618d2cf50c2d5dfe8a1e074d
+DIST llvm-7e78daafdd22f3f17720a103d29d89590534004e.tar.gz 39754833 BLAKE2B 30fe6c9267b89c9e0f046082af114c9eb9c32baeb13ab1f12b6c9c9ce7e8f83643635879fda4b3a82f5039b1aa6ff63f67546806cc7e6834e8e5399fa1d1f2d6 SHA512 b1ccaa3f39ad38946a2c177e08692719469b0747fbb63afa3054e161d24a61b5223a0c35eb0c5cc226d08416accda34035fa538803da320de205a4eb114b4f02
+DIST mkl_dnn-v0.12.tar.gz 759597 BLAKE2B ad790db940ca5353bc20db9e012356761e5a87d6646eeae983880881e1df271a0a4deb3b6810546fa8cf6f2c35c45509c57630cf8d493d72d557d33864f780f3 SHA512 e6a257679b872d16e320556ca2c1ddb5c04a949ee8b8d6b4de350c46ad4ea79749d5d9f92940c592706719490ad837210335027f782a8df46da1a2029ae5adcc
+DIST nasm-2.12.02.tar.bz2 961257 BLAKE2B f45c35571fa1254ccc01ed59de8a46cb480300404c701b444a7a751d077d23f64a7dbeeeb044d7daed8a6f895b1100f76f2db75ced6417ab56cb83b9494eece1 SHA512 7744a078647861382212de798d200b683cc4044881474fc1931acb14dfa0340ce026d1b3f64ac1ece87878ccd0ddcb69b8c0c850415313f47e01f0332e56a8f8
+DIST nsync-0559ce013feac8db639ee1bf776aca0325d28777.tar.gz 151680 BLAKE2B 280f8800e8674fbab90d15c09ab7e260b3230bfcf0fb44c998955c9bd4aaf07b4a9073a74479c8879811c56863d4c28693e408a4b205e5b5d9c801bb82159216 SHA512 ef61f9f0b12cf1252840966243ef4b4a0cc18afde7eddedb7e3f6ea31fa8a89da5570cfe6be536d721e4b7593249d05bb1c60372f6668635ad8bcde78bfc8dee
+DIST pcre-8.39.tar.gz 2062258 BLAKE2B 1bc2b7b822383ba67b3e9707178fd100a13370a3a4ce8e6527fe0356f7d3e604a9ece11cef5e9e85925fc309698887389e67759d820b8b7a99703cc1cd3ccc88 SHA512 1724b2d6d8575af19fc20a13e50d71cb8024a66458d63cbc006b5bca01230845730535f3446d3850ddd580c93031f38c3ebf547adce0d279dfd18101677403da
+DIST protobuf-396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz 4803167 BLAKE2B 466db7931c46df5f05018f4ebee0f1061a416b43486dce1fb4953a677f73138c74cbb97f333447862a571bcefe34dd0be3aac18e51b24f9921cb344e4e033af9 SHA512 5af4ebdd8a86a5e50c14c18590e372ea9454cadb101555e00008ebffe448acbaa8c57eeae857a53f20c64c0174ffe0a4d19ba393e2ca53beebad61d5b1db06c1
+DIST re2-26cd968b735e227361c9703683266f01e5df7857.tar.gz 387722 BLAKE2B 122b9f30ec2534877580227fadfce6da6db00e9a3ec29140082580d71e6c4c510d5b6b7400633987d9cb546f88d26726ea6cbc7944aa925272a6dfccfbf728c9 SHA512 cbc81a948c8150416ba437f9fd7248d4e15c03160635d41702c79b981f05092dc052c5c0ee89a9fb7e163dffe148585c652207d9707214488c30bfd3aaaec18d
+DIST six-1.10.0.tar.gz 29630 BLAKE2B 1f380dbc7a9e746b4a7909de54a58a008a73d7b6c582611b2481475d5d9971c936b1742ea0821c65150694914af72f43155caa54616268735a4bd2447d5b4ba4 SHA512 9a53b7bc8f7e8b358c930eaecf91cc5639176a699830153f586780c3e6d637f1bd31349a69c383574f99da19cb3a36524e7733a318f3572b27aefb69c6409c2e
+DIST snappy-1.1.7.tar.gz 1090550 BLAKE2B e389c96e093de5db92b896a7fa17a90d3ad0be07972e279321f24875f0f0c8c704ff478f4902a6356d458f93c249e3e06424d5a4efc9753a23ab12b7ee83a088 SHA512 32046f532606ba545a4e4825c0c66a19be449f2ca2ff760a6fa170a3603731479a7deadb683546e5f8b5033414c50f4a9a29f6d23b7a41f047e566e69eca7caf
+DIST sqlite-amalgamation-3200000.zip 2069628 BLAKE2B 97b641fdd143af8bd1f4b7b733f9823196d09ac1b1c1ea5b093da12592957b66d8be2450a7edf18c54ae83a03e09564d5c7f6b0cb8dd48d4fa8b4f2b153f62a7 SHA512 659b5fe93d526d6121f1530581d3fce5af90c986decf2fab7505fea14dc1ebc9167943261a433207fd70df0019bbcb4faeb5e49e586fc9ba6300439b6e00d1e8
+DIST swig-3.0.8.tar.gz 7937213 BLAKE2B 38f17631a36f178a478bf77f1a7ea77b50b91ed95ca0363f0f75d86bf7da6d855db314c1b7e67634b0e6e1438a0d141d0241595987142154ee356d60955248bc SHA512 85605bd98bf2b56f5bfca23ae23d76d764d76a174b05836c8686825e912d6326c370e9cf2134c0bf4f425560be103b16bf9c9d075077f52e713a69082616e906
+DIST tensorflow-1.8.0.tar.gz 22649439 BLAKE2B 7384c2cf742fb5a8b4e266e95080ae2513c1b112ab97f74839fa8e81bd91bd24645be8afb02e4447ad5fba9f47c4d146f59aa12085937cd3a364ec34c99590f3 SHA512 7280e65d26fb3f15d95f7217ee3bc08d1424cd144cf25bf638fa114fa835b2505dfaf457c55700067d24f485b77120973d094ec568e6d1b1054857402f9c352d
+DIST tensorflow-python-license.txt 45132 BLAKE2B 1f572a06eeb4a58a5563b87a2db381a6e9eb0195cf1d006bda0d3da158e62a1e67e889a7d3d0da83d8609c0d048887bcbbd0d7056fd8e4f56b654047f36936fa SHA512 1b8c2f9733fcf27d560879418c366b5c3e44420d42adb3b857ee741793ddc75ad18324b016909457e5311f2143593392ce4404d12962f076e62f6036afbb521e
+DIST termcolor-1.1.0.tar.gz 3912 BLAKE2B 8d661a708eff02894b6e390befddaef1c9d14f78f0c7d10ac332fa149f7892109f77bd279c9a488a3aa4070569c92f0ce847e3911d419ff549a10555b34534fb SHA512 4bd06bf4405a9ef6c005cd4d159ef602f7fc7fccb3e57586da1187c402f4d0b9051ef930cae423065c51ff4be8a22ceae556a61a6b3c8c519d623c066c340b53
+DIST zlib-1.2.11.tar.gz 607698 BLAKE2B 6bfc4bca5dcadba8a0d4121a2b3ed0bfe440c261003521862c8e6381f1a6f0a72d3fc037351d30afd7ef321e8e8d2ec817c046ac749f2ca0c97fbdc2f7e840b7 SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae
diff --git a/sci-libs/tensorflow/files/0001-pip_package-modularize-build-script-to-allow-distros.patch b/sci-libs/tensorflow/files/0001-pip_package-modularize-build-script-to-allow-distros.patch
new file mode 100644
index 000000000000..ae17b4f46955
--- /dev/null
+++ b/sci-libs/tensorflow/files/0001-pip_package-modularize-build-script-to-allow-distros.patch
@@ -0,0 +1,211 @@
+From 226dbf58ec54af0a44ec73b3a39ec5bee7cc8454 Mon Sep 17 00:00:00 2001
+From: Jason Zaman <jason@perfinion.com>
+Date: Tue, 1 May 2018 19:55:53 +0800
+Subject: [PATCH] pip_package: modularize build script to allow distros to
+ install more flexibly
+
+Gentoo Linux handles python modules slightly differently and packaging
+wheels is complicated. We prefer to run setup.py ourselves rather than
+build a wheel and then install from there.
+
+This modularizes build_pip_package.sh to allow running parts separately.
+using --src srcdir will prepare the package in a known dir so the distro
+package can take it from there. If only dstdir is given (either with
+--dst or as the only argument to preserve backwards compat) then
+behaviour is the same as before, the sources are prepared and the wheel
+is built and placed in dstdir.
+
+Signed-off-by: Jason Zaman <jason@perfinion.com>
+---
+ tensorflow/tools/pip_package/build_pip_package.sh | 141 ++++++++++++++++------
+ 1 file changed, 105 insertions(+), 36 deletions(-)
+
+diff --git a/tensorflow/tools/pip_package/build_pip_package.sh b/tensorflow/tools/pip_package/build_pip_package.sh
+index 3af79ee170..135846519c 100755
+--- a/tensorflow/tools/pip_package/build_pip_package.sh
++++ b/tensorflow/tools/pip_package/build_pip_package.sh
+@@ -41,42 +41,15 @@ function is_windows() {
+ fi
+ }
+
+-function main() {
++function prepare_src() {
+ if [ $# -lt 1 ] ; then
+ echo "No destination dir provided"
+ exit 1
+ fi
+
+- DEST=$(real_path $1)
+- TMPDIR=$(mktemp -d -t tmp.XXXXXXXXXX)
+-
+- PKG_NAME_FLAG=""
+- GPU_BUILD=0
+- NIGHTLY_BUILD=0
+- while true; do
+- if [[ "$1" == "--nightly_flag" ]]; then
+- NIGHTLY_BUILD=1
+- elif [[ "$1" == "--gpu" ]]; then
+- GPU_BUILD=1
+- elif [[ "$1" == "--gpudirect" ]]; then
+- PKG_NAME_FLAG="--project_name tensorflow_gpudirect"
+- fi
+- shift
+-
+- if [[ -z "$1" ]]; then
+- break
+- fi
+- done
+-
+- if [[ ${NIGHTLY_BUILD} == "1" && ${GPU_BUILD} == "1" ]]; then
+- PKG_NAME_FLAG="--project_name tf_nightly_gpu"
+- elif [[ ${NIGHTLY_BUILD} == "1" ]]; then
+- PKG_NAME_FLAG="--project_name tf_nightly"
+- elif [[ ${GPU_BUILD} == "1" ]]; then
+- PKG_NAME_FLAG="--project_name tensorflow_gpu"
+- fi
+-
+- echo $(date) : "=== Using tmpdir: ${TMPDIR}"
++ TMPDIR="$1"
++ mkdir -p "$TMPDIR"
++ echo $(date) : "=== Preparing sources in dir: ${TMPDIR}"
+
+ if [ ! -d bazel-bin/tensorflow ]; then
+ echo "Could not find bazel-bin. Did you run from the root of the build tree?"
+@@ -148,17 +121,28 @@ function main() {
+ # over so user defined ops can be compiled.
+ mkdir -p ${TMPDIR}/google
+ mkdir -p ${TMPDIR}/third_party
+- pushd ${RUNFILES%org_tensorflow}
++ pushd ${RUNFILES%org_tensorflow} > /dev/null
+ for header in $(find protobuf_archive -name \*.h); do
+ mkdir -p "${TMPDIR}/google/$(dirname ${header})"
+ cp "$header" "${TMPDIR}/google/$(dirname ${header})/"
+ done
+- popd
++ popd > /dev/null
+ cp -R $RUNFILES/third_party/eigen3 ${TMPDIR}/third_party
+
+ cp tensorflow/tools/pip_package/MANIFEST.in ${TMPDIR}
+ cp tensorflow/tools/pip_package/README ${TMPDIR}
+ cp tensorflow/tools/pip_package/setup.py ${TMPDIR}
++}
++
++function build_wheel() {
++ if [ $# -lt 2 ] ; then
++ echo "No src and dest dir provided"
++ exit 1
++ fi
++
++ TMPDIR="$1"
++ DEST="$2"
++ PKG_NAME_FLAG="$3"
+
+ # Before we leave the top-level directory, make sure we know how to
+ # call python.
+@@ -166,15 +150,100 @@ function main() {
+ source tools/python_bin_path.sh
+ fi
+
+- pushd ${TMPDIR}
++ pushd ${TMPDIR} > /dev/null
+ rm -f MANIFEST
+ echo $(date) : "=== Building wheel"
+ "${PYTHON_BIN_PATH:-python}" setup.py bdist_wheel ${PKG_NAME_FLAG} >/dev/null
+ mkdir -p ${DEST}
+ cp dist/* ${DEST}
+- popd
+- rm -rf ${TMPDIR}
++ popd > /dev/null
+ echo $(date) : "=== Output wheel file is in: ${DEST}"
+ }
+
++function usage() {
++ echo "Usage:"
++ echo "$0 [--src srcdir] [--dst dstdir] [options]"
++ echo "$0 dstdir [options]"
++ echo ""
++ echo " --src prepare sources in srcdir"
++ echo " will use temporary dir if not specified"
++ echo ""
++ echo " --dst build wheel in dstdir"
++ echo " if dstdir is not set do not build, only prepare sources"
++ echo ""
++ echo " Options:"
++ echo " --gpu build tensorflow_gpu"
++ echo " --gpudirect build tensorflow_gpudirect"
++ echo " --nightly_flag build tensorflow nightly"
++ echo ""
++ exit 1
++}
++
++function main() {
++ PKG_NAME_FLAG=""
++ GPU_BUILD=0
++ NIGHTLY_BUILD=0
++ SRCDIR=""
++ DSTDIR=""
++ CLEANSRC=1
++ while true; do
++ if [[ "$1" == "--help" ]]; then
++ usage
++ exit 1
++ elif [[ "$1" == "--nightly_flag" ]]; then
++ NIGHTLY_BUILD=1
++ elif [[ "$1" == "--gpu" ]]; then
++ GPU_BUILD=1
++ elif [[ "$1" == "--gpudirect" ]]; then
++ PKG_NAME_FLAG="--project_name tensorflow_gpudirect"
++ elif [[ "$1" == "--src" ]]; then
++ shift
++ SRCDIR="$(real_path $1)"
++ CLEANSRC=0
++ elif [[ "$1" == "--dst" ]]; then
++ shift
++ DSTDIR="$(real_path $1)"
++ else
++ DSTDIR="$(real_path $1)"
++ fi
++ shift
++
++ if [[ -z "$1" ]]; then
++ break
++ fi
++ done
++
++ if [[ -z "$DSTDIR" ]] && [[ -z "$SRCDIR" ]]; then
++ echo "No destination dir provided"
++ usage
++ exit 1
++ fi
++
++ if [[ -z "$SRCDIR" ]]; then
++ # make temp srcdir if none set
++ SRCDIR="$(mktemp -d -t tmp.XXXXXXXXXX)"
++ fi
++
++ prepare_src "$SRCDIR"
++
++ if [[ -z "$DSTDIR" ]]; then
++ # only want to prepare sources
++ exit
++ fi
++
++ if [[ ${NIGHTLY_BUILD} == "1" && ${GPU_BUILD} == "1" ]]; then
++ PKG_NAME_FLAG="--project_name tf_nightly_gpu"
++ elif [[ ${NIGHTLY_BUILD} == "1" ]]; then
++ PKG_NAME_FLAG="--project_name tf_nightly"
++ elif [[ ${GPU_BUILD} == "1" ]]; then
++ PKG_NAME_FLAG="--project_name tensorflow_gpu"
++ fi
++
++ build_wheel "$SRCDIR" "$DSTDIR" "$PKG_NAME_FLAG"
++
++ if [[ $CLEANSRC -ne 0 ]]; then
++ rm -rf ${TMPDIR}
++ fi
++}
++
+ main "$@"
+--
+2.16.1
+
diff --git a/sci-libs/tensorflow/metadata.xml b/sci-libs/tensorflow/metadata.xml
new file mode 100644
index 000000000000..e7cdd82763cc
--- /dev/null
+++ b/sci-libs/tensorflow/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>perfinion@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ An open source machine learning framework for everyone
+ </longdescription>
+ <use>
+ <flag name="cuda">Enable support for nVidia CUDA</flag>
+ <flag name="mpi">Enable support for MPI</flag>
+ <flag name="jemalloc">Enable support for <pkg>dev-libs/jemalloc</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-libs/tensorflow/tensorflow-1.8.0.ebuild b/sci-libs/tensorflow/tensorflow-1.8.0.ebuild
new file mode 100644
index 000000000000..ae227d94b3f4
--- /dev/null
+++ b/sci-libs/tensorflow/tensorflow-1.8.0.ebuild
@@ -0,0 +1,302 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{5,6} )
+MY_PV=${PV/_rc/-rc}
+MY_P=${PN}-${MY_PV}
+
+inherit distutils-r1 multiprocessing toolchain-funcs
+
+DESCRIPTION="Computation framework using data flow graphs for scalable machine learning"
+HOMEPAGE="https://www.tensorflow.org/"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="cuda jemalloc mpi"
+CPU_USE_FLAGS_X86="sse sse2 sse3 sse4_1 sse4_2 avx avx2 fma3 fma4"
+for i in $CPU_USE_FLAGS_X86; do
+ IUSE+=" cpu_flags_x86_$i"
+done
+
+# distfiles that bazel uses for the workspace, will be copied to basel-distdir
+bazel_external_uris="https://github.com/abseil/abseil-py/archive/acec853355ef987eae48a8d87a79351c15dff593.tar.gz -> abseil_py-acec853355ef987eae48a8d87a79351c15dff593.tar.gz
+ http://ftp.exim.org/pub/pcre/pcre-8.39.tar.gz
+ http://pilotfiber.dl.sourceforge.net/project/giflib/giflib-5.1.4.tar.gz
+ http://pkgs.fedoraproject.org/repo/pkgs/nasm/nasm-2.12.02.tar.bz2/d15843c3fb7db39af80571ee27ec6fad/nasm-2.12.02.tar.bz2
+ http://ufpr.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz
+ http://www.kurims.kyoto-u.ac.jp/~ooura/fft.tgz
+ http://www.sqlite.org/2017/sqlite-amalgamation-3200000.zip
+ https://bitbucket.org/eigen/eigen/get/6913f0cf7d06.tar.gz -> eigen-6913f0cf7d06.tar.gz
+ https://curl.haxx.se/download/curl-7.49.1.tar.gz
+ https://github.com/LMDB/lmdb/archive/LMDB_0.9.19.tar.gz
+ https://github.com/NVlabs/cub/archive/1.8.0.zip -> cub-1.8.0.zip
+ https://github.com/abseil/abseil-cpp/archive/720c017e30339fd1786ce4aac68bc8559736e53f.tar.gz -> abseil_cpp-720c017e30339fd1786ce4aac68bc8559736e53f.tar.gz
+ https://github.com/aws/aws-sdk-cpp/archive/1.3.15.tar.gz -> aws_sdk_cpp-1.3.15.tar.gz
+ https://github.com/bazelbuild/rules_closure/archive/08039ba8ca59f64248bb3b6ae016460fe9c9914f.tar.gz
+ https://github.com/cython/cython/archive/3732784c45cfb040a5b0936951d196f83a12ea17.tar.gz -> cython-3732784c45cfb040a5b0936951d196f83a12ea17.tar.gz
+ https://github.com/edenhill/librdkafka/archive/v0.11.1.tar.gz -> librdkafka-v0.11.1.tar.gz
+ https://github.com/glennrp/libpng/archive/v1.6.34.tar.gz -> libpng-v1.6.34.tar.gz
+ https://github.com/google/boringssl/archive/a0fb951d2a26a8ee746b52f3ba81ab011a0af778.tar.gz -> boringssl-a0fb951d2a26a8ee746b52f3ba81ab011a0af778.tar.gz
+ https://github.com/google/farmhash/archive/816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz -> farmhash-816a4ae622e964763ca0862d9dbd19324a1eaf45.tar.gz
+ https://github.com/google/flatbuffers/archive/971a68110e4fc1bace10fcb6deeb189e7e1a34ce.tar.gz -> flatbuffers-971a68110e4fc1bace10fcb6deeb189e7e1a34ce.tar.gz
+ https://github.com/google/gemmlowp/archive/7c7c744640ddc3d0af18fb245b4d23228813a71b.zip -> gemmlowp-7c7c744640ddc3d0af18fb245b4d23228813a71b.zip
+ https://github.com/google/highwayhash/archive/dfcb97ca4fe9277bf9dc1802dd979b071896453b.tar.gz -> highwayhash-dfcb97ca4fe9277bf9dc1802dd979b071896453b.tar.gz
+ https://github.com/google/nsync/archive/0559ce013feac8db639ee1bf776aca0325d28777.tar.gz -> nsync-0559ce013feac8db639ee1bf776aca0325d28777.tar.gz
+ https://github.com/google/protobuf/archive/396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz -> protobuf-396336eb961b75f03b25824fe86cf6490fb75e3a.tar.gz
+ https://github.com/google/re2/archive/26cd968b735e227361c9703683266f01e5df7857.tar.gz -> re2-26cd968b735e227361c9703683266f01e5df7857.tar.gz
+ https://github.com/google/snappy/archive/1.1.7.tar.gz -> snappy-1.1.7.tar.gz
+ https://github.com/grpc/grpc/archive/bd6bdf93279a39a8cd92978fd7c9d14eccd98fc2.tar.gz -> grpc-bd6bdf93279a39a8cd92978fd7c9d14eccd98fc2.tar.gz
+ https://github.com/hfp/libxsmm/archive/1.8.1.tar.gz -> libxsmm-1.8.1.tar.gz
+ https://github.com/intel/ARM_NEON_2_x86_SSE/archive/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz -> ARM_NEON_2_x86_SSE-0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz
+ https://github.com/intel/mkl-dnn/archive/v0.12.tar.gz -> mkl_dnn-v0.12.tar.gz
+ https://github.com/jemalloc/jemalloc/archive/4.4.0.tar.gz -> jemalloc-4.4.0.tar.gz
+ https://github.com/libjpeg-turbo/libjpeg-turbo/archive/1.5.1.tar.gz -> libjpeg_turbo-1.5.1.tar.gz
+ https://github.com/llvm-mirror/llvm/archive/7e78daafdd22f3f17720a103d29d89590534004e.tar.gz -> llvm-7e78daafdd22f3f17720a103d29d89590534004e.tar.gz
+ https://github.com/open-source-parsers/jsoncpp/archive/11086dd6a7eba04289944367ca82cea71299ed70.tar.gz -> jsoncpp-11086dd6a7eba04289944367ca82cea71299ed70.tar.gz
+ https://mirror.bazel.build/docs.python.org/2.7/_sources/license.txt -> tensorflow-python-license.txt
+ https://pypi.python.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz
+ https://pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
+ https://pypi.python.org/packages/bc/cc/3cdb0a02e7e96f6c70bd971bc8a90b8463fda83e264fa9c5c1c98ceabd81/backports.weakref-1.0rc1.tar.gz
+ https://pypi.python.org/packages/d8/be/c4276b3199ec3feee2a88bc64810fbea8f26d961e0a4cd9c68387a9f35de/astor-0.6.2.tar.gz
+ https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz
+ https://zlib.net/zlib-1.2.11.tar.gz
+"
+
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz
+ ${bazel_external_uris}"
+
+RDEPEND="
+ app-arch/snappy
+ dev-db/lmdb
+ dev-db/sqlite
+ dev-libs/libpcre
+ dev-libs/protobuf
+ dev-libs/protobuf-c
+ dev-libs/re2
+ dev-python/absl-py[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/protobuf-python[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/termcolor[${PYTHON_USEDEP}]
+ media-libs/giflib
+ media-libs/libpng:0
+ net-libs/grpc[${PYTHON_USEDEP}]
+ net-misc/curl
+ sys-libs/zlib
+ virtual/jpeg:0
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-8.0.61[profiler] >=dev-libs/cudnn-6.0 )
+ jemalloc? ( >=dev-libs/jemalloc-4.4.0 )
+ mpi? ( virtual/mpi )"
+DEPEND="${RDEPEND}
+ >=dev-util/bazel-0.13.0
+ dev-java/java-config
+ dev-lang/nasm
+ dev-lang/swig"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( AUTHORS CONTRIBUTING.md ISSUE_TEMPLATE.md README.md RELEASE.md )
+PATCHES=(
+ "${FILESDIR}/0001-pip_package-modularize-build-script-to-allow-distros.patch"
+)
+
+setup_bazelrc() {
+ if [[ -f "${T}/bazelrc" ]]; then
+ return
+ fi
+
+ # F: fopen_wr
+ # P: /proc/self/setgroups
+ # Even with standalone enabled, the Bazel sandbox binary is run for feature test:
+ # https://github.com/bazelbuild/bazel/blob/7b091c1397a82258e26ab5336df6c8dae1d97384/src/main/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedSpawnRunner.java#L61
+ # https://github.com/bazelbuild/bazel/blob/76555482873ffcf1d32fb40106f89231b37f850a/src/main/tools/linux-sandbox-pid1.cc#L113
+ addpredict /proc
+
+ echo "startup --batch" > "${T}/bazelrc" || die
+
+ # make bazel respect $MAKEOPTS
+ echo "build --jobs=$(makeopts_jobs)" >> "${T}/bazelrc" || die
+
+ # Use standalone strategy to deactivate the bazel sandbox, since it
+ # conflicts with FEATURES=sandbox.
+ echo "build --verbose_failures --spawn_strategy=standalone --genrule_strategy=standalone" >> "${T}/bazelrc" || die
+ echo "build --noshow_loading_progress" >> "${T}/bazelrc" || die
+ echo "test --verbose_failures --spawn_strategy=standalone --genrule_strategy=standalone" >> "${T}/bazelrc" || die
+ echo "test --verbose_test_summary --noshow_loading_progress" >> "${T}/bazelrc" || die
+
+ # make bazel only fetch distfiles from the cache
+ mkdir -p "${T}/bazel-cache" || die
+ mkdir -p "${T}/bazel-distdir" || die
+ echo "fetch --repository_cache=${T}/bazel-cache/ --experimental_distdir=${T}/bazel-distdir/" >> "${T}/bazelrc" || die
+ echo "build --repository_cache=${T}/bazel-cache/ --experimental_distdir=${T}/bazel-distdir/" >> "${T}/bazelrc" || die
+}
+
+bazel_multibuild_wrapper() {
+ BAZEL_OUTPUT_BASE="${WORKDIR}/bazel-base-${MULTIBUILD_VARIANT}"
+ mkdir -p "${BAZEL_OUTPUT_BASE}" || die
+
+ run_in_build_dir $@
+}
+
+ebazel() {
+ setup_bazelrc
+
+ echo Running: bazel --bazelrc="${T}/bazelrc" --output_base="${BAZEL_OUTPUT_BASE}" "$@"
+ bazel --bazelrc="${T}/bazelrc" --output_base="${BAZEL_OUTPUT_BASE}" $@ || die
+}
+
+load_distfiles() {
+ # populate the bazel distdir to fetch from since it cannot use the network
+ local s d uri rename
+
+ while read uri rename d; do
+ [[ -z "$uri" ]] && continue
+ if [[ "$rename" == "->" ]]; then
+ s="${uri##*/}"
+ einfo "Copying $d to bazel distdir $s ..."
+ else
+ s="${uri##*/}"
+ d="${s}"
+ einfo "Copying $d to bazel distdir ..."
+ fi
+ cp "${DISTDIR}/${d}" "${T}/bazel-distdir/${s}" || die
+ done <<< "${bazel_external_uris}"
+}
+
+pkg_setup() {
+ export JAVA_HOME=$(java-config --jre-home)
+}
+
+src_unpack() {
+ # only unpack the main distfile
+ unpack "${P}.tar.gz"
+}
+
+src_prepare() {
+ BAZEL_OUTPUT_BASE="${WORKDIR}/bazel-base"
+ mkdir -p "${BAZEL_OUTPUT_BASE}" || die
+ setup_bazelrc
+ load_distfiles
+
+ default
+ python_copy_sources
+}
+
+src_configure() {
+ do_configure() {
+ local cc_opt_flags=( ${CFLAGS} )
+
+ # Keep this list in sync with tensorflow/core/platform/cpu_feature_guard.cc.
+ for i in sse sse2 sse3 sse4_1 sse4_2 avx avx2 fma4; do
+ use cpu_flags_x86_${i} && cc_opt_flags+=( -m${i/_/.} )
+ done
+ use cpu_flags_x86_fma3 && cc_opt_flags+=( -mfma )
+
+ python_export PYTHON_SITEDIR
+ export CC_OPT_FLAGS="${cc_opt_flags[*]}"
+ export GCC_HOST_COMPILER_PATH=$(tc-getCC)
+ export TF_NEED_JEMALLOC=$(usex jemalloc 1 0)
+ export TF_NEED_GCP=0
+ export TF_NEED_HDFS=0
+ export TF_NEED_S3=0
+ export TF_NEED_KAFKA=0
+ export TF_ENABLE_XLA=0
+ export TF_NEED_GDR=0
+ export TF_NEED_VERBS=0
+ export TF_NEED_OPENCL_SYCL=0
+ export TF_NEED_OPENCL=0
+ export TF_NEED_COMPUTECPP=0
+ export TF_NEED_MKL=0
+ export TF_NEED_MPI=$(usex mpi 1 0)
+ export TF_DOWNLOAD_CLANG=0
+ export TF_NEED_CUDA=$(usex cuda 1 0)
+ export TF_SET_ANDROID_WORKSPACE=0
+ export PYTHON_BIN_PATH="${PYTHON}"
+ export PYTHON_LIB_PATH="${PYTHON_SITEDIR}"
+
+ # this is not autoconf
+ ./configure || die
+ }
+ python_foreach_impl bazel_multibuild_wrapper do_configure
+}
+
+src_compile() {
+ python_setup
+ local MULTIBUILD_VARIANT="${EPYTHON/./_}"
+ cd "${S}-${MULTIBUILD_VARIANT}" || die
+ BAZEL_OUTPUT_BASE="${WORKDIR}/bazel-base-${MULTIBUILD_VARIANT}"
+
+ ebazel build \
+ --config=opt $(usex cuda --config=cuda '') \
+ //tensorflow:libtensorflow_framework.so \
+ //tensorflow:libtensorflow.so \
+ //tensorflow:libtensorflow_cc.so
+
+ do_compile() {
+ cd "${S}-${MULTIBUILD_VARIANT}" || die
+ ebazel build \
+ --config=opt $(usex cuda --config=cuda '') \
+ //tensorflow/tools/pip_package:build_pip_package
+ }
+ python_foreach_impl bazel_multibuild_wrapper do_compile
+}
+
+src_install() {
+ do_install() {
+ einfo "Installing ${EPYTHON} files"
+ local srcdir="${T}/src-${EPYTHON/./_}"
+ mkdir -p "${srcdir}" || die
+ bazel-bin/tensorflow/tools/pip_package/build_pip_package --src "${srcdir}" || die
+ cd "${srcdir}" || die
+ esetup.py install
+
+ # it installs site-packages/external but shouldnt
+ python_export PYTHON_SITEDIR
+ rm -rf "${D}/${PYTHON_SITEDIR}/external" || die
+ sed -i '/^external/d' "${D}/${PYTHON_SITEDIR}"/${P}-*.egg-info/{SOURCES,top_level}.txt || die
+
+ # symlink to the main .so file
+ rm -rf "${D}/${PYTHON_SITEDIR}/${PN}/lib${PN}_framework.so" || die
+ dosym "../../../lib${PN}_framework.so" "${PYTHON_SITEDIR}/${PN}/lib${PN}_framework.so" || die
+
+ python_optimize
+ }
+ python_foreach_impl bazel_multibuild_wrapper do_install
+
+ # symlink to python-exec scripts
+ for i in "${D}"/usr/lib/python-exec/*/*; do
+ n="${i##*/}"
+ [[ -e "${D}/usr/bin/${n}" ]] || dosym ../lib/python-exec/python-exec2 "/usr/bin/$n"
+ done
+
+ python_setup
+ local MULTIBUILD_VARIANT="${EPYTHON/./_}"
+ cd "${S}-${MULTIBUILD_VARIANT}" || die
+ BAZEL_OUTPUT_BASE="${WORKDIR}/bazel-base-${MULTIBUILD_VARIANT}"
+
+ einfo "Installing headers"
+ # install c c++ and core header files
+ for i in $(find ${PN}/{c,cc,core} -name "*.h"); do
+ insinto /usr/include/${PN}/${i%/*}
+ doins ${i}
+ done
+
+ # eigen headers
+ insinto /usr/include/${PN}/third_party/eigen3/Eigen/
+ doins third_party/eigen3/Eigen/*
+
+ einfo "Installing libs"
+ # generate pkg-config file
+ ${PN}/c/generate-pc.sh --prefix=/usr --version=${MY_PV} || die
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+
+ dolib.so bazel-bin/tensorflow/lib${PN}_framework.so
+ dolib.so bazel-bin/tensorflow/lib${PN}.so
+ dolib.so bazel-bin/tensorflow/lib${PN}_cc.so
+
+ einstalldocs
+}