Python: let configure setup datadir (removed whacky python code)
This commit is contained in:
parent
25962a2cc2
commit
fa715d1912
10
src/python/recoll/Makefile
Normal file
10
src/python/recoll/Makefile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
all:
|
||||||
|
python setup.py build
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf build
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
|
||||||
|
install:
|
||||||
|
python setup.py install
|
||||||
@ -8,21 +8,10 @@ if sysname == 'Linux':
|
|||||||
else:
|
else:
|
||||||
libs = ['rcl', 'xapian', 'iconv']
|
libs = ['rcl', 'xapian', 'iconv']
|
||||||
|
|
||||||
if 'RECOLL_DATADIR' in os.environ:
|
|
||||||
datadirs = [os.environ['RECOLL_DATADIR']]
|
|
||||||
else:
|
|
||||||
datadirs = []
|
|
||||||
datadirs = datadirs + ['/usr/share/recoll', '/usr/local/share/recoll', '/']
|
|
||||||
for datadir in datadirs:
|
|
||||||
if os.path.exists(datadir):
|
|
||||||
break
|
|
||||||
if datadir == '/':
|
|
||||||
print 'share/recoll directory not found: you need to install Recoll first'
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
top = os.path.join('..', '..')
|
top = os.path.join('..', '..')
|
||||||
|
|
||||||
# Test for PIC library
|
# Verify that the Recoll library was compiled with the PIC options
|
||||||
localdefs = os.path.join(top, 'mk', 'localdefs')
|
localdefs = os.path.join(top, 'mk', 'localdefs')
|
||||||
try:
|
try:
|
||||||
lines = open(localdefs, 'r').readlines()
|
lines = open(localdefs, 'r').readlines()
|
||||||
@ -43,7 +32,7 @@ module1 = Extension('recoll',
|
|||||||
define_macros = [('MAJOR_VERSION', '1'),
|
define_macros = [('MAJOR_VERSION', '1'),
|
||||||
('MINOR_VERSION', '0'),
|
('MINOR_VERSION', '0'),
|
||||||
('UNAC_VERSION', '"1.0.7"'),
|
('UNAC_VERSION', '"1.0.7"'),
|
||||||
('RECOLL_DATADIR', '"' + datadir + '"')
|
('RECOLL_DATADIR', '"@QTRECOLL_DATADIR@"')
|
||||||
],
|
],
|
||||||
include_dirs = ['/usr/local/include',
|
include_dirs = ['/usr/local/include',
|
||||||
os.path.join(top, 'utils'),
|
os.path.join(top, 'utils'),
|
||||||
Loading…
x
Reference in New Issue
Block a user