Build and changes for _rpm module

CVS patchset: 7490
CVS date: 2004/10/19 21:35:24
This commit is contained in:
pauln 2004-10-19 21:35:24 +00:00
parent d96e690b8d
commit ea8c710ac4
3 changed files with 15 additions and 11 deletions

View File

@ -1245,6 +1245,7 @@ AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec
doc/ru/Makefile
doc/sk/Makefile
python/Makefile
python/rpm/Makefile
python/rpmdb/Makefile
python/rpmdb/test/Makefile
lua/Makefile

View File

@ -7,7 +7,7 @@ LINT = splint
pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@
pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@
SUBDIRS = rpmdb
SUBDIRS = rpmdb rpm
EXTRA_DIST = system.h rpmdebug-py.c
@ -38,13 +38,16 @@ mylibs= \
LDADD =
pythondir = $(pylibdir)/site-packages
python_LTLIBRARIES = rpmmodule.la poptmodule.la
python_LTLIBRARIES = poptmodule.la
rpmdir = $(pylibdir)/site-packages/rpm
rpm_LTLIBRARIES = _rpmmodule.la
rpmdbdir = $(pylibdir)/site-packages/rpmdb
rpmdb_LTLIBRARIES = _rpmdb.la
rpmmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
rpmmodule_la_LIBADD = @WITH_BEECRYPT_LIB@
_rpmmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
_rpmmodule_la_LIBADD = @WITH_BEECRYPT_LIB@
_rpmdb_la_SOURCES = _rpmdb.c
_rpmdb_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
@ -52,7 +55,7 @@ _rpmdb_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
poptmodule_la_SOURCES = poptmodule.c
poptmodule_la_LDFLAGS = $(mylibs) $(LIBS) -module -avoid-version
rpmmodule_la_SOURCES = rpmmodule.c header-py.c \
_rpmmodule_la_SOURCES = rpmmodule.c header-py.c \
rpmal-py.c rpmds-py.c rpmdb-py.c rpmfd-py.c rpmfts-py.c \
rpmfi-py.c rpmmi-py.c rpmps-py.c rpmrc-py.c rpmte-py.c \
rpmts-py.c spec-py.c

View File

@ -1,5 +1,5 @@
/** \ingroup py_c
* \file python/rpmmodule.c
* \file python/_rpmmodule.c
*/
#include "system.h"
@ -168,10 +168,10 @@ static PyMethodDef rpmModuleMethods[] = {
static char rpm__doc__[] =
"";
void initrpm(void); /* XXX eliminate gcc warning */
void init_rpm(void); /* XXX eliminate gcc warning */
/**
*/
void initrpm(void)
void init_rpm(void)
{
PyObject * d, *o, * tag = NULL, * dict;
int i;
@ -197,7 +197,7 @@ void initrpm(void)
if (PyType_Ready(&spec_Type) < 0) return;
#endif
m = Py_InitModule3("rpm", rpmModuleMethods, rpm__doc__);
m = Py_InitModule3("_rpm", rpmModuleMethods, rpm__doc__);
if (m == NULL)
return;
@ -206,11 +206,11 @@ void initrpm(void)
d = PyModule_GetDict(m);
#ifdef HACK
pyrpmError = PyString_FromString("rpm.error");
pyrpmError = PyString_FromString("_rpm.error");
PyDict_SetItemString(d, "error", pyrpmError);
Py_DECREF(pyrpmError);
#else
pyrpmError = PyErr_NewException("rpm.error", NULL, NULL);
pyrpmError = PyErr_NewException("_rpm.error", NULL, NULL);
if (pyrpmError != NULL)
PyDict_SetItemString(d, "error", pyrpmError);
#endif