fedora-python / fedora-python/python-rpm-porting

Change shebangs with Tools/scripts/pathfix.py?

Ouverte
#24 23 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Python
Étoiles
4
Forks
4
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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:

```spec
%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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.