Commit c0b22dd5 authored by Pavel Vainerman's avatar Pavel Vainerman

Тестовая сборка python-modules-uniset

parent bad1f281
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
############################################################################ ############################################################################
FIRSTSUBDIRS=IDL FIRSTSUBDIRS=IDL
SUBDIRS=. src lib include Utilities extensions docs SUBDIRS=. src lib include Utilities extensions python docs
include $(top_builddir)/conf/common.mk include $(top_builddir)/conf/common.mk
......
...@@ -35,6 +35,11 @@ BuildRequires: libsqlite3-devel ...@@ -35,6 +35,11 @@ BuildRequires: libsqlite3-devel
%if_enabled python %if_enabled python
BuildRequires: python-devel swig BuildRequires: python-devel swig
BuildRequires(pre): rpm-build-python
%global _target_python_libdir %_target_libdir_noarch
%define python_sitelibdir_noarch %python_sitelibdir
%define python_sitelibdir_arch %_libdir/python%__python_version/site-packages
%endif %endif
%if_enabled doc %if_enabled doc
...@@ -113,12 +118,12 @@ Libraries needed to develop for uniset SQLite ...@@ -113,12 +118,12 @@ Libraries needed to develop for uniset SQLite
%endif %endif
%if_enabled python %if_enabled python
%package python-modules-uniset %package python-modules-%oname
Group: Development/Python Group: Development/Python
Summary: python interface for libuniset Summary: python interface for libuniset
Requires: %name = %version-%release Requires: %name = %version-%release
%description python-modules-uniset %description python-modules-%oname
Python interface for %name Python interface for %name
%endif %endif
...@@ -179,6 +184,12 @@ Libraries needed to develop for uniset extensions ...@@ -179,6 +184,12 @@ Libraries needed to develop for uniset extensions
%makeinstall_std %makeinstall_std
rm -f %buildroot%_libdir/*.la rm -f %buildroot%_libdir/*.la
%if_enabled python
mkdir -p %buildroot%python_sitelibdir_noarch/%oname
#mv -f %buildroot%python_sitelibdir_noarch/*.py %buildroot%python_sitelibdir_noarch/%oname/
mv -f %buildroot%python_sitelibdir_noarch/*.* %buildroot%python_sitelibdir_noarch/%oname/
%endif
%files utils %files utils
%_bindir/%oname-admin %_bindir/%oname-admin
%_bindir/%oname-infoserver %_bindir/%oname-infoserver
...@@ -237,10 +248,10 @@ rm -f %buildroot%_libdir/*.la ...@@ -237,10 +248,10 @@ rm -f %buildroot%_libdir/*.la
%endif %endif
%if_enabled python %if_enabled python
%files python-modules-uniset %files python-modules-%oname
%dir %python_sitelibdir/%name %dir %python_sitelibdir/%oname
%python_sitelibdir/* #%python_sitelibdir/*
%python_sitelibdir/%name/* %python_sitelibdir/%oname/*
%endif %endif
...@@ -303,6 +314,9 @@ rm -f %buildroot%_libdir/*.la ...@@ -303,6 +314,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc %exclude %_pkgconfigdir/libUniSet.pc
%changelog %changelog
* Mon Mar 04 2013 Pavel Vainerman <pv@altlinux.ru> 1.6-alt0.1
- new build
* Mon Jan 14 2013 Pavel Vainerman <pv@altlinux.ru> 1.5-alt10 * Mon Jan 14 2013 Pavel Vainerman <pv@altlinux.ru> 1.5-alt10
- add error code for MTR (eterbug #8659) - add error code for MTR (eterbug #8659)
- (uniset-codegen): add generate class Skeleton (--make-skel) - (uniset-codegen): add generate class Skeleton (--make-skel)
......
...@@ -147,6 +147,16 @@ fi ...@@ -147,6 +147,16 @@ fi
AC_SUBST(UNISET_CODEGEN) AC_SUBST(UNISET_CODEGEN)
echo "UNISET_CODEGEN: $UNISET_CODEGEN" echo "UNISET_CODEGEN: $UNISET_CODEGEN"
UNISET_CFLAGS="-I \$(top_builddir)/include"
AC_SUBST(UNISET_CFLAGS)
UNISET_LIBS="\$(top_builddir)/lib/libUniSet.la"
AC_SUBST(UNISET_LIBS)
UNISET_EXT_CFLAGS="-I \$(top_builddir)/extensions/include"
AC_SUBST(UNISET_EXT_CFLAGS)
UNISET_EXT_LIBS="\$(top_builddir)/extensions/lib/libUniSetExtensions.la"
AC_SUBST(UNISET_EXT_LIBS)
# Checks for header files. # Checks for header files.
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_HEADER_STDC AC_HEADER_STDC
......
...@@ -158,7 +158,7 @@ const char* UInterface::getTextName( long id ) ...@@ -158,7 +158,7 @@ const char* UInterface::getTextName( long id )
return ""; return "";
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
const char* getConfFileName() const char* UInterface::getConfFileName()
{ {
if( UniSetTypes::conf ) if( UniSetTypes::conf )
return UniSetTypes::conf->getConfFileName().c_str(); return UniSetTypes::conf->getConfFileName().c_str();
......
...@@ -22,7 +22,7 @@ namespace UInterface ...@@ -22,7 +22,7 @@ namespace UInterface
const char* getConfFileName(); const char* getConfFileName();
}; }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif #endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.4 * Version 2.0.8
* *
* This file is not intended to be easily readable and contains a number of * This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make * coding conventions designed to improve portability and efficiency. Do not make
...@@ -757,6 +757,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { ...@@ -757,6 +757,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
#define PyInt_Check(x) PyLong_Check(x) #define PyInt_Check(x) PyLong_Check(x)
#define PyInt_AsLong(x) PyLong_AsLong(x) #define PyInt_AsLong(x) PyLong_AsLong(x)
#define PyInt_FromLong(x) PyLong_FromLong(x) #define PyInt_FromLong(x) PyLong_FromLong(x)
#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
#define PyString_Check(name) PyBytes_Check(name) #define PyString_Check(name) PyBytes_Check(name)
#define PyString_FromString(x) PyUnicode_FromString(x) #define PyString_FromString(x) PyUnicode_FromString(x)
#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
...@@ -1223,7 +1224,7 @@ SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { ...@@ -1223,7 +1224,7 @@ SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
SWIGINTERN void SWIGINTERN void
SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
SWIG_PYTHON_THREAD_BEGIN_BLOCK; SWIG_PYTHON_THREAD_BEGIN_BLOCK;
PyErr_SetString(errtype, (char *) msg); PyErr_SetString(errtype, msg);
SWIG_PYTHON_THREAD_END_BLOCK; SWIG_PYTHON_THREAD_END_BLOCK;
} }
...@@ -1242,7 +1243,11 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { ...@@ -1242,7 +1243,11 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
SWIGINTERN void SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
#if PY_VERSION_HEX < 0x02030000
PyDict_SetItemString(d, (char *)name, obj); PyDict_SetItemString(d, (char *)name, obj);
#else
PyDict_SetItemString(d, name, obj);
#endif
Py_DECREF(obj); Py_DECREF(obj);
if (public_interface) if (public_interface)
SwigPyBuiltin_AddPublicSymbol(public_interface, name); SwigPyBuiltin_AddPublicSymbol(public_interface, name);
...@@ -1252,7 +1257,11 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam ...@@ -1252,7 +1257,11 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam
SWIGINTERN void SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
#if PY_VERSION_HEX < 0x02030000
PyDict_SetItemString(d, (char *)name, obj); PyDict_SetItemString(d, (char *)name, obj);
#else
PyDict_SetItemString(d, name, obj);
#endif
Py_DECREF(obj); Py_DECREF(obj);
} }
...@@ -1573,7 +1582,7 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) ...@@ -1573,7 +1582,7 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
#endif #endif
{ {
const char *name = SWIG_TypePrettyName(v->ty); const char *name = SWIG_TypePrettyName(v->ty);
PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, (void *)v); PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
if (v->next) { if (v->next) {
# ifdef METH_NOARGS # ifdef METH_NOARGS
PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
...@@ -1777,8 +1786,10 @@ SwigPyObject_own(PyObject *v, PyObject *args) ...@@ -1777,8 +1786,10 @@ SwigPyObject_own(PyObject *v, PyObject *args)
PyObject *val = 0; PyObject *val = 0;
#if (PY_VERSION_HEX < 0x02020000) #if (PY_VERSION_HEX < 0x02020000)
if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
#else #elif (PY_VERSION_HEX < 0x02050000)
if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
#else
if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
#endif #endif
{ {
return NULL; return NULL;
...@@ -2473,23 +2484,29 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) ...@@ -2473,23 +2484,29 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
} else { } else {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
PyObject_SetAttr(inst, SWIG_This(), swig_this); if (inst) {
Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; PyObject_SetAttr(inst, SWIG_This(), swig_this);
Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
}
#else #else
PyObject *dict = PyDict_New(); PyObject *dict = PyDict_New();
PyDict_SetItem(dict, SWIG_This(), swig_this); if (dict) {
inst = PyInstance_NewRaw(data->newargs, dict); PyDict_SetItem(dict, SWIG_This(), swig_this);
Py_DECREF(dict); inst = PyInstance_NewRaw(data->newargs, dict);
Py_DECREF(dict);
}
#endif #endif
} }
return inst; return inst;
#else #else
#if (PY_VERSION_HEX >= 0x02010000) #if (PY_VERSION_HEX >= 0x02010000)
PyObject *inst; PyObject *inst = 0;
PyObject *dict = PyDict_New(); PyObject *dict = PyDict_New();
PyDict_SetItem(dict, SWIG_This(), swig_this); if (dict) {
inst = PyInstance_NewRaw(data->newargs, dict); PyDict_SetItem(dict, SWIG_This(), swig_this);
Py_DECREF(dict); inst = PyInstance_NewRaw(data->newargs, dict);
Py_DECREF(dict);
}
return (PyObject *) inst; return (PyObject *) inst;
#else #else
PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
...@@ -2540,7 +2557,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) ...@@ -2540,7 +2557,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
SWIGINTERN PyObject * SWIGINTERN PyObject *
SWIG_Python_InitShadowInstance(PyObject *args) { SWIG_Python_InitShadowInstance(PyObject *args) {
PyObject *obj[2]; PyObject *obj[2];
if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
return NULL; return NULL;
} else { } else {
SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
...@@ -2596,12 +2613,10 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f ...@@ -2596,12 +2613,10 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f
assert(!(flags & SWIG_BUILTIN_TP_INIT)); assert(!(flags & SWIG_BUILTIN_TP_INIT));
robj = SwigPyObject_New(ptr, type, own); robj = SwigPyObject_New(ptr, type, own);
if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
if (inst) { Py_DECREF(robj);
Py_DECREF(robj); robj = inst;
robj = inst;
}
} }
return robj; return robj;
} }
...@@ -2816,7 +2831,7 @@ SwigPyObject_GetDesc(PyObject *self) ...@@ -2816,7 +2831,7 @@ SwigPyObject_GetDesc(PyObject *self)
{ {
SwigPyObject *v = (SwigPyObject *)self; SwigPyObject *v = (SwigPyObject *)self;
swig_type_info *ty = v ? v->ty : 0; swig_type_info *ty = v ? v->ty : 0;
return ty ? ty->str : (char*)""; return ty ? ty->str : "";
} }
SWIGRUNTIME void SWIGRUNTIME void
...@@ -2873,6 +2888,7 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(arg ...@@ -2873,6 +2888,7 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(arg
return result; return result;
} }
#ifdef SWIGPYTHON_BUILTIN
SWIGRUNTIME int SWIGRUNTIME int
SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
PyTypeObject *tp = obj->ob_type; PyTypeObject *tp = obj->ob_type;
...@@ -2881,15 +2897,15 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { ...@@ -2881,15 +2897,15 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
descrsetfunc f; descrsetfunc f;
int res; int res;
#ifdef Py_USING_UNICODE # ifdef Py_USING_UNICODE
if (PyString_Check(name)) { if (PyString_Check(name)) {
name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
if (!name) if (!name)
return -1; return -1;
} else if (!PyUnicode_Check(name)) } else if (!PyUnicode_Check(name))
#else # else
if (!PyString_Check(name)) if (!PyString_Check(name))
#endif # endif
{ {
PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
return -1; return -1;
...@@ -2924,6 +2940,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { ...@@ -2924,6 +2940,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
Py_DECREF(name); Py_DECREF(name);
return res; return res;
} }
#endif
#ifdef __cplusplus #ifdef __cplusplus
...@@ -2972,7 +2989,7 @@ static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0}; ...@@ -2972,7 +2989,7 @@ static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
#endif #endif
#define SWIG_name "_pyUniSet" #define SWIG_name "_pyUniSet"
#define SWIGVERSION 0x020004 #define SWIGVERSION 0x020008
#define SWIG_VERSION SWIGVERSION #define SWIG_VERSION SWIGVERSION
...@@ -3285,7 +3302,7 @@ SWIG_AsVal_int (PyObject * obj, int *val) ...@@ -3285,7 +3302,7 @@ SWIG_AsVal_int (PyObject * obj, int *val)
} }
#define SWIG_From_long PyInt_FromLong #define SWIG_From_long PyLong_FromLong
SWIGINTERNINLINE PyObject * SWIGINTERNINLINE PyObject *
...@@ -3316,10 +3333,10 @@ SWIG_FromCharPtr(const char *cptr) ...@@ -3316,10 +3333,10 @@ SWIG_FromCharPtr(const char *cptr)
} }
SWIGINTERNINLINE PyObject * SWIGINTERNINLINE PyObject*
SWIG_From_int (int value) SWIG_From_int (int value)
{ {
return SWIG_From_long (value); return PyInt_FromLong((long) value);
} }
...@@ -4369,8 +4386,7 @@ SWIG_InitializeModule(void *clientdata) { ...@@ -4369,8 +4386,7 @@ SWIG_InitializeModule(void *clientdata) {
size_t i; size_t i;
swig_module_info *module_head, *iter; swig_module_info *module_head, *iter;
int found, init; int found, init;
(void *)clientdata;
clientdata = clientdata;
/* check to see if the circular list has been setup, if not, set it up */ /* check to see if the circular list has been setup, if not, set it up */
if (swig_module.next==0) { if (swig_module.next==0) {
...@@ -4944,6 +4960,7 @@ SWIG_init(void) { ...@@ -4944,6 +4960,7 @@ SWIG_init(void) {
m = Py_InitModule((char *) SWIG_name, SwigMethods); m = Py_InitModule((char *) SWIG_name, SwigMethods);
#endif #endif
md = d = PyModule_GetDict(m); md = d = PyModule_GetDict(m);
(void)md;
SWIG_InitializeModule(0); SWIG_InitializeModule(0);
......
...@@ -28,7 +28,7 @@ namespace UTypes ...@@ -28,7 +28,7 @@ namespace UTypes
static Params inst(){ return Params(); } static Params inst(){ return Params(); }
}; };
}; }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif #endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
# This file was automatically generated by SWIG (http://www.swig.org). # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.4 # Version 2.0.8
# #
# Do not make changes to this file unless you know what you are doing--modify # Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead. # the SWIG interface file instead.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment