Closed sylikc closed 2 years ago
It goes into __init__.py
; the top-level one that describes the module.
I suppose other things, such as classes, could have their own __version__
s, but I don't know about that. It's surely not what you want. ☺️
Ideally, the version should only be specified in exactly one place, and so for packaging (which you are doing with this project), there is info on Single-sourcing the package version. version = attr: package.__version__
seems nice enough. ☺️
thanks for the help. I guess I'm definitely doing it wrong in one of my other personal projects... I have __version__
tags like everywhere... package, module, class . . .
closed by d94ff05547b4fb05a019b306b64320d90ae397fc
I really do not know whether __version__
is used for anything but a module's version! 🤷
Oh well. I don't remember ever seeing it used for classes.
Yeah it's good... the way that the Python single version truth describes it, it definitely only belongs on the Package level...
Yeah... I have this big monolithic project that I put all my helper functions into, and ... whelp hehe.
@jangop I see an issue opened with the original source https://github.com/smarnach/pyexiftool/issues/18 , and I've read through the PEP but wasn't sure how to do it exactly...
Where does
__version__
go? Does it go into__init__.py
or does it go like into the top of the different py files... or does it go into the class level? like in theExifTool
class?I think the PEP 396 referenced is outdated (it's marked as Rejected)... latest I believe is PEP 440
It's unclear where I would put the version information... any clues?