Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
language: python
python:
- "2.7"
- "3.5"
- 2.7
- 3.5

before_install:
- sudo apt-get install -y python-setuptools
- npm install -g typescript
- tsc --module amd --noImplicitAny --outdir datalab/notebook/static datalab/notebook/static/*.ts
- pip install -U pip
- pip install -U setuptools
- pip install .

script: python ./tests/main.py
Expand Down
26 changes: 26 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
# To publish to PyPi use: python setup.py bdist_wheel upload -r pypi

import datetime
import sys
from setuptools import setup

if sys.version_info[0] == 2:
import platform
import pip

minor = datetime.datetime.now().strftime("%y%m%d%H%M")
version = '0.1.' + minor

Expand Down Expand Up @@ -104,3 +109,24 @@
]
}
)

# for python2 only, install tensorflow and cloudml
if sys.version_info[0] == 2:
tensorflow_path = None
if platform.system() == 'Darwin':
tensorflow_path = 'https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0-py2-none-any.whl'
elif platform.system() == 'Linux':
if platform.linux_distribution()[0] == 'Ubuntu':
tensorflow_path = 'https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl'
elif platform.linux_distribution()[0] == 'Debian':
tensorflow_path = 'https://storage.googleapis.com/tensorflow/linux/cpu/debian/jessie/tensorflow-0.11.0-cp27-none-linux_x86_64.whl'

# install tensorflow
if not tensorflow_path:
print("""Warning: could not find tensorflow build for your OS.
Please go to https://www.tensorflow.org/get_started/os_setup to see install options""")
else:
pip.main(['install', tensorflow_path])

# install cloud ml sdk
pip.main(['install', 'https://storage.googleapis.com/cloud-ml/sdk/cloudml.latest.tar.gz'])