Trying to build python3 package. How to make %python_exec use python 3?

Hello, I am trying to build LiberTEM

The package failed.
I assume that it is trying to use python2 to execute but shouldn’t python3 be use? I don’t add any python2 package. How to make it use python3?


   18s] Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.TQwyLG
   18s] + umask 022
   18s] + cd /home/abuild/rpmbuild/BUILD
   18s] + cd LiberTEM-
   18s] ++ '' -f _current_flavor ']'
   18s] ++ cat _current_flavor
   18s] + python_flavor=python3
   18s] + '' -z python3 ']'
   18s] + '' python3 '!=' python2 ']'
   18s] + '' -d build ']'
   18s] + mv build _build.python3
   18s] + '' -d _build.python2 ']'
   18s] + echo python2
   18s] + /usr/bin/python2 test
   18s] /var/tmp/rpm-tmp.TQwyLG: line 38: /usr/bin/python2: No such file or directory
   18s] error: Bad exit status from /var/tmp/rpm-tmp.TQwyLG (%check)
   18s] RPM build errors:
   18s]     Bad exit status from /var/tmp/rpm-tmp.TQwyLG (%check)
   18s] linux-edcv failed "build LiberTEM.spec" at Mon Apr 13 04:20:41 UTC 2020.

Did you try %python3_exec

Yes, but I got this.

 Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.lhWAQO
   43s] + umask 022
   43s] + cd /home/abuild/rpmbuild/BUILD
   43s] + cd LiberTEM-
   43s] + %python3_exec test
   43s] /var/tmp/rpm-tmp.lhWAQO: line 29: fg: no job control
   43s] error: Bad exit status from /var/tmp/rpm-tmp.lhWAQO (%check)

Then just use /usr/bin/python3

Thanks it work.

But do I have to run a test to build a package which it seems what test is trying to do.