From d819cca723a45fd84ff051bddab293f5492b83ec Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Jul 30 2018 10:07:28 +0000 Subject: Add __init__.py to PyQt5 module directories, to make private PyQt5 sip modules importable --- diff --git a/mingw-sip.spec b/mingw-sip.spec index a1004fd..bfb223a 100644 --- a/mingw-sip.spec +++ b/mingw-sip.spec @@ -17,7 +17,7 @@ Name: mingw-%{pkgname} Summary: MinGW Windows SIP Version: 4.19.12 -Release: 2%{?pre:.%pre}%{?dist} +Release: 3%{?pre:.%pre}%{?dist} # sipgen/parser.{c.h} is GPLv3+ with exceptions (bison) License: GPLv2 or GPLv3 and (GPLv3+ with exceptions) @@ -183,6 +183,13 @@ mkdir -p %{buildroot}%{_bindir} ln -s %{_prefix}/%{mingw32_target}/bin/sip %{buildroot}%{_bindir}/mingw32-sip ln -s %{_prefix}/%{mingw64_target}/bin/sip %{buildroot}%{_bindir}/mingw64-sip +# Add __init__.py to PyQt5 module directories, to make private PyQt5 sip modules importable +touch %{buildroot}%{_prefix}/%{mingw32_target}/lib/python2.7/site-packages/PyQt5/__init__.py +touch %{buildroot}%{_prefix}/%{mingw64_target}/lib/python2.7/site-packages/PyQt5/__init__.py +touch %{buildroot}%{mingw32_python2_sitearch}/PyQt5 +touch %{buildroot}%{mingw64_python2_sitearch}/PyQt5 + + # Exclude debug files from the main files (note: the debug files are only created after %%install, so we can't search for them directly) find %{buildroot}%{mingw32_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw32-python2-%{pkgname}.debugfiles find %{buildroot}%{mingw64_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw64-python2-%{pkgname}.debugfiles @@ -222,6 +229,9 @@ find %{buildroot}%{mingw64_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{build %changelog +* Mon Jul 30 2018 Sandro Mani - 4.19.12-3 +- Add __init__.py to PyQt5 module directories, to make private PyQt5 sip modules importable + * Sun Jul 29 2018 Sandro Mani - 4.19.12-2 - Rename mingw{32,64}-sip to mingw{32,64}-python2-sip - Add PyQt5 private sip modules (Sigh...)