[英]Including text files to embed with Cabal
I've got a library I'm building that includes a few very large strings using Template Haskell and file-embed. 我有一个我正在构建的库,其中包含一些使用Template Haskell和file-embed的非常大的字符串。
I'm wondering, how do I ensure these files are included when I run Cabal dist? 我想知道,当我运行Cabal dist时,如何确保包含这些文件?
The are all in a folder called core, but some are within subdirectories of core. 它们都位于名为core的文件夹中,但有些位于core的子目录中。
Cabal has an extra-source-files
field precisely for these kinds of scenarios: Cabal有一个
extra-source-files
字段,适用于这些场景:
Extra-source-files: relative/path/to/my/embedded-file.txt
Quoting the Cabal User Guide : 引用Cabal用户指南 :
extra-source-files : filename list
extra-source-files : 文件名列表
A list of additional files to be included in source distributions built with setup sdist .
要使用setup sdist构建的源代码分发中包含的其他文件的列表。
As with
data-files
it can use a limited form of wildcards in file names.与
data-files
它可以在文件名中使用有限形式的通配符。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.