Skip to content

Commit

Permalink
Disable autodetection on python2
Browse files Browse the repository at this point in the history
  • Loading branch information
rtburns-jpl committed Sep 14, 2020
1 parent bb1994f commit b23e8f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ confinst = Configure(env)
if confinst.CheckCHeader("numpy/arrayobject.h"):
print("Numpy header found.")
else:
print("Numpy not found. Attempting to autodetect...")
print("Numpy not found.")

if sys.version_info.major == 2:
raise RuntimeError("Cannot autodetect numpy from python2")

print("Attempting to autodetect...")
try:
import numpy
confinst.env["CPPPATH"].append(numpy.get_include())
Expand Down

0 comments on commit b23e8f5

Please sign in to comment.