Mercurial > p > roundup > code
changeset 7792:ed0fce27fd75
build: replace verstion extraction via set to use python
The version of roundup was extracted from roundup/__init__.py by sed.
It is used to label the roundup.pot template file.
Replaced the sed setup by importing roundup and printing the
__Version__ variable. This should be less fragile to spacing and other
changes.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 06 Mar 2024 22:50:28 -0500 |
| parents | f3ccaf9e2e03 |
| children | 72a26f3b94db |
| files | locale/Makefile |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/locale/Makefile Wed Mar 06 20:14:26 2024 -0500 +++ b/locale/Makefile Wed Mar 06 22:50:28 2024 -0500 @@ -83,8 +83,8 @@ ../share/roundup/templates/devel/html/*.html \ ../share/roundup/templates/minimal/html/*.html \ ../share/roundup/templates/responsive/html/*.html - VERSION="`sed -ne \"/__version__/s/.*'\(.*\)'.*/\1/p\" \ - ../roundup/__init__.py`"; \ + VERSION="`${RUN_PYTHON} -c 'from roundup import __version__; \ + print(__version__)';`"; \ ${XGETTEXT} -j -w 80 -F \ --package-name=Roundup \ --package-version=$$VERSION \
