Skip to content

Commit 90f4586

Browse files
updated conda-recipe/meta.yaml
Travis: no longer build Py2 add NumPy >= 1.16 to setup.py remove pinning of version in host part made changes for local conda-build to run added blas=*=mkl try to work around inexplicable build failure of MacOSX due to failure of numpy to import
1 parent 56831fa commit 90f4586

File tree

7 files changed

+19
-44
lines changed

7 files changed

+19
-44
lines changed

.travis.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
11
matrix:
22
include:
3-
- name: "Linux-Py2"
4-
os: linux
5-
env:
6-
- MINICONDA=Miniconda2-latest-Linux-x86_64.sh
7-
- PYVER="--python=27"
83
- name: "Linux-Py3"
94
os: linux
105
env:
116
- MINICONDA=Miniconda3-latest-Linux-x86_64.sh
127
- PYVER=""
13-
- name: "OsX-Py2"
14-
os: osx
15-
osx_image: xcode8
16-
env:
17-
- MATRIX_EVAL="brew install gcc && CC=gcc-7 && CXX=g++-7"
18-
- MINICONDA=Miniconda3-latest-MacOSX-x86_64.sh
19-
- MACOSX_DEPLOYMENT_TARGET="10.9"
20-
- PYVER="--python=27"
218
- name: "OsX-Py3"
229
os: osx
2310
osx_image: xcode8
@@ -41,4 +28,4 @@ install:
4128
- g++ -v
4229

4330
script:
44-
- conda build -c intel -c conda-forge $PYVER conda-recipe
31+
- conda build -c intel -c conda-forge --override-channels --numpy=1.17 $PYVER conda-recipe

conda-recipe/bld.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@rem Remember to activate Intel Compiler, or remoe these two lines to ise Microsoft Visual Studio compiler
22

3+
set MKLROOT=%PREFIX%
34
%PYTHON% setup.py build --force install --old-and-unmanageable
45
if errorlevel 1 exit 1

conda-recipe/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ if [ `uname` == Darwin ]; then
66
export MACOSX_DEPLOYMENT_TARGET=10.9
77
fi
88

9-
CFLAGS="-I$PREFIX/include $CFLAGS" $PYTHON setup.py build --force install --old-and-unmanageable
9+
MKLROOT=$PREFIX CFLAGS="-I$PREFIX/include $CFLAGS" $PYTHON setup.py build --force install --old-and-unmanageable

conda-recipe/meta.yaml

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{% set version = "1.1.0" %}
22
{% set buildnumber = 0 %}
33

4-
54
package:
65
name: mkl_fft
76
version: {{ version }}
@@ -10,42 +9,25 @@ source:
109
path: ../
1110

1211
build:
13-
number: {{buildnumber}}
14-
features:
15-
- intel
16-
always_include_files:
17-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/__init__.py
18-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/_float16_utils.py
19-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/_pydfti.*
20-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/_numpy_fft.py
21-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/_scipy_fft.py
22-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/_scipy_fft_backend.py
23-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/setup.py
24-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/tests/test_fft1d.py
25-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/__init__.pyc [py27]
26-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/_float16_utils.pyc [py27]
27-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/_numpy_fft.pyc [py27]
28-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/_scipy_fft.pyc [py27]
29-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/setup.pyc [py27]
30-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/tests/test_fft1d.pyc [py27]
31-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/__pycache__/* [py3k]
32-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/tests/__pycache__/* [py3k]
33-
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_fft/
12+
number: {{ buildnumber }}
13+
ignore_run_exports:
14+
- blas
3415

3516
requirements:
3617
build:
18+
- {{ compiler('c') }}
19+
host:
3720
- python
3821
- setuptools
39-
- intelpython
4022
- mkl-devel
4123
- cython
42-
- numpy x.x
24+
- blas=*=mkl
25+
- numpy-base
4326
run:
4427
- python
4528
- mkl
4629
- mkl-service
47-
- intelpython
48-
- numpy x.x
30+
- {{ pin_compatible('numpy') }}
4931

5032
test:
5133
commands:

mkl_fft/_pydfti.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ cdef extern from "src/mklfft.h":
133133
char * mkl_dfti_error(int)
134134

135135
# Initialize numpy
136-
cnp.import_array()
136+
cdef int numpy_import_status = cnp.import_array()
137+
if numpy_import_status < 0:
138+
raise ImportError("Failed to import NumPy as dependency of mkl_fft")
137139

138140

139141
cdef int _datacopied(cnp.ndarray arr, object orig):

mkl_fft/setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ def configuration(parent_package='',top_path=None):
4242
'libraries': ['mkl_rt']
4343
}
4444
else:
45-
mkl_info = get_info('mkl')
45+
try:
46+
mkl_info = get_info('mkl')
47+
except:
48+
mrl_info = dict()
4649

4750
mkl_include_dirs = mkl_info.get('include_dirs', [])
4851
mkl_library_dirs = mkl_info.get('library_dirs', [])

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def setup_package():
8686
platforms = ["Windows", "Linux", "Mac OS-X"],
8787
test_suite = 'nose.collector',
8888
python_requires = '>=3.5',
89-
install_requires = ['numpy'],
89+
install_requires = ['numpy >=1.16'],
9090
configuration = configuration
9191
)
9292
setup(**metadata)

0 commit comments

Comments
 (0)