Can I run import Python command in spec file in OBS?

Hello,
I am trying to build scipy 1.5.4.
I ran a test and some test failed which I report to the dev.
Dev ask me to try running the command

import sksparse
from sksparse.cholmod import cholesky as cholmod
import scikits.umfpack 

I could test the package locally on my PC however, I got different error compare to OBS, I suspect my environment is different.
So is there anyway I can do the command above in OBS? Thanks.

https://build.opensuse.org/package/show/home:andythe_great:branches:devel:languages:python:numeric/python-scipy

If you want command started from a shell script to read content of this script as its input you need to use here-document redirection. Read any shell man page or tutorial how to do it.

Or use “python -c ’ python script …’”.