Skip to content

Commit

Permalink
adapt recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
cbouss committed May 10, 2024
1 parent e5feb46 commit b5d7007
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 142 deletions.
1 change: 1 addition & 0 deletions .gitattributes

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

2 changes: 1 addition & 1 deletion .gitignore

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

3 changes: 3 additions & 0 deletions abs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
channels:
- https://staging.continuum.io/prefect/fs/gtest-feedstock/pr6/a70f57d
- https://staging.continuum.io/prefect/fs/abseil-cpp-feedstock/pr9/b11d9fd
69 changes: 0 additions & 69 deletions recipe/0002-remove-failing-json-parser-test.patch

This file was deleted.

39 changes: 0 additions & 39 deletions recipe/0003-remove-large-output-test.patch

This file was deleted.

13 changes: 0 additions & 13 deletions recipe/LICENSE.txt

This file was deleted.

2 changes: 2 additions & 0 deletions recipe/build-lib.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -ex

cd ${SRC_DIR}

if [[ "$(uname)" == "Linux" ]]; then
# protobuf uses PROTOBUF_OPT_FLAG to set the optimization level
# unit test can fail if optmization above 0 are used.
Expand Down
6 changes: 5 additions & 1 deletion recipe/build-pyheaders.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

set -exuo pipefail

rsync -a --prune-empty-dirs --include '*/' --include '*.h' --exclude '*' python/ $PREFIX/include/
# rsync -a --prune-empty-dirs --include '*/' --include '*.h' --exclude '*' python/ $PREFIX/include/
cd python/
find . -type d -exec mkdir -p $PREFIX/include/{} \;
find . -type f -name '*.h' -exec cp {} $PREFIX/include/{} \;
find $PREFIX/include/ -type d -empty -delete
19 changes: 15 additions & 4 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
c_compiler_version: # [linux and ppc64le]
- 8 # [linux and ppc64le]
cxx_compiler_version: # [linux and ppc64le]
- 8 # [linux and ppc64le]
# https://github.com/protocolbuffers/protobuf/blob/v26.1/Protobuf-C%2B%2B.podspec#L36
# also abseil now only support MacOS >=10.13, see
# https://github.com/abseil/abseil-cpp#support and
# https://github.com/abseil/abseil-cpp/issues/1513
MACOSX_SDK_VERSION: # [osx and x86_64]
- "10.13" # [osx and x86_64]
MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64]
- "10.13" # [osx and x86_64]
CONDA_BUILD_SYSROOT: # [osx and x86_64]
- /opt/MacOSX10.13.sdk # [osx and x86_64]

c_compiler: # [win]
- vs2019 # [win]
cxx_compiler: # [win]
- vs2019 # [win]
31 changes: 16 additions & 15 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,17 @@ outputs:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
- ninja
- ninja-base
host:
- gtest
- jsoncpp
- libabseil
- gtest 1.14.0
- jsoncpp 1.9.4
- libabseil 20240116.2
# requires abseil test targets to build with tests enabled
- libabseil-tests
- zlib
- zlib {{ zlib }}
run:
- ucrt # [win]
- zlib # bounds through run_exports
- libabseil # bounds through run_exports
# following google's C++ support policy, protobuf only support MacOS >=10.13, see:
# https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
# https://github.com/protocolbuffers/protobuf/blob/v24.0/Protobuf-C%2B%2B.podspec#L29
Expand Down Expand Up @@ -132,24 +133,26 @@ outputs:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
- ninja
- ninja-base
host:
- gtest
- jsoncpp
- libabseil
- gtest 1.14.0
- jsoncpp 1.9.4
- libabseil 20240116.2
# requires abseil test targets to build with tests enabled
- libabseil-tests
- zlib
- zlib {{ zlib }}
- {{ pin_subpackage('libprotobuf', exact=True) }}
run:
- zlib # bounds through run_exports
- libabseil # bounds through run_exports
- {{ pin_subpackage('libprotobuf', exact=True) }}
test:
requires:
# cmake needs compiler to be able to run package detection, see
# https://discourse.cmake.org/t/questions-about-find-package-cli-msvc/6194
- {{ compiler('cxx') }}
- cmake
- ninja
- zlib
- ninja-base
files:
- cmake_test/
commands:
Expand All @@ -169,8 +172,6 @@ outputs:
script: build-pyheaders.sh # [unix]
script: build-pyheaders.bat # [win]
requirements:
build:
- rsync # [unix]
host:
- {{ pin_subpackage('libprotobuf', exact=True) }}
run_constrained:
Expand Down

0 comments on commit b5d7007

Please sign in to comment.