Mailinglist Archive: opensuse-buildservice (124 mails)

< Previous Next >
[opensuse-buildservice] introducing new macros across the whole OBS?
in relation to the python single-spec initiative, I have designed a set
of new macros that allow significant automation in building Python packages.

However, these are constrained by the %python_module macro used in
The purpose of this macro is to expand %{python_module foo} to
python2-foo, python3-foo, etc., based on which python flavors are build
targets for the package. Obviously, the buildservice itself must be able
to do this expansion, otherwise it can't resolve the build requirements.

So far I have solved this by placing all the macros in prjconf. But this
is not viable if I want my macros to be available everywhere. I can
create a "python-macros" package for all the other macros, and
buildrequire it, in order to make the packages build in any distro that
has this package, but I can't do the same for %python_module.

Is it possible to make the buildservice itself recognize this macro, or
place it in some sort of global prjconf? Ideally without triggering a
full rebuild of everything?
Or do you have any tips for alternate solutions?

One thing that occured to me, instead of relying on macros, turn
"python-foo" packages into metapackages requiring the respective
"python2-foo", "python3-foo" etc., and then BuildRequire the
metapackage. I don't have a clear idea about how well this would work,
it seems rather problematic.

I don't want to make packagers list the buildrequires by hand, because
the requirements can be numerous and we also want to be able to add more
python flavors and expand the build requirements accordingly.

thanks for any tips

< Previous Next >