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 May 22, 2023
1 parent 6a761c4 commit 00c8ec5
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 @@ -3,7 +3,13 @@
from distutils import sysconfig
import platform

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

from setuptools import Extension, setup
import versioneer

Expand Down

0 comments on commit 00c8ec5

Please sign in to comment.