Results 1 to 5 of 5

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

  1. #1
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    117

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

    Hello, I am trying to build LiberTEM
    https://build.opensuse.org/package/s...great/LiberTEM

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

    Thanks

    Code:
    [   18s] Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.TQwyLG
    [   18s] + umask 022
    [   18s] + cd /home/abuild/rpmbuild/BUILD
    [   18s] + cd LiberTEM-0.4.1.1582046588.a196a51
    [   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 setup.py 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] 
    [   18s] 
    [   18s] RPM build errors:
    [   18s]     Bad exit status from /var/tmp/rpm-tmp.TQwyLG (%check)
    [   18s] 
    [   18s] linux-edcv failed "build LiberTEM.spec" at Mon Apr 13 04:20:41 UTC 2020.

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,528
    Blog Entries
    15

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

    Quote Originally Posted by andythe_great View Post
    Hello, I am trying to build LiberTEM
    https://build.opensuse.org/package/s...great/LiberTEM

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

    Thanks

    Code:
    [   18s] Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.TQwyLG
    [   18s] + umask 022
    [   18s] + cd /home/abuild/rpmbuild/BUILD
    [   18s] + cd LiberTEM-0.4.1.1582046588.a196a51
    [   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 setup.py 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] 
    [   18s] 
    [   18s] RPM build errors:
    [   18s]     Bad exit status from /var/tmp/rpm-tmp.TQwyLG (%check)
    [   18s] 
    [   18s] linux-edcv failed "build LiberTEM.spec" at Mon Apr 13 04:20:41 UTC 2020.
    Hi
    Did you try %python3_exec
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    117

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

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Did you try %python3_exec
    Yes, but I got this.

    Code:
     Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.lhWAQO
    [   43s] + umask 022
    [   43s] + cd /home/abuild/rpmbuild/BUILD
    [   43s] + cd LiberTEM-0.4.1.1582046588.a196a51
    [   43s] + %python3_exec setup.py 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)

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,528
    Blog Entries
    15

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

    Quote Originally Posted by andythe_great View Post
    Yes, but I got this.

    Code:
     Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.lhWAQO
    [   43s] + umask 022
    [   43s] + cd /home/abuild/rpmbuild/BUILD
    [   43s] + cd LiberTEM-0.4.1.1582046588.a196a51
    [   43s] + %python3_exec setup.py 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)
    Hi
    Then just use /usr/bin/python3
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    117

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

    Thanks it work.

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •