Skip to content

Commit

Permalink
CI: make floess_lib a dependency [wheel build]
Browse files Browse the repository at this point in the history
  • Loading branch information
has2k1 committed Jul 8, 2024
1 parent 8d9bf7c commit cfaff97
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ jobs:
# so easier to separate out here.
- [ubuntu-22.04, manylinux_x86_64, ""]
- [macos-13, macosx_x86_64, openblas]
- [macos-13, macosx_x86_64, accelerate]
- [macos-14, macosx_arm64, accelerate] # always use accelerate
- [windows-2019, win_amd64, ""]
# - [macos-13, macosx_x86_64, accelerate]
# - [macos-14, macosx_arm64, accelerate] # always use accelerate
# - [windows-2019, win_amd64, ""]

# python: ["cp310", "cp311", "cp312", "cp13"]
python: ["cp312"]
Expand Down Expand Up @@ -195,7 +195,11 @@ jobs:
run: |
pushd wheelhouse
unzip *.whl
nm -g skmisc/loess/*.so
otool -STMRIHGv skmisc/loess/*.a
echo '--------------------'
otool -STMRIHGv skmisc/loess/*.so
# nm -g skmisc/loess/*.a
# nm -g skmisc/loess/*.so
popd
- name: Check Package Version
Expand Down
3 changes: 2 additions & 1 deletion skmisc/loess/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ loess_cython_gen = generator(
###

#### Fortran Loess into a static library

floess_lib = static_library(
'floess',
sources: [
'src/loessf.f',
'src/linpack_lite.f'
],
dependencies: [blas_dep, lapack_dep],
fortran_args: [fortran_ignore_warnings],
dependencies: [blas_dep, lapack_dep],
)
###

Expand Down
17 changes: 16 additions & 1 deletion tools/wheels/cibw_test_command.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
set -xe

python -c "import sys; import skmisc; sys.exit(skmisc.test())"
if [[ $RUNNER_OS == "Windows" ]]; then
# GH 20391
PY_DIR=$(python -c "import sys; print(sys.prefix)")
mkdir $PY_DIR/libs
fi

if [[ $RUNNER_OS == "macOS" && $RUNNER_ARCH == "X64" ]]; then
# Not clear why this is needed but it seems on x86_64 this is not the default
# and without it f2py tests fail
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/usr/local/lib"
# Needed so gfortran (not clang) can find system libraries like libm (-lm)
# in f2py tests
export LIBRARY_PATH="$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
fi

# python -c "import sys; import skmisc; sys.exit(skmisc.test())"

0 comments on commit cfaff97

Please sign in to comment.