Leaving out the .git directory on pypi

此生再无相见时 提交于 2021-01-28 01:21:28

问题


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

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.

[edit]

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

回答1:


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

Try removing the * before your .git exclusions.



来源:https://stackoverflow.com/questions/35393320/leaving-out-the-git-directory-on-pypi

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!