Add unpack_wafdir.py (rhbz#1509550).

epel8
Thomas Moschny 7 years ago
parent 5ce22b359c
commit f38e89c140

@ -0,0 +1,16 @@
import os
import sys
src = os.path.abspath('waf')
dst = os.path.abspath(sys.argv[1])
sys.dont_write_bytecode = True
try:
from importlib.machinery import SourceFileLoader
waf = SourceFileLoader('waf', src).load_module()
except ImportError:
import imp
waf = imp.load_source('waf', src)
waf.unpack_wafdir(dst, src)

@ -28,6 +28,7 @@ URL: https://waf.io/
# - docs/book, licensed CC BY-NC-ND
# - Waf logos, licensed CC BY-NC
Source: waf-%{version}.stripped.tar.bz2
Source1: unpack_wafdir.py
Patch0: waf-1.8.11-libdir.patch
Patch1: waf-1.6.9-logo.patch
Patch2: waf-1.8.11-sphinx-no-W.patch
@ -139,23 +140,18 @@ popd
%install
# use waf so it unpacks itself
mkdir _temp ; pushd _temp
cp -av ../waf .
%{__python2} ./waf >/dev/null 2>&1
pushd .waf-%{version}-*
%{__python2} %{S:1} _temp
pushd _temp
find . -name '*.py' -printf '%%P\0' |
xargs -0 -I{} install -m 0644 -p -D {} %{buildroot}%{_datadir}/waf/{}
popd
%if 0%{?with_python3}
# use waf so it unpacks itself
%{__python3} ./waf >/dev/null 2>&1
pushd .waf3-%{version}-*
%{__python3} %{S:1} _temp3
pushd _temp3
find . -name '*.py' -printf '%%P\0' |
xargs -0 -I{} install -m 0644 -p -D {} %{buildroot}%{_datadir}/waf3/{}
popd
%endif # with_python3
popd
# install the frontend
install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf-%{python2_version}
@ -248,6 +244,8 @@ rm -f docs/sphinx/build/html/.buildinfo
%changelog
* Fri Jul 20 2018 Thomas Moschny <thomas.moschny@gmx.de> - 1.9.14-2
- Spec file cleanups.
- Add unpack_wafdir.py (rhbz#1509550).
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.14-1.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

Loading…
Cancel
Save