From 83be228e832e807600e796983b947ea79bea4244 Mon Sep 17 00:00:00 2001 From: Chris Livingston Date: Fri, 24 Nov 2017 10:32:26 -0800 Subject: [PATCH] Add tensorflow dependency example to superhello; this puts ./pants binary on main:main in a good state for a workable demo --- 3rdparty/python/requirements.txt | 1 + .../example/python_distribution/hello/superhello/BUILD | 5 ++++- .../hello/superhello/hello_package/hello.py | 2 ++ .../hello/superhello/superhello.egg-info/PKG-INFO | 10 ---------- .../hello/superhello/superhello.egg-info/SOURCES.txt | 8 -------- .../superhello.egg-info/dependency_links.txt | 1 - .../hello/superhello/superhello.egg-info/top_level.txt | 2 -- 7 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/PKG-INFO delete mode 100644 examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/SOURCES.txt delete mode 100644 examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/dependency_links.txt delete mode 100644 examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/top_level.txt diff --git a/3rdparty/python/requirements.txt b/3rdparty/python/requirements.txt index 398de840718..d82b272f0ec 100644 --- a/3rdparty/python/requirements.txt +++ b/3rdparty/python/requirements.txt @@ -30,4 +30,5 @@ setuptools==30.0.0 subprocess32==3.2.7 six>=1.9.0,<2 thrift>=0.9.1 +tensorflow==1.4.0 wheel==0.29.0 diff --git a/examples/src/python/example/python_distribution/hello/superhello/BUILD b/examples/src/python/example/python_distribution/hello/superhello/BUILD index 9eb88ddb6d8..2b5626548c3 100644 --- a/examples/src/python/example/python_distribution/hello/superhello/BUILD +++ b/examples/src/python/example/python_distribution/hello/superhello/BUILD @@ -7,5 +7,8 @@ # only be a single BUILD file in a given directory. python_distribution( - name='superhello' + name='superhello', + dependencies=[ + '3rdparty/python:tensorflow' + ] ) diff --git a/examples/src/python/example/python_distribution/hello/superhello/hello_package/hello.py b/examples/src/python/example/python_distribution/hello/superhello/hello_package/hello.py index fa29f9a2bbd..b32263f4cd1 100644 --- a/examples/src/python/example/python_distribution/hello/superhello/hello_package/hello.py +++ b/examples/src/python/example/python_distribution/hello/superhello/hello_package/hello.py @@ -6,6 +6,8 @@ unicode_literals, with_statement) import super_greet +import tensorflow def hello(): + print(tensorflow) print(super_greet.super_greet()) diff --git a/examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/PKG-INFO b/examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/PKG-INFO deleted file mode 100644 index 3911d84fc93..00000000000 --- a/examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/PKG-INFO +++ /dev/null @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: superhello -Version: 1.0.0 -Summary: UNKNOWN -Home-page: UNKNOWN -Author: UNKNOWN -Author-email: UNKNOWN -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN diff --git a/examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/SOURCES.txt b/examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/SOURCES.txt deleted file mode 100644 index 00a25e3645f..00000000000 --- a/examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/SOURCES.txt +++ /dev/null @@ -1,8 +0,0 @@ -setup.py -c/super_greet.c -hello_package/__init__.py -hello_package/hello.py -superhello.egg-info/PKG-INFO -superhello.egg-info/SOURCES.txt -superhello.egg-info/dependency_links.txt -superhello.egg-info/top_level.txt \ No newline at end of file diff --git a/examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/dependency_links.txt b/examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/dependency_links.txt deleted file mode 100644 index 8b137891791..00000000000 --- a/examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/top_level.txt b/examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/top_level.txt deleted file mode 100644 index 3a468845dc1..00000000000 --- a/examples/src/python/example/python_distribution/hello/superhello/superhello.egg-info/top_level.txt +++ /dev/null @@ -1,2 +0,0 @@ -hello_package -super_greet