1 |
commit: f35597df0a9fe361e8d95fb8d1e53b887c95c96f |
2 |
Author: W. Trevor King <wking <AT> tremily <DOT> us> |
3 |
AuthorDate: Sat Feb 22 19:37:36 2014 +0000 |
4 |
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> |
5 |
CommitDate: Sat Feb 22 21:43:18 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=f35597df |
7 |
|
8 |
Makefile: Fix PACKAGE_VERSION extraction |
9 |
|
10 |
The old method grepped for __version__ in catalyst. That broke with |
11 |
24c5352 (Initial rearrangement of the python directories, 2013-01-10), |
12 |
which moved catalyst to bin/catalyst, kept the __version__ in |
13 |
bin/catalyst, and added a new __version__ in catalyst/main.py. Then |
14 |
46b261e (setup.py: Add disutils-based packaging, 2013-06-05) |
15 |
consolidated the __version__ definitions in catalyst/__init__.py, |
16 |
removing them from bin/catalyst and catalyst/main.py. This patch |
17 |
adjusts the Makefile, invoking Python to extract catalyst.__version__ |
18 |
instead of grepping through the file that defines it. |
19 |
|
20 |
--- |
21 |
Makefile | 2 +- |
22 |
1 file changed, 1 insertion(+), 1 deletion(-) |
23 |
|
24 |
diff --git a/Makefile b/Makefile |
25 |
index 98accbe..757113c 100644 |
26 |
--- a/Makefile |
27 |
+++ b/Makefile |
28 |
@@ -1,7 +1,7 @@ |
29 |
# Copyright (C) 2011 Sebastian Pipping <sebastian@×××××××.org> |
30 |
# Licensed under GPL v2 or later |
31 |
|
32 |
-PACKAGE_VERSION = `fgrep '__version__=' catalyst | sed 's|^__version__="\(.*\)"$$|\1|'` |
33 |
+PACKAGE_VERSION = $(shell PYTHONPATH=. python -c 'import catalyst; print(catalyst.__version__)') |
34 |
MAN_PAGE_SOURCES = $(wildcard doc/*.?.txt) |
35 |
MAN_PAGES = $(patsubst doc/%.txt,files/%,$(MAN_PAGE_SOURCES)) |
36 |
MAN_PAGE_INCLUDES = doc/subarches.generated.txt doc/targets.generated.txt |