diff options
author | Matthew Brett <matthew.brett@gmail.com> | 2016-02-11 13:24:41 -0800 |
---|---|---|
committer | Matthew Brett <matthew.brett@gmail.com> | 2016-03-07 15:17:21 -0800 |
commit | 9d6cdc1946073dd6fc5195a18f77785800d71db2 (patch) | |
tree | ee82f873ce96c2a6406150026b60b8972a787224 | |
parent | e4bc9f0885385cebcc41e7f59f09b5e5b79249fc (diff) | |
download | numpy-9d6cdc1946073dd6fc5195a18f77785800d71db2.tar.gz |
ENH: platform-specific install hook to change init
Give hook to allow platform-specific installs to modify the
initialization of numpy. Particular use-case is to allow check for SSE2
on Windows when shipping with ATLAS wheel.
-rw-r--r-- | numpy/__init__.py | 3 | ||||
-rw-r--r-- | numpy/_distributor_init.py | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py index 0fcd5097d..b05157c4a 100644 --- a/numpy/__init__.py +++ b/numpy/__init__.py @@ -190,6 +190,9 @@ else: test = testing.nosetester._numpy_tester().test bench = testing.nosetester._numpy_tester().bench + # Allow distributors to run custom init code + from . import _distributor_init + from . import core from .core import * from . import compat diff --git a/numpy/_distributor_init.py b/numpy/_distributor_init.py new file mode 100644 index 000000000..d893ba377 --- /dev/null +++ b/numpy/_distributor_init.py @@ -0,0 +1,10 @@ +""" Distributor init file + +Distributors: you can add custom code here to support particular distributions +of numpy. + +For example, this is a good place to put any checks for hardware requirements. + +The numpy standard source distribution will not put code in this file, so you +can safely replace this file with your own version. +""" |