From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 825B2138F47 for ; Sat, 22 Feb 2014 21:51:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8CEDEE0984; Sat, 22 Feb 2014 21:51:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0944DE0984 for ; Sat, 22 Feb 2014 21:51:05 +0000 (UTC) Received: from big_daddy.dol-sen.ca (S010600222de111ff.vc.shawcable.net [96.49.5.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id 265CB33FAAD for ; Sat, 22 Feb 2014 21:51:05 +0000 (UTC) Date: Sat, 22 Feb 2014 13:46:36 -0800 From: Brian Dolbec To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] [PATCH] Makefile: Fix PACKAGE_VERSION extraction Message-ID: <20140222134636.6be7d503.dolsen@gentoo.org> In-Reply-To: <575419cef3b2b642000683bf2cae049b069d0b75.1393097745.git.wking@tremily.us> References: <1389491218-1488-2-git-send-email-dolsen@gentoo.org> <575419cef3b2b642000683bf2cae049b069d0b75.1393097745.git.wking@tremily.us> Organization: Gentoo Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 0a8dcf27-bc56-4241-9a45-36af0cfd53d1 X-Archives-Hash: 68413980d8ccea354993405d4d5aefd5 On Sat, 22 Feb 2014 11:37:36 -0800 "W. Trevor King" wrote: > The old method grepped for __version__ in catalyst. That broke with > 24c5352 (Initial rearrangement of the python directories, 2013-01-10), > which moved catalyst to bin/catalyst, kept the __version__ in > bin/catalyst, and added a new __version__ in catalyst/main.py. Then > 46b261e (setup.py: Add disutils-based packaging, 2013-06-05) > consolidated the __version__ definitions in catalyst/__init__.py, > removing them from bin/catalyst and catalyst/main.py. This patch > adjusts the Makefile, invoking Python to extract catalyst.__version__ > instead of grepping through the file that defines it. > --- > This patch is in git://tremily.us/catalyst.git setup-py as 575419c. > > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 98accbe..757113c 100644 > --- a/Makefile > +++ b/Makefile > @@ -1,7 +1,7 @@ > # Copyright (C) 2011 Sebastian Pipping > # Licensed under GPL v2 or later > > -PACKAGE_VERSION = `fgrep '__version__=' catalyst | sed 's|^__version__="\(.*\)"$$|\1|'` > +PACKAGE_VERSION = $(shell PYTHONPATH=. python -c 'import catalyst; print(catalyst.__version__)') > MAN_PAGE_SOURCES = $(wildcard doc/*.?.txt) > MAN_PAGES = $(patsubst doc/%.txt,files/%,$(MAN_PAGE_SOURCES)) > MAN_PAGE_INCLUDES = doc/subarches.generated.txt doc/targets.generated.txt looks fine, added and queued up right after the setup.py commit. In git pending branch. -- Brian Dolbec