forked from pld-linux/python3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython3-bdist_rpm.patch
More file actions
29 lines (27 loc) · 1.52 KB
/
python3-bdist_rpm.patch
File metadata and controls
29 lines (27 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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)