Mod: issue #6274: Source code installation failed

This commit is contained in:
wmayer
2022-04-18 12:27:09 +02:00
parent 94c5d89d1f
commit d98aaecbfe
6 changed files with 32 additions and 0 deletions

View File

@@ -78,6 +78,8 @@ PyMethodDef Application::Methods[] = {
"Get the name of the module that can export the filetype"},
{"getResourceDir", (PyCFunction) Application::sGetResourcePath, METH_VARARGS,
"Get the root directory of all resources"},
{"getLibraryDir", (PyCFunction) Application::sGetLibraryPath, METH_VARARGS,
"Get the directory of all extension modules"},
{"getTempPath", (PyCFunction) Application::sGetTempPath, METH_VARARGS,
"Get the root directory of cached files"},
{"getUserCachePath", (PyCFunction) Application::sGetUserCachePath, METH_VARARGS,
@@ -647,6 +649,15 @@ PyObject* Application::sGetResourcePath(PyObject * /*self*/, PyObject *args)
return Py::new_reference_to(datadir);
}
PyObject* Application::sGetLibraryPath(PyObject * /*self*/, PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return nullptr;
Py::String datadir(Application::getLibraryDir(),"utf-8");
return Py::new_reference_to(datadir);
}
PyObject* Application::sGetTempPath(PyObject * /*self*/, PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))