Mailinglist Archive: opensuse-packaging (116 mails)

< Previous Next >
[opensuse-packaging] No %if inside %with?

For the package python-termstyle[0] I want to deactivate the tests
because of problems with the default encoding which I can't solve. The
requirement of the project maintainers is to not comment them out but
change the `%bcond_without tests` to `%bcond_with tests`. But now I have
a problem inside %check, which looks like this:

%if %{with tests}
export LANG=C.UTF-8
python2 test -s test2
python3 test -s test3

With `%bcond_without tests`, rpm does not complain (the checks fail, but
we know that already), but when I use
`%bcond_with tests` I get:

[ 52s] error: /home/abuild/rpmbuild/SOURCES/python-termstyle.spec:72: Got a
%endif with no %if
Where lne 72 is the last %endif in that section. If I comment out both
%ifpythons, then it works.

Does someone maybe has a clue why this is happening?



python programming - mail server - photo - video -
cryptographic key at and on public keyservers

< Previous Next >