Skip to content

Commit dd486ec

Browse files
committed
Application-Module; Install section: Switched to using rm *.
1 parent 61de129 commit dd486ec

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

application-modules.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,13 @@ As we will be including the executable (application) only in the Python 3 subpac
4646

4747
First, in the same manner as in the preceding `%build`_ section, it is advisable to upgrade the current Python 2 install command to use the new ``%py2_install`` macro, however, if that doesn't work for you, you can stick with the current install command, just make sure it's invoked by the ``%{__python2}`` macro.
4848

49-
After the Python 2 install macro is run, it is likely going to install the Python 2 version of the application. As we want to package only the Python 3 version of the application, we have to remove the Python 2 executable so that the Python 3 version can take its place afterwards.
49+
After the Python 2 install macro is run, it is likely going to install the Python 2 version of the application. As we want to package only the Python 3 version of the application, we have to remove the Python 2 executable(s) that were installed into ``/usr/bin/`` so that the Python 3 version(s) can take their place afterwards.
5050

5151
.. code-block:: spec
5252
5353
%install
5454
%py2_install
55-
rm %{buildroot}%{_bindir}/sample-exec
56-
57-
The ``%{buildroot}`` macro points to where the build root is being assembled, and ``%{_bindir}`` is a handy macro that substitutes to ``/usr/bin/``. If the package installs multiple executables, be sure to remove each and every one of them.
55+
rm %{buildroot}%{_bindir}/*
5856
5957
After that, add the corresponding Python 3 install command, which will be either the custom command prefixed by ``%{__python3}`` or the new ``%py3_install`` macro.
6058

specs/application-module.spec

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ A Python tool which provides a convenient example.
5252

5353
# The Python 2 installation process will likely try to install its own version
5454
# of the application. As we only want to package the Python 3 version of the
55-
# application, we delete the Python 2 executable so that the Python 3 version
56-
# can take it's place afterwards. In case of multiple executables being
57-
# installed, remove each and every one.
58-
rm %{buildroot}%{_bindir}/sample-exec
55+
# application, we delete the Python 2 executable(s) so that the Python 3
56+
# version(s) can take their place afterwards.
57+
rm %{buildroot}%{_bindir}/*
5958

6059
%py3_install
6160

0 commit comments

Comments
 (0)