Should setuptools version propagate to a module's __version__? If so, how?
Cameron Simpson
cs at cskk.id.au
Sun May 10 21:38:45 EDT 2020
On 10May2020 13:00, John Ladasky <john_ladasky at sbcglobal.net> wrote:
>On Saturday, May 9, 2020 at 8:17:19 PM UTC-7, Cameron Simpson wrote:
>> I also autopatch the module itself to
>> set __version__ to match when I make that release tag.
>
>Yes, that's exactly what the module I wrote for my company's internal use does. The official version number is hard-coded into setup.py. My setup.py opens my module's __init__.py, and patches the line that starts with "__version__ = ".
>
>I can see that this approach is one of several suggested approaches
>described in the Python packaging guide. If I'm going to work with a
>package that eventually ends up on PyPI, I want to make sure that I
>don't do something unexpected or fragile.
Yah. In my case the VCS tag is the reference from which I make the
setup.py and patch the source file.
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Python-list
mailing list