Commit Graph

15 Commits

Author SHA1 Message Date
José Matos
04ecabef60 Update Python scripts to Python 3+
Remove support for Python 2

Use formatted strings where appropriated
2024-06-10 11:29:56 +01:00
Kornel Benko
a379c5d5ea Amend 9d8dfe934b: Check _all_ visited dirs 2022-06-02 12:16:07 +02:00
Richard Kimberly Heck
9d8dfe934b Fix bug #11750.
Unfortunately, stat.st_ino returns 0 on Windows, at least on Python 2.7, so we can't use that way of telling when we're seeing the same directory again. Surely the real pathname should work.
2020-02-24 19:07:31 -05:00
Jean-Marc Lasgouttes
642b4acca1 Let TeXFiles.py handle symbolic links.
Nix (https://nixos.org) is a Unix package manager, which can be used to
install LaTeX on macOS. A peculiarity of Nix is that all packages are
installed into separate directories and the actual directory tree is
then constructed via symlinks.

This interacts badly with the way LyX currently detects files in the
TeX setup, because TeXFiles.py does not follow symlinks. Therefore,
almost nothing is found when using LyX together with Nix’ LaTeX.

Patch from Michael Roitzsch.
2019-06-25 15:52:46 +02:00
Enrico Forestieri
db494452dc TeXFiles.py: Python 3 compatibility 2017-04-13 10:49:38 +02:00
Juergen Spitzmueller
dcdd04a492 TeXFiles.py: scan for biblatex *.bbx and *.cbx files 2017-01-01 08:07:05 +01:00
Richard Heck
f9de88c53c Remove the shebang line from our python scripts, per Jose's suggestion.
Fedora ships these chmod 644 and has never seen a problem. The advantage
to doing this is that it better controls what version of python we are
using to launch the script, and it will reveal if we're somehow somewhere
not controlling that properly.
2014-01-28 12:52:16 -05:00
Enrico Forestieri
5791d41544 MikTeX's kpsewhich doesn't mention "kpathsea emulation" anymore.
On Cygwin, the most reliable way to tell what is the right path
separator to use is a direct check.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38646 a592a061-630c-0410-9148-cb99ea01b6c8
2011-05-08 21:09:38 +00:00
Jürgen Spitzmüller
6f18b79871 * lib/scripts/TeXFiles.py:
- fix typo spotted by Hartmut.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24260 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-15 14:04:40 +00:00
José Matox
37dc5aeabe Convert python scripts to utf-8.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14565 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-08 10:42:59 +00:00
Bo Peng
2ae2c0db71 Remove hardcoded option -tt from python scripts
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14478 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-17 19:41:32 +00:00
Bo Peng
da915923fd Change the encoding of some python scripts from ISO-8859-15 to ISO-8859-1
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14477 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-17 19:37:24 +00:00
Georg Baum
4ae87a3bb8 Call python with the -tt switch to make mixed tab/space indentation an error
* src/support/os.[Ch]
	(python): new function, return the python command

	* lib/lyx2lyx/lyx_1_5.py
	(revert_font_settings): replace tabs with spaces

The rest is simply s/python/python -tt/ and
s/"python"/lyx::support::os::python()/ where appropriate.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14270 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-30 13:54:01 +00:00
Bo Peng
a5a508bdaa Change the indent level of python code from two to four
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14250 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-27 21:08:54 +00:00
Bo Peng
f58609c765 Replace TeXFiles.sh by TeXFiles.py
* src/frontends/controllers/tex_helpers.C: call TeXFiles.py
	* lib/scripts/TeXFiles.py: add
	* lib/scripts/TeXFiles.sh: remove
	* lib/scripts/convertDefault.py: add encoding line
	* lib/Makefile.am


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14238 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-27 02:39:03 +00:00