Skip to content

Commit

Permalink
Update Conda recipe and contribution guide for cumed
Browse files Browse the repository at this point in the history
  • Loading branch information
gigony committed Oct 30, 2021
1 parent 23ad908 commit 4f88f14
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,13 @@ The build command will create the following files:
- `./install/lib/libcucim*`
- `./python/install/lib/_cucim.cpython-*-x86_64-linux-gnu.so`
- `./cpp/plugins/cucim.kit.cuslide/install/lib/cucim.kit.cuslide@*.so`
- `./cpp/plugins/cucim.kit.cumed/install/lib/cucim.kit.cumed@*.so`

And, it will copy the built library files to `python/cucim/src/cucim/clara/` folder:
- `libcucim.so.*`
- `_cucim.cpython-*-x86_64-linux-gnu.so`
- `cucim.kit.cuslide@*.so`
- `cucim.kit.cumed@*.so`


**Building `cucim`(python bindings)**
Expand All @@ -173,14 +175,14 @@ Once it is built, the subsequent build doesn't take much time.

However, if a build option or dependent packages are updated, the build can be failed (due to CMakeCache.txt or existing build files). In that case, you can remove use the following commands to remove CMakeCache.txt or build folder, then build it again.

1) Remove CMakeCache.txt for libcucim, cuslide plugin, and the python wrapper (pybind11).
1) Remove CMakeCache.txt for libcucim, cuslide/cumed plugin, and the python wrapper (pybind11).

```bash
# this command wouldn't remove already downloaded dependency so faster than `clean` subcommand
./run build_local clean_cache
```

2) Remove `build-*` and `install` folder for libcucim, cuslide plugin, and the python wrapper (pybind11).
2) Remove `build-*` and `install` folder for libcucim, cuslide/cumed plugin, and the python wrapper (pybind11).

```bash
# this command is for clean build
Expand Down
14 changes: 8 additions & 6 deletions conda/recipes/libcucim/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ cp -P -r install/bin/* $PREFIX/bin/ || true
cp -P -r install/lib/* $PREFIX/lib/ || true
cp -P -r install/include/* $PREFIX/include/ || true

# Build libcucim.kit.cuslide plugin
./run build_local cuslide ${CUCIM_BUILD_TYPE} ${PREFIX}

mkdir -p $PREFIX/bin $PREFIX/lib $PREFIX/include
cp -P -r cpp/plugins/cucim.kit.cuslide/install/bin/* $PREFIX/bin/ || true
cp -P -r cpp/plugins/cucim.kit.cuslide/install/lib/* $PREFIX/lib/ || true
# Build plugins
for plugin_name in cuslide cumed; do
echo "Building cucim.kit.${plugin_name} ..."
./run build_local ${plugin_name} ${CUCIM_BUILD_TYPE} ${PREFIX}
mkdir -p $PREFIX/bin $PREFIX/lib $PREFIX/include
cp -P -r cpp/plugins/cucim.kit.${plugin_name}/install/bin/* $PREFIX/bin/ || true
cp -P -r cpp/plugins/cucim.kit.${plugin_name}/install/lib/* $PREFIX/lib/ || true
done

0 comments on commit 4f88f14

Please sign in to comment.