在编译使用仅标头库的软件时,许可可能需要库许可证的副本与编译后的软件一起分发。此外, Conda Forge 明确(请参阅PR 模板)包必须包含静态链接依赖项的原始许可证,这对于仅标头库来说也是如此。但是,我找不到有关如何解析级别包的许可证文件的文档。host
如何在meta.yaml
配方中指定从特定包中复制许可证?
最小的例子
这是使用tsl_robin_map
仅标头库的最小示例。我知道包tsl_robin_map
tarball具有info/licenses/LICENSE
. 但是,我不知道如何在配方中指定该路径。
元.yaml
package:
name: hello-robin
version: 0.1
source:
path: .
build:
number: 0
requirements:
build:
- {{ compiler('cxx') }}
host:
- tsl_robin_map
test:
commands:
- hello-robin
# about:
# license_file:
# - <path_to_tsl_robin_map>/info/licenses/LICENSE # <- how should this be specified?
你好.cpp
#include <iostream>
#include <tsl/robin_map.h>
int main()
{
std::cout << "Hello, Robin!";
}
构建.sh
#!/bin/bash
${CXX} ${CPPFLAGS} -o hello-robin hello.cpp
mkdir -p ${PREFIX}/bin
mv hello-robin ${PREFIX}/bin/hello-robin