Hello community,
here is the log from the commit of package yast2-python-bindings for openSUSE:Factory
checked in at Fri Mar 5 16:05:39 CET 2010.
--------
--- yast2-python-bindings/yast2-python-bindings.changes 2008-12-15 15:52:09.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-python-bindings/yast2-python-bindings.changes 2010-02-04 16:01:00.000000000 +0100
@@ -2 +2,5 @@
-Mon Dec 15 15:40:14 CET 2008 - juhliarik@suse.cz
+Thu Feb 4 14:44:29 CET 2010 - juhliarik@suse.cz
+
+- added patch from (bnc#520499) it solves problem with importing
+ names
+- 2.19.0
@@ -3,0 +8,2 @@
+-------------------------------------------------------------------
+Mon Dec 15 15:40:14 CET 2008 - juhliarik@suse.cz
calling whatdependson for head-i586
Old:
----
yast2-python-bindings-2.17.4.tar.bz2
New:
----
yast2-python-bindings-2.19.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-python-bindings.spec ++++++
--- /var/tmp/diff_new_pack.osahsi/_old 2010-03-05 16:05:28.000000000 +0100
+++ /var/tmp/diff_new_pack.osahsi/_new 2010-03-05 16:05:28.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package yast2-python-bindings (Version 2.17.4)
+# spec file for package yast2-python-bindings (Version 2.19.0)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 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
@@ -19,44 +19,47 @@
Name: yast2-python-bindings
-Version: 2.17.4
+Version: 2.19.0
Release: 1
-License: GPL v2 only
-Group: System/YaST
+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-python-bindings-2.17.4.tar.bz2
+Source0: yast2-python-bindings-2.19.0.tar.bz2
+
Prefix: /usr
+
+Group: System/YaST
+License: GPLv2
BuildRequires: blocxx-devel curl-devel gcc-c++ libxcrypt-devel python-devel yast2-core-devel yast2-devtools yast2-ycp-ui-bindings-devel
+
# YCPValue::valuetype_str()
Requires: yast2-core >= 2.16.37
BuildRequires: yast2-core-devel >= 2.16.37
BuildRequires: yast2-ycp-ui-bindings-devel >= 2.16.37
Requires: yast2-ycp-ui-bindings >= 2.16.37
Requires: python
+
Summary: Python bindings for the YaST platform.
%description
The bindings allow YaST modules to be written using the Python language
and also Python scripts can use YaST agents, APIs and modules.
-
-
-Authors:
---------
- Jozef Uhliarik
-
%prep
-%setup -n yast2-python-bindings-2.17.4
+%setup -n yast2-python-bindings-2.19.0
%build
%{prefix}/bin/y2tool y2autoconf
%{prefix}/bin/y2tool y2automake
autoreconf --force --install
+
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
+
%{?suse_update_config:%{suse_update_config -f}}
./configure --libdir=%{_libdir} --prefix=%{prefix} --mandir=%{_mandir}
-make %{?jobs:-j%jobs}
+# V=1: verbose build in case we used AM_SILENT_RULES(yes)
+# so that RPM_OPT_FLAGS check works
+make %{?jobs:-j%jobs} V=1
%install
make install DESTDIR="$RPM_BUILD_ROOT"
@@ -65,6 +68,7 @@
d=${f##*/}
%suse_update_desktop_file -d ycc_${d%.desktop} ${d%.desktop}
done
+
rm $RPM_BUILD_ROOT/%{_libdir}/YaST2/plugin/libpy2lang_python.la
rm $RPM_BUILD_ROOT/%{_libdir}/python/site-packages/libYCP.la
@@ -75,8 +79,10 @@
%defattr (-, root, root)
%{_libdir}/YaST2/plugin/libpy2lang_python.so.*
%{_libdir}/YaST2/plugin/libpy2lang_python.so
+
# libYCP goes elsewhere
# %dir %{_libdir}/python
%{_libdir}/python/site-packages
%doc %{prefix}/share/doc/packages/yast2-python-bindings
+
%changelog
++++++ yast2-python-bindings-2.17.4.tar.bz2 -> yast2-python-bindings-2.19.0.tar.bz2 ++++++
++++ 57417 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-python-bindings-2.17.4/VERSION new/yast2-python-bindings-2.19.0/VERSION
--- old/yast2-python-bindings-2.17.4/VERSION 2008-12-15 15:41:31.000000000 +0100
+++ new/yast2-python-bindings-2.19.0/VERSION 2010-02-04 14:46:03.000000000 +0100
@@ -1 +1 @@
-2.17.4
+2.19.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-python-bindings-2.17.4/config.h.in new/yast2-python-bindings-2.19.0/config.h.in
--- old/yast2-python-bindings-2.17.4/config.h.in 2008-12-15 15:38:59.000000000 +0100
+++ new/yast2-python-bindings-2.19.0/config.h.in 2009-03-27 14:27:53.000000000 +0100
@@ -45,6 +45,10 @@
/* Define to 1 if you have the header file. */
#undef HAVE_UNISTD_H
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
/* Name of package */
#undef PACKAGE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-python-bindings-2.17.4/src/YCP.cc new/yast2-python-bindings-2.19.0/src/YCP.cc
--- old/yast2-python-bindings-2.17.4/src/YCP.cc 2008-12-15 15:30:21.000000000 +0100
+++ new/yast2-python-bindings-2.19.0/src/YCP.cc 2009-07-10 16:15:12.000000000 +0200
@@ -28,6 +28,7 @@
#include
#include
#include
+#include <cctype>
#include "YPython.h"
#include "PythonLogger.h"
@@ -734,6 +735,37 @@
}
+
+/**
+ * Translates the specified namespace to a Python-compatible identifier.
+ * This involves ensuring that all characters are either letters, numbers, or
+ * underscores, and that the first character is a letter or underscore.
+ * @param const string* original - The original namespace
+ * @return A string containing the translated, Python-compatible namespace
+ */
+string translate_namespace(const string* original) {
+
+ string translated;
+
+ // Iterate through all characters of the original namespace
+ for (string::const_iterator it = original->begin(); it != original->end(); it++) {
+ // Accept only letters, numbers, underscores
+ if ((isalnum(*it)) || (*it == '_'))
+ translated.push_back(*it);
+ else
+ // Replace invalid characters with underscores
+ translated.push_back('_');
+ }
+
+ // If the first character is not a letter or underscore,
+ // replace it with an underscore
+ if ((!isalpha(*original->begin())) && (*original->begin() != '_'))
+ translated[0] = '_';
+
+ return translated;
+}
+
+
/**
* Returns true if NameSpace is registered (is key) in dictionary dict.
* Otherwise returns false;
@@ -763,6 +795,9 @@
*/
bool RegFunctions(char *NameSpace, YCPList list_functions, YCPList list_variables)
{
+ // Translate the original namespace to a Python-compatible identifier
+ string original = string(NameSpace);
+ string translated = translate_namespace(&original);
// Dictionary of ycp module
PyObject *ycp_dict = PyModule_GetDict(Self);
@@ -777,7 +812,8 @@
if (new_module == NULL) return false;
// Add new initialized module into ycp dictionary (can be accessed via ycp.NameSpace)
- PyDict_SetItemString(ycp_dict, NameSpace, new_module);
+ PyDict_SetItemString(ycp_dict, translated.c_str(), new_module);
+
// Dictionary of new_module - there will be registered all functions
PyObject *new_module_dict = PyModule_GetDict(new_module);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org