git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Embedding version in command-line program


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.