Mailinglist Archive: opensuse-packaging (116 mails)

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

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}
%check
export LANG=C.UTF-8
%ifpython2
python2 setup.py test -s test2
%endif
%ifpython3
python3 setup.py test -s test3
%endif
%endif

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?

Sebastian

[0]:
https://build.opensuse.org/package/show/home:sebix:branches:devel:languages:python/python-termstyle

--
python programming - mail server - photo - video - https://sebix.at
cryptographic key at https://sebix.at/DC9B463B.asc and on public keyservers


< Previous Next >