From 6449546d674ceef22dbcb9089bcd15556e8c3a24a9528e595ce96f8f891e028e Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Tue, 31 Jul 2012 12:36:53 +0000 Subject: [PATCH 1/2] - all subpackages require python-base=%{version}-%{release} explicitly (fixes bnc#766778 bug and similar that might arise in the future) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=124 --- python-base.changes | 6 ++++++ python-base.spec | 4 ++-- python.spec | 12 ++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/python-base.changes b/python-base.changes index 861cf01..161d77f 100644 --- a/python-base.changes +++ b/python-base.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jul 31 12:36:04 UTC 2012 - jmatejek@suse.com + +- all subpackages require python-base=%{version}-%{release} explicitly + (fixes bnc#766778 bug and similar that might arise in the future) + ------------------------------------------------------------------- Tue Jun 26 11:54:22 UTC 2012 - dvaleev@suse.com diff --git a/python-base.spec b/python-base.spec index fcea7b6..7a6ac37 100644 --- a/python-base.spec +++ b/python-base.spec @@ -79,7 +79,7 @@ modules that would pull in extra dependencies. Summary: Include Files and Libraries Mandatory for Building Python Modules Group: Development/Languages/Python Requires: glibc-devel -Requires: python-base = %{version} +Requires: python-base = %{version}-%{release} %description -n python-devel The Python programming language's interpreter can be extended with @@ -92,7 +92,7 @@ embedding Python in applications. %package -n python-xml Summary: A Python XML Interface Group: Development/Libraries/Python -Requires: python-base = %{version} +Requires: python-base = %{version}-%{release} # pyxml used to live out of tree Provides: pyxml = 0.8.5 Obsoletes: pyxml < 0.8.5 diff --git a/python.spec b/python.spec index 920e44c..c2d8741 100644 --- a/python.spec +++ b/python.spec @@ -70,7 +70,7 @@ BuildRequires: tk-devel BuildRequires: xorg-x11-devel %define python_version %(echo %{tarversion} | head -c 3) %define idle_name idle -Requires: python-base = %{version} +Requires: python-base = %{version}-%{release} Provides: %{name} = %{python_version} Obsoletes: python-elementtree Obsoletes: python-nothreads @@ -94,7 +94,7 @@ install python-devel package. %package idle Summary: An Integrated Development Environment for Python Group: Development/Languages/Python -Requires: python-base = %{version} +Requires: python-base = %{version}-%{release} Requires: python-tk %description idle @@ -106,7 +106,7 @@ a debugger. %package demo Summary: Python Demonstration Scripts Group: Development/Languages/Python -Requires: python-base = %{version} +Requires: python-base = %{version}-%{release} Provides: pyth_dmo Obsoletes: pyth_dmo @@ -117,7 +117,7 @@ programs that are useful for building or extending Python. %package tk Summary: TkInter - Python Tk Interface Group: Development/Libraries/Python -Requires: python-base = %{version} +Requires: python-base = %{version}-%{release} Provides: pyth_tk Provides: pyth_tkl Provides: python-tkinter @@ -136,7 +136,7 @@ Python interface to Tk. Tk is the GUI toolkit that comes with Tcl. The %package curses Summary: Python Interface to the (N)Curses Library Group: Development/Libraries/Python -Requires: python-base = %{version} +Requires: python-base = %{version}-%{release} Obsoletes: pyth_cur Provides: pyth_cur @@ -147,7 +147,7 @@ Console User Interface. %package gdbm Summary: Python Interface to the GDBM Library Group: Development/Libraries/Python -Requires: python-base = %{version} +Requires: python-base = %{version}-%{release} Obsoletes: pygdmod Provides: pygdmod From a5bf6b85c97ac4b95c3b98032a4926b2758c5558fe592f9c3cb760b7bcd62c48 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Mon, 6 Aug 2012 16:21:50 +0000 Subject: [PATCH 2/2] Accepting request 129866 from home:dimstar:branches:devel:languages:python:Factory gettext: also find locale files in /usr/share/bundle-locale. Fixes issues like bnc#617751, where bundle-lang-gnome- is installed, provides the .mo file, yet the python app does not translate. Installing -lang would solve the issues, but would work against our bundle-lang package strategy... suggestive, this should also be ported to 12.2 OBS-URL: https://build.opensuse.org/request/show/129866 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=125 --- python-base.changes | 7 +++++++ python-base.spec | 3 +++ python-bundle-lang.patch | 23 +++++++++++++++++++++++ python-doc.spec | 3 +++ python.spec | 3 +++ 5 files changed, 39 insertions(+) create mode 100644 python-bundle-lang.patch diff --git a/python-base.changes b/python-base.changes index 161d77f..bd9fb1b 100644 --- a/python-base.changes +++ b/python-base.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Aug 3 18:43:32 UTC 2012 - dimstar@opensuse.org + +- Add python-bundle-lang.patch: gettext: If bindtextdomain is + instructed to look in the default location of translations, we + check additionally in locale-bundle. Fixes issues like bnc#617751 + ------------------------------------------------------------------- Tue Jul 31 12:36:04 UTC 2012 - jmatejek@suse.com diff --git a/python-base.spec b/python-base.spec index 7a6ac37..d2c5bc1 100644 --- a/python-base.spec +++ b/python-base.spec @@ -51,6 +51,8 @@ Patch17: remove-static-libpython.diff # PATCH-FIX-OPENSUSE python-2.7.3-ssl_ca_path.patch [bnc#761501] -- Support directory-based certificate stores with the ca_certs parameter of SSL functions Patch18: python-2.7.3-ssl_ca_path.patch Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch +# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar@opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle. +Patch20: python-bundle-lang.patch # COMMON-PATCH-END %define python_version %(echo %{tarversion} | head -c 3) BuildRequires: automake @@ -138,6 +140,7 @@ other applications. %patch17 %patch18 %patch19 -p1 +%patch20 -p1 # COMMON-PREP-END # drop Autoconf version requirement diff --git a/python-bundle-lang.patch b/python-bundle-lang.patch new file mode 100644 index 0000000..f92f8fa --- /dev/null +++ b/python-bundle-lang.patch @@ -0,0 +1,23 @@ +Index: Python-2.7.3/Lib/gettext.py +=================================================================== +--- Python-2.7.3.orig/Lib/gettext.py ++++ Python-2.7.3/Lib/gettext.py +@@ -56,6 +56,7 @@ __all__ = ['NullTranslations', 'GNUTrans + ] + + _default_localedir = os.path.join(sys.prefix, 'share', 'locale') ++_default_bundlelocaledir = os.path.join(sys.prefix, 'share', 'locale-bundle') + + + def test(condition, true, false): +@@ -420,6 +421,10 @@ class GNUTranslations(NullTranslations): + + # Locate a .mo file using the gettext strategy + def find(domain, localedir=None, languages=None, all=0): ++ if localedir in [None, _default_localedir]: ++ bundle = find(domain, localedir=_default_bundlelocaledir, languages=languages, all=all) ++ if len(bundle): ++ return bundle + # Get some reasonable defaults for arguments that were not supplied + if localedir is None: + localedir = _default_localedir diff --git a/python-doc.spec b/python-doc.spec index ef69e11..249682c 100644 --- a/python-doc.spec +++ b/python-doc.spec @@ -47,6 +47,8 @@ Patch17: remove-static-libpython.diff # PATCH-FIX-OPENSUSE python-2.7.3-ssl_ca_path.patch [bnc#761501] -- Support directory-based certificate stores with the ca_certs parameter of SSL functions Patch18: python-2.7.3-ssl_ca_path.patch Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch +# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar@opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle. +Patch20: python-bundle-lang.patch # COMMON-PATCH-END Provides: pyth_doc Provides: pyth_ps @@ -95,6 +97,7 @@ Python, and Macintosh Module Reference in PDF format. %patch17 %patch18 %patch19 -p1 +%patch20 -p1 # COMMON-PREP-END %build diff --git a/python.spec b/python.spec index c2d8741..1b0f5b4 100644 --- a/python.spec +++ b/python.spec @@ -55,6 +55,8 @@ Patch17: remove-static-libpython.diff # PATCH-FIX-OPENSUSE python-2.7.3-ssl_ca_path.patch [bnc#761501] -- Support directory-based certificate stores with the ca_certs parameter of SSL functions Patch18: python-2.7.3-ssl_ca_path.patch Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch +# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar@opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle. +Patch20: python-bundle-lang.patch # COMMON-PATCH-END BuildRequires: automake BuildRequires: db-devel @@ -178,6 +180,7 @@ implementation of the standard Unix DBM databases. %patch17 %patch18 %patch19 -p1 +%patch20 -p1 # COMMON-PREP-END # drop Autoconf version requirement