Conda构建和共享库,可能已经发布了已构建的二进制文件吗?

时间:2018-11-04 08:27:55

标签: conda conda-build

假设我确实使用cmake用以下几行(带有共享库)自行构建了一个c ++包:

#!bin/bash
export SUNDIALS_ROOT=~/anaconda3/include/sundials
cmake -DCMAKE_INSTALL_PREFIX="/home/moritz/Dokumente/projects/pycadet/cadet" -DCMAKE_LIBRARY_PATH="~/anaconda3/lib" -DBLA_VENDOR=Intel10_64lp ../code/
make
make install

如果我想使用调用可执行文件的python包装器来交付构建二进制文件,是否足以在meta.yaml中定义该软件包在运行时需要这些库?

package:
    name: pycadet
    version: 3.1.2
build:
    number: 0
source:
    url: some_url
requirements:
    run:
    - sundials
    - mkl
    - hdf5
about:
    home: https://github.com/modsim/CADET
    license: GPL
summary: A package for numerical simulation of chromatography

还是有必要在conda-build的调用下构建c ++软件包itsels?例如。像这样在build.sh文件中定义?

#!bin/bash
#
# The build receipy for conda 
#
#
#
#
# You can run build.sh with bash -x -e. The -x makes it echo each command that is run
# and the -e makes it exit whenever a command in the script returns nonzero exit status.
set -x -e

INCLUDE_PATH="${PREFIX}/include"
LIBRARY_PATH="${PREFIX}/lib"
CADET_PATH="${PREFIX}"

# get out of the work directory (contains downloaded cadet)
cd ..

# make the build directory (in source builds are prohibited)
mkdir build

# get into it
cd build

export SUNDIALS_ROOT=${PREFIX}/lib
cmake -DCMAKE_INSTALL_PREFIX="./cadet_test" -DCMAKE_LIBRARY_PATH="${LIBRARY_PATH}"-DBLA_VENDOR=Intel10_64lp ${SRC_DIR} ../work/
make
make install

0 个答案:

没有答案