Embedding version in command-line program

Loris Bennett loris.bennett at fu-berlin.de
Wed Oct 7 07:06:04 EDT 2020


Hi,

I have written a program, which I can run on the command-line thus

  mypyprog --version

and the get the version, which is currently derived from a variable in
the main module file.

However, I also have the version in an __init__.py file and in a
pyproject.toml (as I'm using poetry, otherwise this would be in
setup.py).

What's the best way of reducing these three places where the version is
defined to a single one?

Cheers,

Loris

-- 
This signature is currently under construction.


More information about the Python-list mailing list