File python-wrapper.spec of Package python-wrapper
#
# spec file for package python-wrapper
#
Name: python-wrapper
Version: 1.0
Release: 0
Summary: Compatibility symlink for /usr/bin/python
License: MIT
Group: Development/Languages/Python
BuildArch: noarch
# We need python3 to exist so we can link to it
Requires: python3
# Build Requirement (what puts the file in the build VM so 'ln' works)
BuildRequires: python3-base
# This is the magic line that satisfies the Ansible dependencies
Provides: /usr/bin/python
Provides: python = 3
Provides: python-unversioned-command
%description
This package creates the /usr/bin/python symlink pointing to /usr/bin/python3.
It exists solely to satisfy legacy dependencies that require the unversioned 'python' command.
%prep
%build
%install
mkdir -p %{buildroot}%{_bindir}
# Create the symlink python -> python3
ln -s /usr/bin/python3 %{buildroot}%{_bindir}/python
%files
%{_bindir}/python
%changelog