Accepting request 222289 from devel:languages:python3

- Add pycompile-searchpath.patch: clean up search path in py-compile
  script (fixes build on py3.4)

- Add pycompile-searchpath.patch: clean up search path in py-compile
  script (fixes build on py3.4)

OBS-URL: https://build.opensuse.org/request/show/222289
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/python-gobject?expand=0&rev=25
This commit is contained in:
Dominique Leuenberger 2014-02-20 19:59:45 +00:00 committed by Git OBS Bridge
parent bf87ea8a49
commit de91ee86ee
5 changed files with 47 additions and 2 deletions

View File

@ -0,0 +1,29 @@
Index: pygobject-3.10.2/py-compile
===================================================================
--- pygobject-3.10.2/py-compile 2013-11-11 14:36:41.000000000 +0100
+++ pygobject-3.10.2/py-compile 2014-02-13 15:52:46.990468006 +0100
@@ -116,7 +116,11 @@
fi
$PYTHON -c "
-import sys, os, py_compile, imp
+import sys
+# when this runs interactively, '' (cwd) is in sys.path. we don't want that.
+sys.path.remove('')
+
+import os, py_compile, imp
files = '''$files'''
@@ -137,7 +141,10 @@
# this will fail for python < 1.5, but that doesn't matter ...
$PYTHON -O -c "
-import sys, os, py_compile, imp
+import sys
+# when this runs interactively, '' (cwd) is in sys.path. we don't want that.
+sys.path.remove('')
+import os, py_compile, imp
# pypy does not use .pyo optimization
if hasattr(sys, 'pypy_translation_info'):

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Feb 13 14:57:57 UTC 2014 - jmatejek@suse.com
- Add pycompile-searchpath.patch: clean up search path in py-compile
script (fixes build on py3.4)
-------------------------------------------------------------------
Mon Nov 11 21:24:59 UTC 2013 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package python-gobject
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -41,6 +41,7 @@ Version: 3.10.2
Release: 0
Url: http://ftp.gnome.org/pub/GNOME/sources/pygobject/
Source: http://download.gnome.org/sources/pygobject/3.10/%{_name}-%{version}.tar.xz
Patch1: pycompile-searchpath.patch
BuildRequires: fdupes
BuildRequires: glib2-devel >= 2.35.9
BuildRequires: gobject-introspection-devel >= 1.35.9
@ -102,6 +103,7 @@ addon libraries such as pygtk.
%prep
%setup -q -n %{_name}-%{version}
%patch1 -p1
%build
%if %{build_for_python3}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Feb 13 14:57:57 UTC 2014 - jmatejek@suse.com
- Add pycompile-searchpath.patch: clean up search path in py-compile
script (fixes build on py3.4)
-------------------------------------------------------------------
Mon Nov 11 21:24:59 UTC 2013 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package python3-gobject
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -41,6 +41,7 @@ Version: 3.10.2
Release: 0
Url: http://ftp.gnome.org/pub/GNOME/sources/pygobject/
Source: http://download.gnome.org/sources/pygobject/3.10/%{_name}-%{version}.tar.xz
Patch1: pycompile-searchpath.patch
BuildRequires: fdupes
BuildRequires: glib2-devel >= 2.35.9
BuildRequires: gobject-introspection-devel >= 1.35.9
@ -102,6 +103,7 @@ addon libraries such as pygtk.
%prep
%setup -q -n %{_name}-%{version}
%patch1 -p1
%build
%if %{build_for_python3}