Build Ray with setup.py. (#14)

* Build Ray with setup.py.

* Building photon extensions with cmake.

* Fix formatting in photon_extension.c

* Pip install with sudo in Travis.

* Fix plasma __init__.py.

* Rename and remove some files.
This commit is contained in:
Robert Nishihara
2016-10-31 17:08:03 -07:00
committed by Philipp Moritz
parent 695f23b2e0
commit 47851eeccc
18 changed files with 291 additions and 175 deletions
View File
+1
View File
@@ -0,0 +1 @@
from libphoton import *
View File
+1
View File
@@ -0,0 +1 @@
from lib.python.plasma import *
View File
View File
+1 -1
View File
@@ -1,5 +1,5 @@
# Ray version string
__version__ = "0.1"
__version__ = "0.01"
import ctypes
# Windows only
+22 -14
View File
@@ -1,17 +1,25 @@
import sys
import subprocess
from setuptools import setup, Extension, find_packages
import setuptools
from setuptools import setup, find_packages
import setuptools.command.install as _install
# because of relative paths, this must be run from inside ray/lib/python/
class install(_install.install):
def run(self):
subprocess.check_call(["../../build.sh"])
# Calling _install.install.run(self) does not fetch required packages and
# instead performs an old-style install. See command/install.py in
# setuptools. So, calling do_egg_install() manually here.
self.do_egg_install()
setup(
name = "ray",
version = "0.1.dev0",
use_2to3=True,
packages=find_packages(),
package_data = {
"ray": ["libraylib.so", "scheduler", "objstore"]
},
zip_safe=False
)
setup(name="ray",
version="0.0.1",
packages=find_packages(),
package_data={"common": ["thirdparty/redis-3.2.3/src/redis-server"],
"plasma": ["build/plasma_store",
"build/plasma_manager",
"build/plasma_client.so"],
"photon": ["build/photon_scheduler",
"libphoton.so"]},
cmdclass={"install": install},
include_package_data=True,
zip_safe=False)