Recoll Python module build with msvc. Help the module find the datadir.

This commit is contained in:
Jean-Francois Dockes
2020-04-09 10:26:04 +01:00
parent 398799b022
commit 23c2776cb4
5 changed files with 77 additions and 31 deletions
-2
View File
@@ -20,8 +20,6 @@
#include <structmember.h>
#include <bytearrayobject.h>
#include <strings.h>
#include <string>
#include <memory>
-2
View File
@@ -19,8 +19,6 @@
#include <structmember.h>
#include <bytesobject.h>
#include <strings.h>
#include <string>
#include <iostream>
#include <set>
+8 -1
View File
@@ -54,7 +54,14 @@ class RclConfig:
self.datadir = os.environ["RECOLL_DATADIR"]
else:
if platsys == "Windows":
self.datadir = os.path.join(os.path.dirname(sys.argv[0]), "..")
dirs = (os.path.join(os.path.dirname(sys.argv[0]), "..", ".."),
"C:/Program Files (X86)/Recoll/",
"C:/Program Files/Recoll/",
"C:/install/recoll/")
for dir in dirs:
if os.path.exists(os.path.join(dir, "Share")):
self.datadir = os.path.join(dir, "Share")
break
else:
dirs = ("/opt/local", "/usr", "/usr/local")
for dir in dirs: