问题
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