--- /dev/null
+diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/bdist_rpm.py Python-3.5.0/Lib/distutils/command/bdist_rpm.py
+--- Python-3.5.0.orig/Lib/distutils/command/bdist_rpm.py 2015-09-13 13:41:20.000000000 +0200
++++ Python-3.5.0/Lib/distutils/command/bdist_rpm.py 2015-12-03 18:14:59.483958511 +0100
+@@ -324,6 +324,16 @@
+ if self.rpm3_mode:
+ rpm_cmd.extend(['--define',
+ '_topdir %s' % os.path.abspath(self.rpm_base)])
++ rpm_cmd.extend(['--define',
++ '_specdir %s/SPECS' % os.path.abspath(self.rpm_base)])
++ rpm_cmd.extend(['--define',
++ '_sourcedir %s/SOURCES' % os.path.abspath(self.rpm_base)])
++ rpm_cmd.extend(['--define',
++ '_builddir %s/BUILD' % os.path.abspath(self.rpm_base)])
++ rpm_cmd.extend(['--define',
++ '_rpmdir %s/RPMS' % os.path.abspath(self.rpm_base)])
++ rpm_cmd.extend(['--define',
++ '_srcrpmdir %s/SRPMS' % os.path.abspath(self.rpm_base)])
+ if not self.keep_temp:
+ rpm_cmd.append('--clean')
+
+@@ -337,7 +347,7 @@
+ # list is empty)
+ nvr_string = "%{name}-%{version}-%{release}"
+ src_rpm = nvr_string + ".src.rpm"
+- non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm"
++ non_src_rpm = nvr_string + ".%{arch}.rpm"
+ q_cmd = r"rpm -q --qf '%s %s\n' --specfile '%s'" % (
+ src_rpm, non_src_rpm, spec_path)
+
Patch7: %{name}-db.patch
Patch8: %{name}-install_prefix.patch
Patch9: %{name}-tests_with_pythonpath.patch
+Patch10: %{name}-bdist_rpm.patch
URL: http://www.python.org/
BuildRequires: autoconf >= 2.65
BuildRequires: automake
%patch7 -p1
%patch8 -p1
%patch9 -p1
+%patch10 -p1
%{__rm} -r Modules/zlib
%{__rm} -r Modules/expat