Some distributions ship with default Python < 3.8, but a newer Python
version is available through a module. The package currently does not
build at all for those distributions, but the build environment provides
a handy macro precisely for this purpose.
As a side note, primary_python is not provided either, breaking
dependencies for the CLI subpackage. Fall back to the first Python
version in %pythons in that case.
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
The %{primary_python} macro is defined only for build targets which have
Python 3.8 or newer. Until a better solution is available, use this
trick to make the package unbuildable if Python is too old (rather than
fail the build).
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Since the old Python module packages also contain a /usr/bin/drgn file,
installing drgn subpackage also requires upgrading the module package.
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Move /usr/bin/drgn to a separate package. We may need multiple Python
packages with the modules, but there should be only one package with the
CLI binary.
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
The readline module is part of Python itself, but it must be required
explicitly on newer distributions (16.0, Factory). However, Python
packages in older distributions (15.x and earlier) do not have the
corresponding Provides. :-(
Solve it by Build-requiring %pythons. Yes, it does bring a lot of
unneded stuff into the build environment...
Signed-off-by: Petr Tesarik <ptesarik@suse.com>