Skip to content

Commit

Permalink
Allow %py3_shebang_fix macro to add -P argument to shebang lines
Browse files Browse the repository at this point in the history
There was a bug in dnf and dnf-automatic that caused traceback
when running the Python interpreter with the `-P` argument.
Since the bug has been fixed, the `-P` argument can be used.
  • Loading branch information
jrohel authored and ppisar committed Apr 29, 2024
1 parent c8dbe6e commit 22fc33c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions dnf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,6 @@ rm %{buildroot}%{_mandir}/man5/%{name}.conf.5*
%endif

%if 0%{?fedora} >= 41 || 0%{?rhel} >= 10
# Don't add -P to Python shebangs
# The executable Python scripts import each other
%undefine _py3_shebang_P

%py3_shebang_fix %{buildroot}%{_bindir}/dnf-3
%py3_shebang_fix %{buildroot}%{_bindir}/dnf-automatic
%py3_shebang_fix %{buildroot}%{python3_sitelib}/%{name}/cli/completion_helper.py
Expand Down

0 comments on commit 22fc33c

Please sign in to comment.