如何使 setuptools 尊重 .gitignore?
我有以下目录结构:
lib/
lib/
pkg1/
__init__.py
pkg2/
__init__.py
data/ # has many subdirectories and files
tests/
.gitignore
setup.py
data
文件夹(不是包)包含文件和其他子文件夹,其中一些由于 .gitignore
而被排除在 git 存储库之外。
我想要 python setup.py bdist_wheel
这个项目并将文件包含在 data
中,但我不想要任何 .gitignore
文件在最后的轮子里。 setuptools 支持吗?
I have the following directory structure:
lib/
lib/
pkg1/
__init__.py
pkg2/
__init__.py
data/ # has many subdirectories and files
tests/
.gitignore
setup.py
The data
folder (not a package) has files and other subfolders, and some of them are excluded from the git repo due to .gitignore
.
I want to python setup.py bdist_wheel
this project and include the files in data
, but I don't want any .gitignore
'd file in the final wheel. Does setuptools
support that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,事实并非如此。也许使用额外的库,例如
pbr
或
setuptools-scm
位于setuptools
之上。No, it does not. Maybe with an additional library such as
pbr
orsetuptools-scm
on top ofsetuptools
.您可以使用 setuptools_scm 代替。
You can use setuptools_scm instead.