[PATCH] Move Anaconda version detection from isys to Python code
David Shea
dshea at redhat.com
Mon May 19 18:52:11 UTC 2014
On 05/19/2014 12:56 PM, Martin Kolman wrote:
> There is now pyanaconda/version.py.in module with a __version__
> variable, which automatically gets the Anaconda version from
> automake during build.
>
> As a side effect, the absence of compiled isys no longer crashes
> "anaconda --help". Also "anaconda --version" on freshly
> cloned/unpackaged Anaconda now correctly returns "unknown version".
>
> Signed-off-by: Martin Kolman<mkolman at redhat.com>
> ---
> anaconda | 12 ++++++++----
> configure.ac | 1 +
> pyanaconda/exception.py | 10 ++++++++--
> pyanaconda/isys/Makefile.am | 4 +---
> pyanaconda/isys/__init__.py | 3 ---
> pyanaconda/isys/isys.c | 6 ------
> pyanaconda/version.py.in | 1 +
> 7 files changed, 19 insertions(+), 18 deletions(-)
> create mode 100644 pyanaconda/version.py.in
The generated python file will not work with VPATH builds, since we use
this in pyanaconda/Makefile.am to trick automake into allowing wildcards:
anaconda_PYTHON = $(srcdir)/*.py
but version.py is not always in $srcdir. You'll need something like this
to handle both the VPATH and non-VPATH cases:
anaconda_PYTHON = $(sort $(wildcard $(srcdir)/*.py $(builddir)/version.py))
More information about the anaconda-patches
mailing list