Skip to content

Commit

Permalink
Merge pull request #581 from SimShady/properly-set-builtins-if-dict
Browse files Browse the repository at this point in the history
Handle non-uniform behaviour of __builtins__
  • Loading branch information
tbonald authored Aug 26, 2024
2 parents 2cb2798 + 5467ca9 commit f7507f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from sysconfig import get_platform
from distutils.command.build_ext import build_ext
import os
import builtins
from glob import glob

import numpy
Expand Down Expand Up @@ -55,7 +56,6 @@
EXTRA_COMPILE_ARGS = ['/d2FH4-']
EXTRA_LINK_ARGS = []


class BuildExtSubclass(build_ext):
def build_options(self):
for e in self.extensions:
Expand All @@ -74,7 +74,7 @@ def build_extensions(self):
def finalize_options(self):
build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process:
__builtins__.__NUMPY_SETUP__ = False
builtins.__NUMPY_SETUP__ = False
import numpy
self.include_dirs.append(numpy.get_include())

Expand Down

0 comments on commit f7507f3

Please sign in to comment.