#25 Unset -s from python shebang
Merged 3 years ago by churchyard. Opened 3 years ago by mattia.
Unknown source master  into  master

file modified
+8 -1
@@ -4,6 +4,9 @@

  # Also, we don't have all the tests requirements

  %bcond_without tests

  

+ # Unset -s on python shebang to allow RPM-installed sphinx to be used

+ # with user-installed modules (#1903763)

+ %global py3_shebang_flags %nil

  

  # No internet in Koji

  %bcond_with internet
@@ -25,7 +28,7 @@

  #global     prerel ...

  %global     upstream_version %{general_version}%{?prerel}

  Version:    %{general_version}%{?prerel:~%{prerel}}

- Release:    1%{?dist}

+ Release:    2%{?dist}

  Epoch:      1

  Summary:    Python documentation generator

  
@@ -360,6 +363,10 @@

  

  

  %changelog

+ * Sat Dec 05 2020 Mattia Verga <mattia.verga@protonmail.com> - 1:3.3.1-2

+ - Unset -s from python shebang

+ - Fixes: rhbz#1903763

+ 

  * Mon Nov 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1:3.3.1-1

  - Update to 3.3.1

  - Fixes: rhbz#1893752

Allow using RPM-installed sphinx to be used to generate docs for user-installed modules. See rhbz#1903763

CI failed because this line is not valid, it should be %global py3_shebang_flags %nil.

rebased onto daad131

3 years ago

Something is wrong with %py3_shebang_fix:

+ /usr/bin/pathfix3.9.py -pni /usr/bin/python3 -ka /builddir/build/BUILDROOT/python-sphinx-3.3.1-2.fc34.x86_64/usr/bin/sphinx-apidoc /builddir/build/BUILDROOT/python-sphinx-3.3.1-2.fc34.x86_64/usr/bin/sphinx-autogen /builddir/build/BUILDROOT/python-sphinx-3.3.1-2.fc34.x86_64/usr/bin/sphinx-build /builddir/build/BUILDROOT/python-sphinx-3.3.1-2.fc34.x86_64/usr/bin/sphinx-quickstart
...
+ /usr/lib/rpm/check-buildroot
/builddir/build/BUILDROOT/python-sphinx-3.3.1-2.fc34.x86_64/usr/bin/sphinx-build:#! /usr/bin/python3 -/builddir/build/BUILDROOT/python-sphinx-3.3.1-2.fc34.x86_64/usr/bin/sphinx-apidoc
/builddir/build/BUILDROOT/python-sphinx-3.3.1-2.fc34.x86_64/usr/bin/sphinx-quickstart:#! /usr/bin/python3 -/builddir/build/BUILDROOT/python-sphinx-3.3.1-2.fc34.x86_64/usr/bin/sphinx-apidoc
/builddir/build/BUILDROOT/python-sphinx-3.3.1-2.fc34.x86_64/usr/bin/sphinx-autogen:#! /usr/bin/python3 -/builddir/build/BUILDROOT/python-sphinx-3.3.1-2.fc34.x86_64/usr/bin/sphinx-apidoc
Found '/builddir/build/BUILDROOT/python-sphinx-3.3.1-2.fc34.x86_64' in installed files; aborting

I got it. There is nothing passed as a value to -a, hence the first argument is used.

%undefine py3_shebang_flags is the way to do this change here and we need to make sure it's documented as such.

Other solution is to rewrite %py3_shebang_fix to make sure it works reliably with both %{nil} and undefined.

I've tested the above build made after the python-rpm-macros update and it fixes the rhbz issue.

Pull-Request has been merged by churchyard

3 years ago