Skip to content

Commit

Permalink
Merge pull request #9 from JohanMabille/deps
Browse files Browse the repository at this point in the history
xtensor-zarr now depends on xtensor-io
  • Loading branch information
JohanMabille committed Nov 10, 2020
2 parents 71619bc + 8ac866d commit c819c81
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 26 deletions.
23 changes: 3 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,37 +35,20 @@ install:
# Install mamba
- conda install mamba -c conda-forge
# Install host dependencies
- mamba create -n test nlohmann_json google-cloud-cpp cpp-filesystem zlib blosc python fsspec numpy numcodecs sh -c conda-forge
- mamba create -n test nlohmann_json google-cloud-cpp cpp-filesystem zlib xtensor-io python fsspec numpy numcodecs sh -c conda-forge
# Install build dependencies
- mamba install -n test cmake -c conda-forge
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
mamba install -n test gxx_linux-64 libgcc -c conda-forge;
fi
# Activate test environment
- source activate test
# Install development versions
- mkdir dev_tmp
# Install development version of zarrita
- mkdir dev_tmp
- cd dev_tmp
# xtensor
- wget https://github.com/xtensor-stack/xtensor/archive/master.tar.gz -O xtensor.tar.gz -q
- mkdir xtensor
- tar zxf xtensor.tar.gz -C xtensor --strip-components 1
# xtensor-io
- wget https://github.com/xtensor-stack/xtensor-io/archive/master.tar.gz -O xtensor-io.tar.gz -q
- mkdir xtensor-io
- tar zxf xtensor-io.tar.gz -C xtensor-io --strip-components 1
# xtl
- wget https://github.com/xtensor-stack/xtl/archive/master.tar.gz -O xtl.tar.gz -q
- mkdir xtl
- tar zxf xtl.tar.gz -C xtl --strip-components 1
# zarrita
- wget https://github.com/alimanfoo/zarrita/archive/master.tar.gz -O zarrita.tar.gz -q
- mkdir zarrita
- tar zxf zarrita.tar.gz -C zarrita --strip-components 1
# move to conda environment
- mv xtensor/include/xtensor $CONDA_PREFIX/include/
- mv xtensor-io/include/xtensor-io $CONDA_PREFIX/include/
- mv xtl/include/xtl $CONDA_PREFIX/include/
- mv zarrita/zarrita.py ../test
- cd ..
# Build
Expand Down
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ message(STATUS "Building xtensor-zarr v${${PROJECT_NAME}_VERSION}")
# ============

# Use development version of xtensor and xtensor-io for now
#find_package(xtensor 0.21.2 REQUIRED)
#find_package(xtl 0.6.9 REQUIRED)
find_package(xtensor-io 0.10.1 REQUIRED)
find_package(nlohmann_json 3.2.0 REQUIRED)

message(STATUS "Found xtensor: ${xtensor_INCLUDE_DIRS}/xtensor")

#Remove the following lines when xtensor-io is fixed
include(CMakeFindDependencyMacro)
find_dependency(xtensor REQUIRED)
find_dependency(xtl REQUIRED)

# Build
# =====

Expand All @@ -62,15 +66,14 @@ add_library(xtensor-zarr INTERFACE)
include_directories(${GTEST_INCLUDE_DIRS})

target_include_directories(xtensor-zarr
INTERFACE
INTERFACE
$<BUILD_INTERFACE:${XTENSOR_ZARR_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>
)

target_link_libraries(xtensor-zarr
INTERFACE
#xtl
#xtensor
INTERFACE
xtensor-io
nlohmann_json::nlohmann_json
)

Expand Down

0 comments on commit c819c81

Please sign in to comment.