谁能告诉我如何防止 .git 目录的内容上传到 PyPi。我的 MANIFEST.in 看起来像这样:
global-include *.py *.js *.rst *.html *.css *.lyx *.pdf *.png *.gif *.jpg *.txt *.jar *.bat *
global-exclude *.pyc *.git .gitignore
prune Transcrypt/development/*.git
prune Transcrypt/development/attic
prune Transcrypt/development/docs
prune Transcrypt/development/experiments
我的上传内容因 .git 内容而变得太大... 我花了相当长的时间在互联网上阅读有关此内容的内容,但到目前为止似乎没有任何效果。
[编辑]
但是确实如此(谢谢,bastelflp 指出了正确的方向)
global-include *.py *.js *.rst *.html *.css *.lyx *.pdf *.png *.gif *.jpg *.txt *.jar *.bat *
global-exclude *.pyc .gitignore
prune .git
prune Transcrypt/development/attic
prune Transcrypt/development/docs
prune Transcrypt/development/experiments
最佳答案
看起来您排除了扩展名为 .git
的文件,但不排除文件夹 /.git
。
尝试删除 .git
排除项之前的 *
。
关于python - 忽略 pypi 上的 .git 目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35393320/