commit aa4fd05631d255bd7b66623aef44c6bee9c08f2c
Author: Jacek Konieczny <[email protected]>
Date:   Wed Dec 2 21:47:09 2015 +0100

    fix distutils test failing on bdist_rpm
    
    now only two 'broken' tests left

 python-bdist_rpm.patch | 29 +++++++++++++++++++++++++++++
 python.spec            |  8 ++++----
 2 files changed, 33 insertions(+), 4 deletions(-)
---
diff --git a/python.spec b/python.spec
index a13f8c3..cfedcb9 100644
--- a/python.spec
+++ b/python.spec
@@ -1,7 +1,5 @@
 #
 # TODO
-# - test_distutils fails for unknown reason: (does it still do with new lib64 
patch?)
-#   AssertionError: '/tmp/tmpaomC0l/installation/share/python' != 
'/tmp/tmpaomC0l/installation/lib/python'
 # - test_pydoc fails because of PYTHONPATH override
 # - change searchpath order so /usr/lib* is before /usr/share
 # - kill lib-tk from searchpath
@@ -21,7 +19,7 @@
 # tests which may fail because of builder environment limitations (no /proc or 
/dev/pts)
 %define                nobuilder_tests test_resource test_openpty test_socket 
test_nis test_posix test_locale test_pty test_urllib2
 # tests which fail because of some unknown/unresolved reason (this list should 
be empty)
-%define                broken_tests test_anydbm test_bsddb test_re test_shelve 
test_whichdb test_zipimport test_distutils test_pydoc test_file test_file2k 
test_gdb test_ioctl
+%define                broken_tests test_doctest test_pydoc
 
 %define        beta            %{nil}
 
@@ -44,7 +42,7 @@ Summary(tr.UTF-8):    X arayüzlü, yüksek düzeyli, kabuk 
yorumlayıcı dili
 Summary(uk.UTF-8):     Мова програмування дуже високого рівня з X-інтерфейсом
 Name:          python
 Version:       %{py_ver}.10
-Release:       6.2
+Release:       6.3
 Epoch:         1
 License:       PSF
 Group:         Development/Languages/Python
@@ -61,6 +59,7 @@ Patch4:               %{name}-verbose.patch
 Patch5:                %{name}-distro.patch
 Patch6:                %{name}-DNStests.patch
 Patch7:                %{name}-install_prefix.patch
+Patch8:                %{name}-bdist_rpm.patch
 URL:           http://www.python.org/
 BuildRequires: autoconf >= 2.65
 BuildRequires: automake
@@ -583,6 +582,7 @@ napisanego w Pythonie.
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 
 tar xjf %{SOURCE1}
 
diff --git a/python-bdist_rpm.patch b/python-bdist_rpm.patch
new file mode 100644
index 0000000..a154a35
--- /dev/null
+++ b/python-bdist_rpm.patch
@@ -0,0 +1,29 @@
+diff -dur Python-2.7.10.orig/Lib/distutils/command/bdist_rpm.py 
Python-2.7.10/Lib/distutils/command/bdist_rpm.py
+--- Python-2.7.10.orig/Lib/distutils/command/bdist_rpm.py      2015-05-23 
18:09:01.000000000 +0200
++++ Python-2.7.10/Lib/distutils/command/bdist_rpm.py   2015-12-02 
21:32:28.137323794 +0100
+@@ -338,6 +338,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')
+ 
+@@ -351,7 +361,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)
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python.git/commitdiff/aa4fd05631d255bd7b66623aef44c6bee9c08f2c

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to