]>
Commit | Line | Data |
---|---|---|
4d51998b JR |
1 | diff -urNp -x '*.orig' Python-2.7.18.org/Lib/distutils/command/bdist_rpm.py Python-2.7.18/Lib/distutils/command/bdist_rpm.py |
2 | --- Python-2.7.18.org/Lib/distutils/command/bdist_rpm.py 2020-04-19 23:13:39.000000000 +0200 | |
3 | +++ Python-2.7.18/Lib/distutils/command/bdist_rpm.py 2021-09-26 12:34:38.927912757 +0200 | |
4 | @@ -338,6 +338,16 @@ class bdist_rpm (Command): | |
aa4fd056 JK |
5 | if self.rpm3_mode: |
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') | |
20 | ||
4d51998b | 21 | @@ -351,7 +361,7 @@ class bdist_rpm (Command): |
aa4fd056 JK |
22 | # list is empty) |
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) | |
29 | ||
4d51998b JR |
30 | diff -urNp -x '*.orig' Python-2.7.18.org/Lib/distutils/tests/test_bdist_rpm.py Python-2.7.18/Lib/distutils/tests/test_bdist_rpm.py |
31 | --- Python-2.7.18.org/Lib/distutils/tests/test_bdist_rpm.py 2020-04-19 23:13:39.000000000 +0200 | |
32 | +++ Python-2.7.18/Lib/distutils/tests/test_bdist_rpm.py 2021-09-26 12:34:38.927912757 +0200 | |
33 | @@ -54,6 +54,8 @@ class BuildRpmTestCase(support.TempdirMa | |
e7e84023 JK |
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') | |
39 | def test_quiet(self): | |
40 | # let's create a package | |
41 | tmp_dir = self.mkdtemp() | |
4d51998b | 42 | @@ -98,6 +100,8 @@ class BuildRpmTestCase(support.TempdirMa |
e7e84023 JK |
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): | |
4d51998b | 49 | # let's create a package that breaks bdist_rpm |
e7e84023 | 50 | tmp_dir = self.mkdtemp() |