Skip to content

Commit

Permalink
Merge pull request #194 from sdebionne/add-cobalt-library
Browse files Browse the repository at this point in the history
Add cobalt library
  • Loading branch information
h-vetinari authored Mar 25, 2024
2 parents b130d91 + aa7b85c commit a6e3e15
Show file tree
Hide file tree
Showing 15 changed files with 371 additions and 47 deletions.
4 changes: 0 additions & 4 deletions .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
NP_DUMMY_VER:
- '1.21'
PY_DUMMY_VER:
- '3.10'
bzip2:
- '1'
cdt_name:
Expand Down
4 changes: 0 additions & 4 deletions .ci_support/linux_aarch64_.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
BUILD:
- aarch64-conda_cos7-linux-gnu
NP_DUMMY_VER:
- '1.21'
PY_DUMMY_VER:
- '3.10'
bzip2:
- '1'
cdt_arch:
Expand Down
4 changes: 0 additions & 4 deletions .ci_support/linux_ppc64le_.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
NP_DUMMY_VER:
- '1.21'
PY_DUMMY_VER:
- '3.10'
bzip2:
- '1'
cdt_name:
Expand Down
6 changes: 1 addition & 5 deletions .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
NP_DUMMY_VER:
- '1.21'
PY_DUMMY_VER:
- '3.10'
- '10.13'
bzip2:
- '1'
channel_sources:
Expand Down
4 changes: 0 additions & 4 deletions .ci_support/osx_arm64_.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
MACOSX_DEPLOYMENT_TARGET:
- '11.0'
NP_DUMMY_VER:
- '1.21'
PY_DUMMY_VER:
- '3.10'
bzip2:
- '1'
channel_sources:
Expand Down
4 changes: 0 additions & 4 deletions .ci_support/win_64_.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
NP_DUMMY_VER:
- '1.21'
PY_DUMMY_VER:
- '3.10'
bzip2:
- '1'
channel_sources:
Expand Down
6 changes: 3 additions & 3 deletions .scripts/build_steps.sh

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

6 changes: 3 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.

4 changes: 2 additions & 2 deletions .scripts/run_win_build.bat

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

5 changes: 3 additions & 2 deletions build-locally.py

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

1 change: 1 addition & 0 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ mkdir temp_prefix
variant=release ^
threading=multi ^
link=shared ^
cxxstd=20 ^
-s NO_COMPRESSION=0 ^
-s NO_ZLIB=0 ^
-s NO_BZIP2=0 ^
Expand Down
3 changes: 3 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ CXXFLAGS="${CXXFLAGS} -fPIC"

if [[ "${target_platform}" == osx* ]]; then
TOOLSET=clang
# see https://conda-forge.org/docs/maintainer/knowledge_base/#newer-c-features-with-old-sdk
CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"
elif [[ "${target_platform}" == linux* ]]; then
TOOLSET=gcc
fi
Expand Down Expand Up @@ -75,6 +77,7 @@ mkdir temp_prefix
include="${INCLUDE_PATH}" \
cxxflags="${CXXFLAGS}" \
linkflags="${LINKFLAGS}" \
cxxstd=20 \
--layout=system \
-j"${CPU_COUNT}" \
install
Expand Down
9 changes: 3 additions & 6 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# we only need _a_ python version to build the headers for libboost-headers,
# putting it in CBC means it's accessible also in the build scripts
PY_DUMMY_VER:
- "3.10"
NP_DUMMY_VER:
- "1.21"
# Bump MacOs target to 10.13 for Boost.Cobalt / C++20 support
MACOSX_DEPLOYMENT_TARGET:
- '10.13' # [osx and x86_64]
23 changes: 17 additions & 6 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set version = "1.84.0" %}

{% set boost_libs = [
"atomic", "chrono", "container", "context", "contract", "coroutine",
"atomic", "chrono", "cobalt", "container", "context", "contract", "coroutine",
"date_time", "filesystem", "graph", "iostreams", "locale", "log", "log_setup",
"math_c99", "math_c99f", "math_tr1", "math_tr1f", "prg_exec_monitor",
"program_options", "random", "regex", "serialization", "system", "thread",
Expand All @@ -11,6 +11,11 @@
{% set boost_libs_static_only = ["exception", "test_exec_monitor"] %}
{% set boost_libs_py = ["python%s" % py, "numpy%s" % py] %}

# we only need _a_ python version to build the headers for libboost-headers,
# make it accessible in the build scripts via build/script_env below.
{% set PY_DUMMY_VER = "3.10" %}
{% set NP_DUMMY_VER = "1.21" %}

package:
name: boost-split
version: {{ version }}
Expand All @@ -21,25 +26,29 @@ source:
patches:
# ensure our compiler flags get used during bootstrapping
- patches/0001-Add-default-value-for-cxx-and-cxxflags-options-for-t.patch
- patches/0002-Reimplement-string_set-as-any_string.patch

build:
number: 1
number: 2
script_env:
- PY_DUMMY_VER={{ PY_DUMMY_VER }}
- NP_DUMMY_VER={{ NP_DUMMY_VER }}

requirements:
build:
- {{ compiler('cxx') }}
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- python {{ PY_DUMMY_VER }} *cpython # [build_platform != target_platform]
- numpy {{ NP_DUMMY_VER }} # [build_platform != target_platform]
- python {{ PY_DUMMY_VER }}.* *_cpython # [build_platform != target_platform]
- numpy {{ NP_DUMMY_VER }}.* # [build_platform != target_platform]
host:
- icu # [unix]
- xz # [unix]
- bzip2
- zlib
- zstd
# see conda_build_config
- python {{ PY_DUMMY_VER }} *cpython
- numpy {{ NP_DUMMY_VER }}
- python {{ PY_DUMMY_VER }}.* *_cpython
- numpy {{ NP_DUMMY_VER }}.*

outputs:
- name: libboost-headers
Expand Down Expand Up @@ -97,6 +106,8 @@ outputs:
- xz
- zlib
- zstd
run:
- __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64]
run_constrained:
# Anaconda's output is also called libboost; therefore we automatically
# avoid issues of co-installability, because a package with the same name
Expand Down
Loading

0 comments on commit a6e3e15

Please sign in to comment.