tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: www/ap2-python fails to build
On Mon, Nov 04, 2019 at 12:08:00PM +0100, Martin Husemann wrote:
> and I can't seem to find what the fourth arg to _PyImport_FixupExtensionObject
> is supposed to be.
>
> Any hints?
I was pointed off-list at:
https://github.com/grisha/mod_python/pull/80/commits/8fb45feab94152a6aae3492aed4b81c363a912bd
and indeed the _apachemodule part of that (with an ifdef added) makes the
source compile:
#if PY_MAJOR_VERSION < 3
m = Py_InitModule("_apache", _apache_module_methods);
#else
m = PyModule_Create(&_apache_moduledef);
PyObject *name = PyUnicode_FromString("_apache");
#if PY_MINOR_VERSION >= 7
PyObject *modules = PyImport_GetModuleDict();
_PyImport_FixupExtensionObject(m, name, name, modules);
#else
_PyImport_FixupExtensionObject(m, name, name);
#endif
#endif
... but then it fails with lots of local files called *.opt-2.pyc instead
of the apparently expected .opt-1.pyc - and this is too deep inside pkgsrc
magic for me :-/
Martin
Home |
Main Index |
Thread Index |
Old Index