Skip to content

Commit

Permalink
Fix AttributeError
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosal1015 authored and luispedro committed Nov 17, 2023
1 parent 5606411 commit 9cbd952
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process:
__builtins__.__NUMPY_SETUP__ = False
try:
__builtins__.__NUMPY_SETUP__ = False
except AttributeError:
print("Cannot set '__builtins__.__NUMPY_SETUP__ = False' This is not needed if numpy is already installed.")
import numpy
self.include_dirs.append(numpy.get_include())

Expand Down

0 comments on commit 9cbd952

Please sign in to comment.