Permalink
Browse files

Make sure not to import numba before building it

  • Loading branch information...
1 parent b755a5f commit 48e73c14bd19beda7bb7eb78c0fb51cbb8997dc8 @markflorisson markflorisson committed Apr 8, 2013
Showing with 9 additions and 7 deletions.
  1. +9 −7 setup.py
View
16 setup.py
@@ -90,19 +90,21 @@ def register_pyextensibletype():
import shutil
root = os.path.dirname(os.path.abspath(__file__))
- numba_root = os.path.join(root, "numba")
- pyext_root = os.path.join(root, 'deps', 'pyextensibletype')
- pyext_dst = os.path.join(numba_root, "pyextensibletype")
+ deps_root = os.path.join(root, 'deps')
+ pyext_root = os.path.join(deps_root, 'pyextensibletype')
+ pyext_dst = os.path.join("root", "numba", "pyextensibletype")
if os.path.exists(pyext_dst):
shutil.rmtree(pyext_dst)
- shutil.copytree(pyext_root, pyext_dst)
-
- with open(os.path.join(pyext_dst, '__init__.py'), 'w'):
+ with open(os.path.join(deps_root, '__init__.py'), 'w'):
+ pass
+ with open(os.path.join(pyext_root, '__init__.py'), 'w'):
pass
- from numba.pyextensibletype import setupconfig
+ shutil.copytree(pyext_root, pyext_dst)
+
+ from deps.pyextensibletype import setupconfig
exts = setupconfig.get_extensions(pyext_dst, "numba.pyextensibletype")
return exts

0 comments on commit 48e73c1

Please sign in to comment.