mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
* configure.py : Fix the detection of tex2lyx when running in-place (#6986).
Remove the hack with os.environ and instead directly search for ../src/tex2lyx/tex2lyx relative to where configure.py is found. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39643 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
deb9736929
commit
5891c139da
@ -617,24 +617,21 @@ def checkConverterEntries(java='', perl=''):
|
||||
|
||||
checkLuatex()
|
||||
|
||||
''' If we're running LyX in-place then tex2lyx will be found in
|
||||
../src/tex2lyx. Add this directory to the PATH temporarily and
|
||||
search for tex2lyx.
|
||||
Use PATH to avoid any problems with paths-with-spaces.
|
||||
'''
|
||||
path_orig = os.environ["PATH"]
|
||||
os.environ["PATH"] = os.path.join('..', 'src', 'tex2lyx') + \
|
||||
os.pathsep + path_orig
|
||||
# Look for tex2lyx in this order (see bugs #3308 and #6986):
|
||||
# 1) If we're running LyX in-place then tex2lyx will be found
|
||||
# in ../src/tex2lyx with respect to the srcdir.
|
||||
# 2) If LyX was configured with a version suffix then tex2lyx
|
||||
# will also have this version suffix.
|
||||
# 3) Otherwise always use tex2lyx.
|
||||
in_place = os.path.join('srcdir', '..', 'src', 'tex2lyx', 'tex2lyx')
|
||||
in_place = os.path.abspath(in_place)
|
||||
|
||||
# First search for tex2lyx with version suffix (bug 6986)
|
||||
path, t2l = checkProg('a LaTeX/Noweb -> LyX converter', ['tex2lyx' + version_suffix, 'tex2lyx'],
|
||||
path, t2l = checkProg('a LaTeX/Noweb -> LyX converter', [in_place, 'tex2lyx' + version_suffix, 'tex2lyx'],
|
||||
rc_entry = [r'''\converter latex lyx "%% -f $$i $$o" ""
|
||||
\converter literate lyx "%% -n -f $$i $$o" ""'''], not_found = 'tex2lyx')
|
||||
if path == '':
|
||||
logger.warning("Failed to find tex2lyx on your system.")
|
||||
|
||||
os.environ["PATH"] = path_orig
|
||||
|
||||
#
|
||||
checkProg('a Noweb -> LaTeX converter', ['noweave -delay -index $$i > $$o'],
|
||||
rc_entry = [r'''\converter literate latex "%%" ""
|
||||
|
Loading…
Reference in New Issue
Block a user