%patch5 -p1
%patch6 -p1
+%{__rm} -r Modules/zlib
+%{__rm} -r Modules/expat
+
+for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx; do
+ %{__rm} -r Modules/_ctypes/$SUBDIR
+done
+
+files="md5module.c sha1module.c"
+%if !0%(pkg-config openssl --atleast-version=0.9.8; echo $?)
+files="$files sha256module.c sha512module.c"
+%endif
+for f in $files; do
+ %{__rm} Modules/$f
+done
+
%build
if false && ! grep -q "tmpfs" /proc/self/mounts; then
echo "You need to have /dev/shm mounted in order to build this package!" >&2
--with-dbmliborder=gdbm:bdb \
--with-wide-unicode \
--with-signal-module \
+%ifarch %{ix86} %{x8664} ppc ppc64
--with-tsc \
+%endif
--with-threads \
--with-doc-strings \
--with-fpectl \
+ --with-system-expat \
--with-system-ffi \
--with-computed-gotos \
LINKCC='$(PURIFY) $(CXX)' \
%attr(755,root,root) %{py_dyndir}/_socket.cpython-*.so
%attr(755,root,root) %{py_dyndir}/_ssl.cpython-*.so
%attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so
+
+# for openssl < 0.9.8 package sha256 and sha512 modules
+%if 0%(pkg-config openssl --atleast-version=0.9.8; echo $?)
+%attr(755,root,root) %{py_dyndir}/_sha256.cpython-*.so
+%attr(755,root,root) %{py_dyndir}/_sha512.cpython-*.so
+%endif
+
%attr(755,root,root) %{py_dyndir}/array.cpython-*.so
%attr(755,root,root) %{py_dyndir}/atexit.cpython-*.so
%attr(755,root,root) %{py_dyndir}/audioop.cpython-*.so