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 Sep 21, 2022
1 parent be9f2b2 commit f6a7d41
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: # noqa: E722
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 f6a7d41

Please sign in to comment.