省去了pypi上的.git目录

2024-05-23 18:59:45 发布

您现在位置:Python中文网/ 问答频道 /正文

有人能告诉我如何防止.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的东西。。。 我花了相当长的时间在网上阅读,但到目前为止似乎没有什么工作

[编辑]

但这是真的(谢谢你,巴斯特尔夫指出了正确的方向)

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

Tags: pygitpdfincludepnghtmljsrst