]> git.pld-linux.org Git - packages/python.git/blame - python-bdist_rpm.patch
skip bdist_rpm tests
[packages/python.git] / python-bdist_rpm.patch
CommitLineData
aa4fd056
JK
1diff -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
e7e84023 3+++ Python-2.7.10/Lib/distutils/command/bdist_rpm.py 2015-12-03 09:23:08.000000000 +0100
aa4fd056
JK
4@@ -338,6 +338,16 @@
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
21@@ -351,7 +361,7 @@
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
e7e84023
JK
30diff -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
33@@ -48,6 +48,8 @@
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()
42@@ -91,6 +93,8 @@
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()
This page took 0.15946 seconds and 4 git commands to generate.