From 572e2465f914d1c82a416005af9a17cba914d0c6 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Thu, 3 Dec 2015 18:16:33 +0100 Subject: [PATCH] Fix distutils bdist_rpm and its test --- python3-bdist_rpm.patch | 29 +++++++++++++++++++++++++++++ python3.spec | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 python3-bdist_rpm.patch diff --git a/python3-bdist_rpm.patch b/python3-bdist_rpm.patch new file mode 100644 index 0000000..4579c97 --- /dev/null +++ b/python3-bdist_rpm.patch @@ -0,0 +1,29 @@ +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) + diff --git a/python3.spec b/python3.spec index 22a13b2..40e8b15 100644 --- a/python3.spec +++ b/python3.spec @@ -51,6 +51,7 @@ Patch6: python-distro.patch 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 @@ -475,6 +476,7 @@ Moduły testowe dla Pythona. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 %{__rm} -r Modules/zlib %{__rm} -r Modules/expat -- 2.44.0