Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- pytest --pyargs slycot
- pytest

Should be taken care of by #110

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

I cannot use the "suggest change" feature for this one, but the _mkl_ infix needs to be changed here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test does not seem to run from the source folder, conda arranges for a temporary folder for the test. pytest needs the --pyargs slycot here. As I understand it from the documentation, this effectively loads and searches the newly built slycot as installed in the test environment and runs its tests.

This is also a nice way to ensure that an installed slycot is still intact.

Copy link
Member Author

@repagh repagh May 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I also implemented the _mkl_ -> _obl_ change

Just now saw your comment in work on readme.rst. I chose to now explicitly put openblas in there (my machine did that automatically?), and since there apparently also exists an optimized apple blas somewhere, I think we needs to reserve _apple_ for that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re pytest: Sounds fair.

Why back to openblas and not apple system provided? Could this be merged with the openblas recipe dir again?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I now got it to build & tests worked with Apple/Accelerate. Had to force the blas vendor for this with -DBLA_VENDOR=Apple.


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