python - 忽略 pypi 上的 .git 目录

标签 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

最佳答案

看起来您排除了扩展名为 .git文件,但不排除文件夹 /.git

尝试删除 .git 排除项之前的 *

关于python - 忽略 pypi 上的 .git 目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35393320/

相关文章:

python - 在 PyPI 上分发时我应该针对哪些架构和操作系统?

python - 为什么 bash 还在搜索 conda?

python - 如何修改所有输出文件以隐藏Robot Framework中的密码?

python - golang 和 python 的 Dockerfile

python - 在python中将字母数字字符串转换为数字字符串

python - 如何以编程方式访问 Python 包的依赖项?

linux - 在没有 root 权限的情况下检查 github 企业中的备份状态?

github - 如何将更改从 fork 项目推送到原始项目?

尽管我可以 ssh 进入 github,但 git clone 给出的权限被拒绝

python - 如何自动安装缺少的 python 模块?