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

Change shebangs with Tools/scripts/pathfix.py?

Đang mở
#24 23 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
4
Fork
4
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.