setup.py 在安装时访问文件
TL;DR
我正在寻找一种在安装期间读取 setup.py 中的文件内容的方法,该文件内容不是包的一部分
描述
我有一个看起来像的项目像这样:
my_project
|--- src
|--- my_package
|--- ...
|--- resources
|--- ...
|--- setup.py
resources 目录包含 toml 文件列表,需要在安装过程中将这些文件复制到主目录以使我的代码正常工作。
此外,我不希望将这些文件保存为包的一部分,以避免我的包太大。
将此目录包含在 MANIFEST.ini 中并在 setup.py 中读取它就足够了,还是需要其他操作?
任何帮助将不胜感激。
TL;DR
I'm looking for a way to read a file content in setup.py that is not part of the package during installation time
Description
I have a project that looks like this:
my_project
|--- src
|--- my_package
|--- ...
|--- resources
|--- ...
|--- setup.py
The resources dir containing a list of toml files that need to be copied to the home directory during installation in order to make my code work.
Moreover, I don't want those files to be saved as part of the package in order to avoid my package from being too large.
Is including this directory in MANIFEST.ini and read it in setup.py is enough, or other actions are needed?
Any help would be much appriciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论