Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebuild with more OSX flags for osx-arm64 (M1) #32

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
c_compiler:
- gcc
c_compiler_version:
- '10'
- '11'
cdt_name:
- cos6
channel_sources:
Expand All @@ -11,7 +11,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '10'
- '11'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
numpy:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/linux_aarch64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BUILD:
c_compiler:
- gcc
c_compiler_version:
- '10'
- '11'
cdt_arch:
- aarch64
cdt_name:
Expand All @@ -15,7 +15,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '10'
- '11'
docker_image:
- quay.io/condaforge/linux-anvil-aarch64
numpy:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/linux_ppc64le_.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
c_compiler:
- gcc
c_compiler_version:
- '10'
- '11'
cdt_name:
- cos7
channel_sources:
Expand All @@ -11,7 +11,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '10'
- '11'
docker_image:
- quay.io/condaforge/linux-anvil-ppc64le
numpy:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions recipe/build_zfp.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#!/usr/bin/env bash
set -e
OSX_ARCHITECTURES=""
if [[ "${target_platform}" == "osx-arm64" ]]; then
OSX_ARCHITECTURES="-DCMAKE_OSX_ARCHITECTURES=arm64"
elif [[ "${target_platform}" == "osx-64" ]]; then
OSX_ARCHITECTURES="-DCMAKE_OSX_ARCHITECTURES=x86_64"
fi

mkdir build
cd build
cmake ${CMAKE_ARGS} \
${OSX_ARCHITECTURES} \
-DBUILD_CFP=ON \
-DBUILD_UTILITIES=ON \
-DZFP_WITH_OPENMP=ON \
Expand Down
18 changes: 10 additions & 8 deletions recipe/build_zfpy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@ set -ex
# but since the build is identical, conda will not find the newly compiled
# libraries, and just keep using the old ons

# patch for cross-builds from @erykoff
if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
# workaround until cross-python is fixed
rm $BUILD_PREFIX/bin/python
ln -sf $PREFIX/bin/python $BUILD_PREFIX/bin/python
rm $BUILD_PREFIX/bin/cython
ln -sf $PREFIX/bin/cython $BUILD_PREFIX/bin/cython
EXTRA_ARGS=
if [[ "${target_platform}" == "osx-arm64" ]]; then
EXTRA_ARGS="${EXTRA_ARGS} -DCMAKE_OSX_ARCHITECTURES=arm64"
elif [[ "${target_platform}" == "osx-64" ]]; then
EXTRA_ARGS="${EXTRA_ARGS} -DCMAKE_OSX_ARCHITECTURES=x86_64"
fi


if [[ "$CONDA_BUILD_CROSS_COMPILATION" == "1" ]]; then
EXTRA_ARGS="${EXTRA_ARGS} -DCYTHON_EXECUTABLE=${BUILD_PREFIX}/bin/cython"
fi
rm -rf build
mkdir build
cd build

cmake ${CMAKE_ARGS} \
${EXTRA_ARGS} \
-DBUILD_CFP=ON \
-DBUILD_UTILITIES=ON \
-DBUILD_ZFPY=ON \
Expand All @@ -35,4 +38,3 @@ cmake ${CMAKE_ARGS} \

make -j${CPU_COUNT}
make install

2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source:
- 100-update-cmake.patch

build:
number: 3
number: 4
script: source ${RECIPE_DIR}/build_zfp.sh # [unix]
script: {{ RECIPE_DIR }}\bld_zfp.bat # [win]
run_exports:
Expand Down