pypa / hatch

Modern, extensible Python project management
https://hatch.pypa.io/latest/
MIT License
6.11k stars 309 forks source link

hatchling: should also exclude `venv` directory from sdist #1764

Open paveldikov opened 1 month ago

paveldikov commented 1 month ago

.venv (with leading dot) is already being excluded: https://github.com/pypa/hatch/blob/9650a1dd3b606cf4777f42bd95874c2a9be0d6a2/backend/src/hatchling/builders/constants.py#L7

So it makes sense to also exclude venv, which is just as common.

ofek commented 1 month ago

It wouldn't be possible to add to this constant because these apply at every level of the tree and there would be no way to override for inclusion if you actually have a directory of that name which, for example, Hatch does.

paveldikov commented 1 month ago

Ok, is there a similar constant that accepts full the full gitignore syntax i.e. /venv?