From 1b69c1e4567cb0aca5a1bb59e1a90a1e60812d87 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Tue, 26 Oct 2021 09:16:01 -0700 Subject: [PATCH] Add support for building from git snapshots for packit --- python-drgn.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python-drgn.spec b/python-drgn.spec index eeacb33..d8fd2ec 100644 --- a/python-drgn.spec +++ b/python-drgn.spec @@ -41,6 +41,10 @@ BuildRequires: elfutils-devel BuildRequires: libkdumpfile-devel BuildRequires: zlib-devel BuildRequires: xz-devel +# These are needed when building from git snapshots +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool %description %{_description} @@ -70,6 +74,10 @@ sed -r \ -e 's|https://docs.python.org/3|%{_docdir}/python3-docs/html|' \ -i docs/conf.py %endif +# Ensure version is always set, even when building from git snapshots +if [ ! -f drgn/internal/version.py ]; then + echo '__version__ = "%{version}"' > drgn/internal/version.py +fi %build # verbose build