Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for python 3 #10

Open
wants to merge 1 commit into
base: deploy
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion pywrapper/RangeLibc.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# cython: language_level=2

from libcpp cimport bool
from libcpp.string cimport string
from libcpp.vector cimport vector
Expand Down Expand Up @@ -349,4 +351,4 @@ cdef class PyNull:
cpdef void calc_range_many(self,np.ndarray[float, ndim=2, mode="c"] ins, np.ndarray[float, ndim=1, mode="c"] outs):
a = ins[0,0]
b = outs[0]
c = outs.shape[0]
c = outs.shape[0]
20 changes: 10 additions & 10 deletions pywrapper/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ def check_for_flag(flag_str, truemsg=False, falsemsg=False):
enabled = False

if enabled and not truemsg == False:
print truemsg
print(truemsg)
elif not enabled and not falsemsg == False:
print falsemsg
print " $ sudo "+flag_str+"=ON python setup.py install"
print(falsemsg)
print(" $ sudo "+flag_str+"=ON python setup.py install")
return enabled

use_cuda = check_for_flag("WITH_CUDA", \
"Compiling with CUDA support", \
"Compiling without CUDA support. To enable CUDA use:")
trace = check_for_flag("TRACE", \
"Compiling with trace enabled for Bresenham's Line", \
"Compiling without trace enabled for Bresenham's Line")
"Compiling without trace enabled for Bresenham's Line. To enable trace use:")

print
print "--------------"
print
print("")
print("--------------")
print("")

# support for compiling in clang
if platform.system().lower() == "darwin":
Expand All @@ -59,13 +59,13 @@ def locate_cuda():
Starts by looking for the CUDAHOME env variable. If not found, everything
is based on finding 'nvcc' in the PATH.
"""
# print os.environ
# print(os.environ)
# first check if the CUDAHOME env variable is in use
if os.path.isdir("/usr/local/cuda-7.5"):
home = "/usr/local/cuda-7.5"
home = "/usr/local/cuda-7.5"
nvcc = pjoin(home, 'bin', 'nvcc')
elif os.path.isdir("/usr/local/cuda"):
home = "/usr/local/cuda"
home = "/usr/local/cuda"
nvcc = pjoin(home, 'bin', 'nvcc')
elif 'CUDAHOME' in os.environ:
home = os.environ['CUDAHOME']
Expand Down