Skip to content

Commit 19e842c

Browse files
committed
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.
1 parent e6f7abb commit 19e842c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

locale/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ roundup.pot: $(SOURCES) $(TEMPLATES)
8383
../share/roundup/templates/devel/html/*.html \
8484
../share/roundup/templates/minimal/html/*.html \
8585
../share/roundup/templates/responsive/html/*.html
86-
VERSION="`sed -ne \"/__version__/s/.*'\(.*\)'.*/\1/p\" \
87-
../roundup/__init__.py`"; \
86+
VERSION="`${RUN_PYTHON} -c 'from roundup import __version__; \
87+
print(__version__)';`"; \
8888
${XGETTEXT} -j -w 80 -F \
8989
--package-name=Roundup \
9090
--package-version=$$VERSION \

0 commit comments

Comments
 (0)