Skip to content

Commit

Permalink
Defer numpy import on first pass of setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Misha Salim committed Apr 8, 2022
1 parent 2791e23 commit 7473d5b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
import platform
import sys

import numpy
try:
import numpy
except:
from unittest.mock import MagicMock
sys.modules["numpy"] = MagicMock()
import numpy

from setuptools import Extension, setup
from setuptools.command.test import test as TestCommand
import versioneer
Expand Down

0 comments on commit 7473d5b

Please sign in to comment.