As @sygi says in his comment, the way to restrict requirements to specific platforms or Python versions is described in https://stackoverflow.com/a/35614580/1951176. For our TensorFlow example, it would read
# Linux, Python 3.5
https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp35-cp35m-linux_x86_64.whl; sys_platform == 'linux' and python_version == '3.5'
# Linux, Python 3.4
https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp34-cp34m-linux_x86_64.whl; sys_platform == 'linux' and python_version == '3.4'
# Linux, Python 2.7
https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl; sys_platform == 'linux' and python_version == '2.7'
# Mac, Python 3.4 or 3.5
https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0-py3-none-any.whl; sys_platform == 'darwin' and ( python_version == '3.4' or python_version == '3.5' )
# Mac, Python 2.7
https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0-py2-none-any.whl; sys_platform == 'darwin' and python_version == '2.7'
Finnally, as I just found out, in the specific case with TensorFlow, it works to specify just
tensorflow
in requirements.txt
(as with other requirements).