Search code examples
rpmrpmbuildopensuse

How to fix "line 28: CHOOSE:: command not found"


I am trying to build a rpm package using OBS. However, I get the following error when running osc build:

    [    4s] Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.KwrQs4
    [    4s] + umask 022
    [    4s] + cd /home/abuild/rpmbuild/BUILD
    [    4s] + cd pytz-2021.1
    [    4s] + CHOOSE:
    [    4s] /var/tmp/rpm-tmp.KwrQs4: line 28: CHOOSE:: command not found
    [    4s] error: Bad exit status from /var/tmp/rpm-tmp.KwrQs4 (%check)
    [    4s] 
    [    4s] 
    [    4s] RPM build errors:
    [    4s]     Bad exit status from /var/tmp/rpm-tmp.KwrQs4 (%check)
    [    4s] 
    [    4s] meteor failed "build python-pytz.spec" at Thu Feb 11 14:37:40 UTC 2021.
    [    4s] 

Has anyone an idea how to fix this?


Solution

  • Alright, I figured it out: In the check section it says CHOOSE pytest OR pyunittest -v when generating the spec file using py2pack- should have read that. Choosing either pytest or pyuinttest works fine.