忽略pypi上的.git目录 [英] Leaving out the .git directory on pypi

查看:70
本文介绍了忽略pypi上的.git目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能告诉我如何防止.git目录的内容上载到PyPi.我的MANIFEST.in看起来像这样:

Can anyone tell me how to prevent the contents of the .git directory to be uploaded to PyPi. My MANIFEST.in looks like so:

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的内容使我的上传变得太大...我已经花了很多时间在Internet上阅读有关此内容的信息,但到目前为止似乎没有任何效果.

My uploads get too big with the .git stuff around... I've spend quite some time reading about this on the Internet, but so far nothing seems to work.

但是可以(谢谢,bastelflp指向正确的方向)

But this does (Thanks, bastelflp for pointing in right direction)

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 .

It looks like you exclude files with the extension .git but not the folder /.git.

尝试在排除 .git 之前删除 * .

这篇关于忽略pypi上的.git目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆