离开pypi上的.git目录

时间:2016-02-14 15:13:06

标签: python github pypi

任何人都可以告诉我如何防止.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

1 个答案:

答案 0 :(得分:3)

您似乎要将文件排除在扩展名.git之外,而不是文件夹 /.git

尝试在*排除对象之前移除.git