1 diff -dur Python-2.7.10.orig/Lib/distutils/command/bdist_rpm.py Python-2.7.10/Lib/distutils/command/bdist_rpm.py
2 --- Python-2.7.10.orig/Lib/distutils/command/bdist_rpm.py 2015-05-23 18:09:01.000000000 +0200
3 +++ Python-2.7.10/Lib/distutils/command/bdist_rpm.py 2015-12-03 09:23:08.000000000 +0100
6 rpm_cmd.extend(['--define',
7 '_topdir %s' % os.path.abspath(self.rpm_base)])
8 + rpm_cmd.extend(['--define',
9 + '_specdir %s/SPECS' % os.path.abspath(self.rpm_base)])
10 + rpm_cmd.extend(['--define',
11 + '_sourcedir %s/SOURCES' % os.path.abspath(self.rpm_base)])
12 + rpm_cmd.extend(['--define',
13 + '_builddir %s/BUILD' % os.path.abspath(self.rpm_base)])
14 + rpm_cmd.extend(['--define',
15 + '_rpmdir %s/RPMS' % os.path.abspath(self.rpm_base)])
16 + rpm_cmd.extend(['--define',
17 + '_srcrpmdir %s/SRPMS' % os.path.abspath(self.rpm_base)])
18 if not self.keep_temp:
19 rpm_cmd.append('--clean')
23 nvr_string = "%{name}-%{version}-%{release}"
24 src_rpm = nvr_string + ".src.rpm"
25 - non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm"
26 + non_src_rpm = nvr_string + ".%{arch}.rpm"
27 q_cmd = r"rpm -q --qf '%s %s\n' --specfile '%s'" % (
28 src_rpm, non_src_rpm, spec_path)
30 diff -dur Python-2.7.10.orig/Lib/distutils/tests/test_bdist_rpm.py Python-2.7.10/Lib/distutils/tests/test_bdist_rpm.py
31 --- Python-2.7.10.orig/Lib/distutils/tests/test_bdist_rpm.py 2015-05-23 18:09:02.000000000 +0200
32 +++ Python-2.7.10/Lib/distutils/tests/test_bdist_rpm.py 2015-12-03 09:24:55.000000000 +0100
34 'the rpm command is not found')
35 @unittest.skipIf(find_executable('rpmbuild') is None,
36 'the rpmbuild command is not found')
37 + @unittest.skipIf(os.environ.get("WITHIN_PYTHON_RPM_BUILD"),
38 + 'building the python rpm')
40 # let's create a package
41 tmp_dir = self.mkdtemp()
43 'the rpm command is not found')
44 @unittest.skipIf(find_executable('rpmbuild') is None,
45 'the rpmbuild command is not found')
46 + @unittest.skipIf(os.environ.get("WITHIN_PYTHON_RPM_BUILD"),
47 + 'building the python rpm')
48 def test_no_optimize_flag(self):
49 # let's create a package that brakes bdist_rpm
50 tmp_dir = self.mkdtemp()