Skip to content

Commit

Permalink
Merge pull request #115 from repagh/run-tests-on-conda-build
Browse files Browse the repository at this point in the history
Run tests on conda build
  • Loading branch information
roryyorke authored May 10, 2020
2 parents 0cf9820 + ee46807 commit 63b1674
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 13 deletions.
12 changes: 11 additions & 1 deletion conda-recipe-apple/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
cd $RECIPE_DIR/..

# ensure we are not building with old cmake files
rm -rf _skbuild
rm -rf _cmake_test_compile

export LDFLAGS="$LDFLAGS -v"
if [[ "$target_platform" == osx-64 ]]; then
export LDFLAGS="${LDFLAGS} -isysroot ${CONDA_BUILD_SYSROOT}"
export CFLAGS="${CFLAGS} -isysroot ${CONDA_BUILD_SYSROOT}"
fi
$PYTHON setup.py build_ext install -- -DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT}

$PYTHON setup.py build_ext install -- \
-DNumPy_INCLUDE_DIR=${SP_DIR}/numpy/core/include \
-DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT} \
-DBLA_VENDOR=Apple
9 changes: 8 additions & 1 deletion conda-recipe-apple/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@ source:

build:
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
string: py{{ environ.get('PY_VER').replace('.', '') }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_mkl_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
string: py{{ environ.get('PY_VER').replace('.', '') }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_apple_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('fortran') }} # [unix]
- flang # [win]
- cmake

host:
- numpy
- python
- python
# conda-forge::scikit-build>=0.10.0 includes MACOSX_DEPLOYMENT_TARGET
# patches from https://github.com/scikit-build/scikit-build/pull/441
- scikit-build >=0.10.0
Expand All @@ -27,8 +29,13 @@ requirements:
- {{ pin_compatible('numpy') }}

test:
requires:
- pytest
- scipy
imports:
- slycot
commands:
- pytest --pyargs slycot

about:
home: https://github.com/python-control/Slycot
Expand Down
8 changes: 4 additions & 4 deletions conda-recipe-mkl/build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cd $RECIPE_DIR/..

# specify blas vendor should be MKL
export BLA_VENDOR=Intel10_64lp

# ensure we are not building with old cmake files
rm -rf _skbuild
rm -rf _cmake_test_compile

# do the build
$PYTHON -m pip install . --no-deps --ignore-installed -vv
$PYTHON setup.py build_ext -lmkl install -- \
-DNumPy_INCLUDE_DIR=${SP_DIR}/numpy/core/include \
-DBLA_VENDOR=Intel10_64lp
8 changes: 7 additions & 1 deletion conda-recipe-mkl/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,28 @@ requirements:
- {{ compiler('c') }}
- {{ compiler('fortran') }} # [unix]
- flang # [win]
- cmake
- numpy

host:
- numpy
- mkl
- python
- scikit-build
- pip

run:
- python {{ PY_VER }}
- {{ pin_compatible('numpy') }}
- mkl

test:
requires:
- pytest
- scipy
imports:
- slycot
commands:
- pytest --pyargs slycot

about:
home: https://github.com/python-control/Slycot
Expand Down
8 changes: 4 additions & 4 deletions conda-recipe-openblas/build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
cd $RECIPE_DIR/..

# specify blas vendor should be OpenBLAS
export BLA_VENDOR=OpenBLAS

# ensure we are not building with old cmake files
rm -rf _skbuild
rm -rf _cmake_test_compile

# do the build
$PYTHON -m pip install . --no-deps --ignore-installed -vv
$PYTHON setup.py build_ext install -- \
-DNumPy_INCLUDE_DIR=${SP_DIR}/numpy/core/include \
-DBLA_VENDOR=OpenBLAS

10 changes: 8 additions & 2 deletions conda-recipe-openblas/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,28 @@ requirements:
- {{ compiler('c') }}
- {{ compiler('fortran') }} # [unix]
- flang # [win]
- cmake

host:
- numpy
- libopenblas
- openblas
- python
- scikit-build
- pip

run:
- python {{ PY_VER }}
- {{ pin_compatible('numpy') }}
- libopenblas

test:
requires:
- pytest
- scipy
imports:
- slycot
commands:
- pytest --pyargs slycot

about:
home: https://github.com/python-control/Slycot
Expand Down

0 comments on commit 63b1674

Please sign in to comment.