Mailinglist Archive: opensuse-packaging (102 mails)

< Previous Next >
[opensuse-packaging] Some more python singlespec questions/suggestions
  • From: Todd Rme <toddrme2178@xxxxxxxxx>
  • Date: Mon, 10 Apr 2017 11:09:10 -0400
  • Message-id: <>
A few questions and ideas have popped up for me while doing the
singlespec conversion:

First, is there a way to use the macros without actually setting up
the multiple packages? Particularly I need to use %{python_module
foo}, but %python_expand and %python_exec would also be useful. The
main use-case is for packages where the unit tests have been moved
into a separate -doc spec file to avoid dependency cycles. These
packages need to import both python2 and python3 dependencies to for
the unit tests, and ideally would use %python_expand or %python_exec
to run the tests. But the documentation itself would only be built
once, so we don't need multiple rpms. I tried %_python_macro_init but
it didn't work.

Second, is there a single-spec version of %py(3)_compile? Ideally it
would be nice to have %python2_compile and %python3_compile that could
be used with %python_expand, as well as a macro that automatically run
them both on %{buildroot}%{python(2/3)_sitelib} and
%{buildroot}%{python(2/3)_sitearch} (whichever exists).

Third, is there a macros to get just the current python major version
number? So "2" for python2 and "3" for python3? So projects, such as
the jupyter suite, use a "foo2-bar"/"foo3-bar" pattern that we need to
support, so having a macro to get the major number is pretty critical
especially since IPython is dropping python2 support soon so we need
to be able to adjust the build targets easily.

Third, the wiki recommends defining %oldpython when you need a
specific python-foo dependency. Considering how often the backports
are used these days in python2 packages, might this be a macro that
would be good to include so people don't have to manually define it?

Fourth, I notice the python2-foo versions of the packages (for
Tumbleweed) provide python-foo, but the python-foo versions (for older
releases) do not provide python2-foo. For maximum simplicity and
compatibility, might it be good to have the python-foo versions also
provide python2-foo?
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups