%global debug_package %{nil} Name: tensorflow Version: 1.4.1 Release: 1%{?dist} Summary: Computation using data flow graphs for scalable machine learning License: Apache License 2.0 URL: http://www.tensorflow.org/ Source: https://github.com/tensorflow/tensorflow/archive/v%{version}.tar.gz Patch0: change-env-python-to-env-python3.patch BuildRequires: bazel BuildRequires: python2-devel BuildRequires: python3-devel BuildRequires: python3-numpy BuildRequires: python3-wheel BuildRequires: gcc-c++ BuildRequires: zlib-devel BuildRequires: jemalloc-devel Requires: python3-protobuf Requires: python3-numpy %description TensorFlow is an open source software library for numerical computation using data flow graphs. The graph nodes represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) that flow between them. This flexible architecture lets you deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device without rewriting code. TensorFlow also includes TensorBoard, a data visualization toolkit. %prep %setup -q -n tensorflow-%{version} %patch0 -p1 %build export LANG=en_US.UTF-8 export PYTHON_BIN_PATH="/usr/bin/python3" export PYTHON_LIB_PATH="/usr/lib64/python3.6/site-packages" export TF_NEED_JEMALLOC="1" export TF_NEED_S3="0" export TF_NEED_GCP="0" export TF_NEED_OPENCL="0" export TF_ENABLE_XLA="0" export TF_NEED_GDR="0" export TF_NEED_VERBS="0" export TF_NEED_MPI="0" export TF_NEED_CUDA="0" export TF_NEED_HDFS="0" export CC_OPT_FLAGS="-march=native" ./configure bazel build --action_env PATH="$PATH" --verbose_failures //tensorflow/tools/pip_package:build_pip_package bash bazel-bin/tensorflow/tools/pip_package/build_pip_package tensorflow_pkg %check %install pip3 install -t %{buildroot}%{python3_sitelib} --no-dependencies tensorflow_pkg/*.whl rm -rf %{buildroot}%{python3_sitelib}/tensorflow-%{version}.dist-info rm -rf %{buildroot}%{python3_sitelib}/external %files %{python3_sitelib}/tensorflow %changelog * Sat Dec 30 2017 John Dulaney - 1.4.1-1 - Initial Packaging.