|
a/src/python/recoll/setup.py.in |
|
b/src/python/recoll/setup.py.in |
1 |
from distutils.core import setup, Extension
|
1 |
from distutils.core import setup, Extension
|
2 |
import os
|
2 |
import os
|
3 |
import sys
|
3 |
import sys
|
4 |
|
4 |
|
5 |
sysname = os.uname()[0]
|
5 |
sysname = os.uname()[0]
|
|
|
6 |
top = os.path.join('..', '..')
|
|
|
7 |
|
6 |
libiconv = "@LIBICONV@"
|
8 |
libiconv = "@LIBICONV@"
|
7 |
|
9 |
|
8 |
if libiconv.find("-liconv") != -1:
|
10 |
if libiconv.find("-liconv") != -1:
|
9 |
libs = ['rcl', 'xapian', 'iconv']
|
11 |
libs = ['rcl', 'xapian', 'iconv']
|
10 |
else:
|
12 |
else:
|
11 |
libs = ['rcl', 'xapian']
|
13 |
libs = ['rcl', 'xapian']
|
12 |
|
14 |
|
13 |
|
15 |
libxapiandir="@LIBXAPIANDIR@"
|
14 |
top = os.path.join('..', '..')
|
16 |
if libxapiandir != "":
|
|
|
17 |
libdirs = [os.path.join(top, 'lib'), libxapiandir, '/usr/local/lib']
|
|
|
18 |
else:
|
|
|
19 |
libdirs = [os.path.join(top, 'lib'), '/usr/local/lib']
|
15 |
|
20 |
|
16 |
# Verify that the Recoll library was compiled with the PIC options
|
21 |
# Verify that the Recoll library was compiled with the PIC options
|
17 |
localdefs = os.path.join(top, 'mk', 'localdefs')
|
22 |
localdefs = os.path.join(top, 'mk', 'localdefs')
|
18 |
try:
|
23 |
try:
|
19 |
lines = open(localdefs, 'r').readlines()
|
24 |
lines = open(localdefs, 'r').readlines()
|
|
... |
|
... |
42 |
os.path.join(top, 'rcldb'),
|
47 |
os.path.join(top, 'rcldb'),
|
43 |
os.path.join(top, 'query'),
|
48 |
os.path.join(top, 'query'),
|
44 |
os.path.join(top, 'unac')
|
49 |
os.path.join(top, 'unac')
|
45 |
],
|
50 |
],
|
46 |
libraries = libs,
|
51 |
libraries = libs,
|
47 |
library_dirs = [os.path.join(top, 'lib'), '/usr/local/lib'],
|
52 |
library_dirs = libdirs,
|
48 |
sources = ['pyrecoll.cpp',
|
53 |
sources = ['pyrecoll.cpp',
|
49 |
])
|
54 |
])
|
50 |
|
55 |
|
51 |
setup (name = 'Recoll',
|
56 |
setup (name = 'Recoll',
|
52 |
version = '1.0',
|
57 |
version = '1.0',
|