[python3-cairo] Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

Bohuslav Kabrda bkabrda at fedoraproject.org
Mon May 12 10:58:18 UTC 2014


commit 37427e5ef21fdc29ed0cbf516a5488a9f9f0b52f
Author: Slavek Kabrda <bkabrda at redhat.com>
Date:   Mon May 12 12:49:18 2014 +0200

    Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
    
    - Fixed bundled waf to work correctly with python3.4-config

 cairo-waf-use-python-config-as-shell-script.patch |   11 +++++++++++
 python3-cairo.spec                                |   14 ++++++++++++--
 2 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/cairo-waf-use-python-config-as-shell-script.patch b/cairo-waf-use-python-config-as-shell-script.patch
new file mode 100644
index 0000000..b8cd856
--- /dev/null
+++ b/cairo-waf-use-python-config-as-shell-script.patch
@@ -0,0 +1,11 @@
+--- .waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Tools/python.py.orig	2014-05-12 12:36:46.776004776 +0200
++++ .waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Tools/python.py	2014-05-12 12:36:53.994995779 +0200
+@@ -169,7 +169,7 @@
+ 		conf.find_program('python-config-%s'%num,var='PYTHON_CONFIG',mandatory=False)
+ 	includes=[]
+ 	if conf.env.PYTHON_CONFIG:
+-		for incstr in conf.cmd_and_log(conf.env.PYTHON+[conf.env.PYTHON_CONFIG,'--includes']).strip().split():
++		for incstr in conf.cmd_and_log([conf.env.PYTHON_CONFIG,'--includes']).strip().split():
+ 			if(incstr.startswith('-I')or incstr.startswith('/I')):
+ 				incstr=incstr[2:]
+ 			if incstr not in includes:
diff --git a/python3-cairo.spec b/python3-cairo.spec
index 644be1b..04e156d 100644
--- a/python3-cairo.spec
+++ b/python3-cairo.spec
@@ -4,13 +4,16 @@
 
 Name: python3-cairo
 Version: 1.10.0
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: MPLv1.1 or LGPLv2
 Group: Development/Languages
 Summary: Python 3 bindings for the cairo library
 URL: http://cairographics.org/pycairo
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Source: http://cairographics.org/releases/pycairo-%{version}.tar.bz2
+# Since Python 3.4, pythonX.Y-config is shell script, not Python script,
+#  so prevent waf from trying to invoke it as a Python script
+Patch0: cairo-waf-use-python-config-as-shell-script.patch
 
 ### Build Dependencies ###
 
@@ -42,6 +45,8 @@ libraries so that they interoperate with python3-cairo.
 #    .waf3-1.5.18-a7b91e2a913ce55fa6ecdf310df95752
 python3 ./waf --version
 
+%patch0 -p0
+
 %build
 # FIXME: we should be using the system version of waf (e.g. %{_bindir}/waf)
 #        however it is not yet python 3 compatible but should be when 1.6.0
@@ -52,7 +57,8 @@ python3 ./waf --prefix=%{_usr} \
               --libdir=%{_libdir} \
               configure
 
-python3 ./waf build -v
+# do not fail on utf-8 encoded files
+LANG=en_US.utf8 python3 ./waf build -v
 
 # remove executable bits from examples
 find ./examples/ -type f -print0 | xargs -0 chmod -x
@@ -83,6 +89,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/py3cairo.pc
 
 %changelog
+* Mon May 12 2014 Bohuslav Kabrda <bkabrda at redhat.com> - 1.10.0-7
+- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
+- Fixed bundled waf to work correctly with python3.4-config
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.10.0-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list