Skip to content

Commit edc1e45

Browse files
Oleksandr Pavlykoleksandr-pavlyk
authored andcommitted
include Python.h in mkl_distributions.cpp to fix build break in conda-forge on Azure cloud, update copyright headers, adding .travis.yml
updated to conda-build 3
1 parent 127177c commit edc1e45

16 files changed

+74
-40
lines changed

.travis.yml

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

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017, Intel Corporation
1+
Copyright (c) 2017-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:

conda-recipe/bld.bat

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
@rem Remember to source Intel (R) Compiler
1+
@rem Remember to source the compiler
22

3-
set CC=icl
4-
set LD=xilink
5-
6-
%PYTHON% setup.py config --compiler=intelemw install --old-and-unmanageable
3+
%PYTHON% setup.py install --old-and-unmanageable
74
if errorlevel 1 exit 1

conda-recipe/build.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
#!/bin/bash -x
22

3-
if [ `uname` == Darwin ]; then
4-
export MACOSX_DEPLOYMENT_TARGET=10.10
5-
fi
6-
73
export CFLAGS="-I$PREFIX/include $CFLAGS"
8-
export CC=icc
9-
export LDSHARED="icc -shared"
10-
11-
$PYTHON setup.py config --compiler=intelem --fcompiler=intelem build install --old-and-unmanageable
4+
$PYTHON setup.py install --old-and-unmanageable

conda-recipe/meta.yaml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{% set version = "1.0.0" %}
2-
{% set buildnumber = 5 %}
1+
{% set version = "1.0.2" %}
2+
{% set buildnumber = 0 %}
33

44
### If you change the iccver here, you must also set the path correctly in build.sh / bld.bat!!!
55
{% set iccver = "16.0.3" %} [unix or py3k]
@@ -10,13 +10,11 @@ package:
1010
version: {{ version }}
1111

1212
source:
13-
git_url: http://github.com/IntelPython/mkl_random
14-
git_branch: v{{version}}
13+
path: ..
1514

1615
build:
1716
number: {{buildnumber}}
18-
features:
19-
- intel
17+
skip: True # [win and py27]
2018
always_include_files:
2119
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_random/__init__.py
2220
- {{ SP_DIR.replace('\\', '/') if win else SP_DIR }}/mkl_random/mklrand.*
@@ -28,31 +26,32 @@ build:
2826

2927
requirements:
3028
build:
29+
- {{ compiler('c') }}
30+
- {{ compiler('cxx') }}
31+
host:
3132
- python
3233
- setuptools
33-
- intelpython
34-
- mkl-devel [not nomkl]
35-
- icc_rt {{iccver}}
34+
- mkl-devel
3635
- cython
37-
- numpy x.x
36+
- numpy
3837
run:
3938
- python
40-
- mkl [not nomkl]
41-
- icc_rt >={{iccver}}
42-
- intelpython
43-
- numpy x.x
39+
- mkl
40+
- {{ pin_compatible('numpy') }}
4441

4542
test:
4643
commands:
4744
- nosetests -v mkl_random
4845
requires:
4946
- nose
47+
- numpy >=1.14
5048
imports:
5149
- mkl_random
5250
- mkl_random.mklrand
5351

5452
about:
5553
home: http://github.com/IntelPython/mkl_random
56-
license: BSD
54+
license: BSD-3-Clause
55+
license_family: BSD
5756
license_file: LICENSE.txt
5857
summary: NumPy-based implementation of random number generation sampling using Intel (R) Math Kernel Library, mirroring numpy.random, but exposing all choices of sampling algorithms available in MKL.

mkl_random/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright (c) 2017, Intel Corporation
2+
# Copyright (c) 2017-2019, Intel Corporation
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are met:

mkl_random/mklrand.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright (c) 2017, Intel Corporation
2+
# Copyright (c) 2017-2019, Intel Corporation
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are met:

mkl_random/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright (c) 2017, Intel Corporation
2+
# Copyright (c) 2017-2019, Intel Corporation
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions are met:

mkl_random/src/mkl_distributions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2017, Intel Corporation
2+
Copyright (c) 2017-2019, Intel Corporation
33
44
Redistribution and use in source and binary forms, with or without
55
modification, are permitted provided that the following conditions are met:
@@ -35,6 +35,7 @@
3535
#include "mkl.h"
3636
#include "mkl_vml.h"
3737
#include "mkl_distributions.h"
38+
#include "Python.h"
3839
#include "numpy/npy_common.h" /* npy_intp */
3940

4041
#define MKL_INT_MAX ((npy_intp) (~((MKL_UINT) 0) >> 1))

mkl_random/src/mkl_distributions.h

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

0 commit comments

Comments
 (0)