Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Change shebangs with Tools/scripts/pathfix.py?

Open
#24 23 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start by reading the guide's existing shebang sections and inspect /usr/lib64/python3.6/Tools/scripts/pathfix.py, including its directory filename matching and direct-file behavior. Review the 23-comment discussion to determine whether the guide should recommend the example invocation or whether automatic RPM-build use is still in scope. Done means the chosen documentation scope is resolved and the relevant guide text reflects it.

Written by the indexing model from the issue text.

Description

enhancement

There is a script in /usr/lib64/python3.6/Tools/scripts/pathfix.py that changes shebangs. We may want to:

  • recommend that in the shebang sections of this guide
  • use it automagically in rpm builds to fix shebangs? (with similar logic to pybytecompile script)

I'm opening this here, because of the first above point. If we say we want to use this automatically, we can discuss this in some ML.

Example usage:

%install
...
%{python3_sitearch}/Tools/scripts/pathfix.py -i "%{__python3} -s" -p %{buildroot}%{_bindir}/*

Note: A small problem with this script is that it only converts files where the name matches r'^[a-zA-Z0-9_]+\.py$' when called on directory, but you can call it directly on files.

Dominant language
Python
Stars
4
Forks
4
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fedora-python/python-rpm-porting

All issues in fedora-python/python-rpm-porting

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.