You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
Welcome to the Python RPM Porting Guide
13
13
=======================================
14
14
15
-
This document aims to guide you through the process of porting your Python 2 Fedora package to Python 3.
15
+
This document aims to guide you through the process of porting your Python 2 RPM package to Python 3.
16
16
17
17
.. note::
18
18
If you struggle with the porting of your package and would like help or more information, please contact us at the `python-devel mailing list`_ (also accessible through a `web interface`_) and we will try to help you and/or improve the guide accordingly.
Copy file name to clipboardExpand all lines: subsections/h3-shebangs.inc
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -42,13 +42,13 @@ To change the shebangs in the files you can use one (or a combination) of the fo
42
42
.. code-block:: console
43
43
44
44
$ # Change shebang in individual files
45
-
$ sed -i '1s_^#!/usr/bin/\(python\|env python\)_#!%{__python3}_' path/to/file1 file2 file3 ...
45
+
$ sed -i '1s=^#!/usr/bin/\(python\|env python\)=#!%{__python3}=' path/to/file1 file2 file3 ...
46
46
47
47
$ # Change shebang in all relevant files in this directory and all subdirectories
48
-
$ # See `man find` for how the `-exec command ;` syntax works
49
-
$ find . -type f -exec sed -i '1s_^#!/usr/bin/\(python\|env python\)_#!%{__python3}_' {} \;
48
+
$ # See `man find` for how the `-exec command {} +` syntax works
49
+
$ find -type f -exec sed -i '1s=^#!/usr/bin/\(python\|env python\)=#!%{__python3}=' {} +
50
50
51
51
$ # Change shebang in all relevant executable files in this directory and all subdirectories
52
-
$ find . -type f -executable -exec sed -i '1s_^#!/usr/bin/\(python\|env python\)_#!%{__python3}_' {} \;
52
+
$ find -type f -executable -exec sed -i '1s=^#!/usr/bin/\(python\|env python\)=#!%{__python3}=' {} +
53
53
54
54
You don't have to worry about accidentally corrupting other files as these scripts will only change a fileif the beginning of its first line exactly matches one of the two aforementioned shebangs.
0 commit comments