Skip to content

Commit 7d653be

Browse files
Merge pull request #1 from IntelPython/update/2.0
bumping version to 2.0.0 to avoid package version clashes
2 parents 9f23c92 + 878a33b commit 7d653be

File tree

15 files changed

+604
-226
lines changed

15 files changed

+604
-226
lines changed

.travis.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
matrix:
2+
include:
3+
- name: "Linux-Py2"
4+
os: linux
5+
dist: xenial
6+
env:
7+
- MINICONDA=Miniconda2-latest-Linux-x86_64.sh
8+
- PYVER="--python=27"
9+
- name: "Linux-Py3"
10+
os: linux
11+
dist: xenial
12+
env:
13+
- MINICONDA=Miniconda3-latest-Linux-x86_64.sh
14+
- PYVER=""
15+
- name: "OsX-Py2"
16+
os: osx
17+
osx_image: xcode8
18+
env:
19+
- MATRIX_EVAL="brew install gcc && CC=gcc-7 && CXX=g++-7"
20+
- MINICONDA=Miniconda3-latest-MacOSX-x86_64.sh
21+
- MACOSX_DEPLOYMENT_TARGET="10.9"
22+
- PYVER="--python=27"
23+
- name: "OsX-Py3"
24+
os: osx
25+
osx_image: xcode8
26+
env:
27+
- MATRIX_EVAL="brew install gcc && CC=gcc-7 && CXX=g++-7"
28+
- MINICONDA=Miniconda3-latest-MacOSX-x86_64.sh
29+
- MACOSX_DEPLOYMENT_TARGET="10.9"
30+
- PYVER=""
31+
32+
install:
33+
- wget https://repo.continuum.io/miniconda/$MINICONDA -O miniconda.sh;
34+
- bash miniconda.sh -b -p $HOME/miniconda
35+
- export PATH="$HOME/miniconda/bin:$PATH"
36+
- hash -r
37+
- conda config --set always_yes yes --set changeps1 no
38+
- conda update -q conda
39+
- conda install conda-build
40+
# Useful for debugging any issues with conda
41+
- conda info -a
42+
- gcc -v
43+
- g++ -v
44+
45+
script:
46+
- conda build -c defaults -c intel $PYVER conda-recipe

CHANGES.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ mkl-service changelog
77
=====
88

99
Initial release of `mkl-service` package.
10+
11+
2.0.0
12+
====
13+
14+
Rerelease of `mkl-service` package with version bumped to 2.0.0 to avoid version clash with `mkl-service` package from Anaconda.

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2018, Intel Corporation
1+
Copyright (c) 2018-2019, Intel Corporation
22

33
Redistribution and use in source and binary forms, with or without
44
modification, are permitted provided that the following conditions are met:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ A short example, illustrating it use:
1111
```python
1212
import tomopy
1313
import mkl
14-
mkl.domain_set_num_threads(1, domain='fft') # Intel (R) MKL FFT functions to run sequentially
14+
mkl.domain_set_num_threads(1, domain='fft') # Intel(R) MKL FFT functions to run sequentially
1515
```

conda-recipe/bld.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@rem Remember to activate Intel Compiler, or remoe these two lines to ise Microsoft Visual Studio compiler
2+
3+
%PYTHON% setup.py build --force install --old-and-unmanageable
4+
if errorlevel 1 exit 1

conda-recipe/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash -x
2+
3+
# make sure that compiler has been sourced, if necessary
4+
5+
CFLAGS="-I${PREFIX}/include ${CFLAGS}" $PYTHON setup.py build --force install --old-and-unmanageable

conda-recipe/meta.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{% set version = "2.0.0" %}
2+
{% set buildnumber = 0 %}
3+
4+
package:
5+
name: mkl-service
6+
version: {{ version }}
7+
8+
source:
9+
path: ..
10+
11+
build:
12+
number: {{ buildnumber }}
13+
14+
requirements:
15+
build:
16+
- {{ compiler('c') }}
17+
host:
18+
- python
19+
- setuptools
20+
- mkl-devel
21+
- cython
22+
- numpy 1.11.*
23+
- six
24+
run:
25+
- python
26+
- mkl
27+
- six
28+
- {{ pin_compatible('numpy') }}
29+
30+
test:
31+
commands:
32+
- nosetests -v mkl
33+
requires:
34+
- nose
35+
imports:
36+
- mkl
37+
38+
about:
39+
home: http://github.com/IntelPython/mkl-service
40+
license: BSD 3-Clause
41+
license_file: LICENSE.txt
42+
description:
43+
Intel(R) Math Kernel Library (Intel(R) MKL) support functions are
44+
subdivided into the following groups according to their purpose, such as
45+
Version Information
46+
Threading Control
47+
Timing
48+
Memory Management
49+
Conditional Numerical Reproducibility Control
50+
Miscellaneous
51+
summary: Python hooks for Intel(R) Math Kernel Library runtime control settings.
52+
53+
extra:
54+
recipe-maintainers:
55+
- oleksandr-pavlyk
56+
- dmitrii-zagornyi

mkl-service/examples/example.py renamed to examples/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, Intel Corporation
1+
# Copyright (c) 2018-2019, Intel Corporation
22
#
33
# Redistribution and use in source and binary forms, with or without
44
# modification, are permitted provided that the following conditions are met:

mkl-service/__init__.py renamed to mkl/__init__.py

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, Intel Corporation
1+
# Copyright (c) 2018-2019, Intel Corporation
22
#
33
# Redistribution and use in source and binary forms, with or without
44
# modification, are permitted provided that the following conditions are met:
@@ -23,8 +23,35 @@
2323
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2424
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525

26+
import sys
27+
28+
class RTLD_for_MKL():
29+
def __init__(self):
30+
self.saved_rtld = None
31+
32+
def __enter__(self):
33+
import ctypes
34+
try:
35+
self.saved_rtld = sys.getdlopenflags()
36+
# python loads libraries with RTLD_LOCAL, but MKL requires RTLD_GLOBAL
37+
# pre-load MKL with RTLD_GLOBAL before loading the native extension
38+
sys.setdlopenflags(self.saved_rtld | ctypes.RTLD_GLOBAL)
39+
except AttributeError:
40+
pass
41+
del ctypes
42+
43+
def __exit__(self, *args):
44+
if self.saved_rtld:
45+
sys.setdlopenflags(self.saved_rtld)
46+
self.saved_rtld = None
47+
48+
with RTLD_for_MKL():
49+
from . import _mklinit
50+
51+
del RTLD_for_MKL
52+
del sys
2653

2754
from ._py_mkl_service import *
2855

2956

30-
__version__ = '1.0.0'
57+
__version__ = '2.0.0'

mkl-service/_mkl_service.pxd renamed to mkl/_mkl_service.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, Intel Corporation
1+
# Copyright (c) 2018-2019, Intel Corporation
22
#
33
# Redistribution and use in source and binary forms, with or without
44
# modification, are permitted provided that the following conditions are met:

0 commit comments

Comments
 (0)