mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Potential fix for amazon linux's rpm doing something strange with the python_sitelib macro #12166
This commit is contained in:
parent
718812d945
commit
fab0e49f31
1 changed files with 11 additions and 0 deletions
|
@ -93,6 +93,17 @@ are transferred to managed machines automatically.
|
|||
|
||||
%install
|
||||
%{__python} setup.py install -O1 --prefix=%{_prefix} --root=%{buildroot}
|
||||
|
||||
# Amazon Linux doesn't install to dist-packages but python_sitelib expands to
|
||||
# that location and the python interpreter expects things to be there.
|
||||
if expr x'%{python_sitelib}' : 'x.*dist-packages/\?' ; then
|
||||
DEST_DIR='%{buildroot}%{python_sitelib}'
|
||||
SOURCE_DIR=$(echo "$DEST_DIR" | sed 's/dist-packages/site-packages/g')
|
||||
if test -d "$SOURCE_DIR" -a ! -d "$DEST_DIR" ; then
|
||||
mv $SOURCE_DIR $DEST_DIR
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p %{buildroot}/etc/ansible/
|
||||
cp examples/hosts %{buildroot}/etc/ansible/
|
||||
cp examples/ansible.cfg %{buildroot}/etc/ansible/
|
||||
|
|
Loading…
Reference in a new issue