|
a/src/python/recoll/setup.py.in |
|
b/src/python/recoll/setup.py.in |
|
... |
|
... |
4 |
|
4 |
|
5 |
sysname = os.uname()[0]
|
5 |
sysname = os.uname()[0]
|
6 |
top = os.path.join('..', '..')
|
6 |
top = os.path.join('..', '..')
|
7 |
|
7 |
|
8 |
|
8 |
|
9 |
library_dirs = [os.path.join(top, 'lib')]
|
9 |
library_dirs = [os.path.join(top, '.libs')]
|
10 |
if "CYGWIN" in os.environ:
|
10 |
if "CYGWIN" in os.environ:
|
11 |
libraries = ['recoll', 'xapian', 'iconv', 'z']
|
11 |
libraries = ['recoll', 'xapian', 'iconv', 'z']
|
12 |
else:
|
12 |
else:
|
13 |
libraries = ['recoll']
|
13 |
libraries = ['recoll']
|
14 |
|
14 |
|
|
... |
|
... |
16 |
if 'libdir' in os.environ and os.environ['libdir'] != "":
|
16 |
if 'libdir' in os.environ and os.environ['libdir'] != "":
|
17 |
runtime_library_dirs = [os.path.join(os.environ['libdir'], 'recoll')]
|
17 |
runtime_library_dirs = [os.path.join(os.environ['libdir'], 'recoll')]
|
18 |
else:
|
18 |
else:
|
19 |
runtime_library_dirs = [os.path.join('@prefix@', 'lib', 'recoll')]
|
19 |
runtime_library_dirs = [os.path.join('@prefix@', 'lib', 'recoll')]
|
20 |
|
20 |
|
21 |
# Verify that the Recoll library was compiled with the PIC options
|
|
|
22 |
localdefs = os.path.join(top, 'mk', 'localdefs')
|
|
|
23 |
try:
|
|
|
24 |
lines = open(localdefs, 'r').readlines()
|
|
|
25 |
except:
|
|
|
26 |
print('You need to build recoll first. Use configure --enable-pic')
|
|
|
27 |
sys.exit(1)
|
|
|
28 |
picok = False
|
|
|
29 |
for line in lines:
|
|
|
30 |
if line.find('PICFLAGS') == 0:
|
|
|
31 |
picok = True
|
|
|
32 |
break
|
|
|
33 |
if not picok:
|
|
|
34 |
print('You need to rebuild recoll with PIC enabled. Use configure --enable-pic and make clean')
|
|
|
35 |
sys.exit(1)
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
module1 = Extension('recoll',
|
21 |
module1 = Extension('recoll',
|
39 |
define_macros = [('MAJOR_VERSION', '1'),
|
22 |
define_macros = [('MAJOR_VERSION', '1'),
|
40 |
('MINOR_VERSION', '0'),
|
23 |
('MINOR_VERSION', '0'),
|
41 |
('UNAC_VERSION', '"1.0.7"'),
|
24 |
('UNAC_VERSION', '"1.0.7"'),
|
42 |
('RECOLL_DATADIR', '"@QTRECOLL_DATADIR@"')
|
25 |
('RECOLL_DATADIR', '"@QTRECOLL_DATADIR@"')
|