Thanks for this timely question.
tl;dr: Making things work as I am guessing you would like should be straightforward.
Background
leoserver.py creates the link between LeoInteg and Leo using Leo's bridge in leoBridge.leo.
The bridge uses a null gui, so LeoInteg should "just work" without Qt.
However, running leo --gui=null crashes. The details probably do not affect the answer to your question.
Thinking out loud
Félix, please correct me if I am wrong with the following guesses:
LeoInteg almost certainly starts Leo's server with a null gui.
If I understand your question, the problem is simply installing Leo without Qt.
My guess is LeoInteg should work if you install Leo using Git.
However, pip install requirements.txt may fail if Qt is not available.
setup.py specifies requirements in the section called << define install_requires >>.
This section lists the following dependencies:
install_requires = [
'PyQt5 >= 5.15',
'PyQtWebEngine',
'build >= 0.6.0', # simple PEP 517 package builder
'docutils', # used by Sphinx, rST plugin
'flexx', # for LeoWapp browser gui
'meta', # for livecode.py plugin, enabled by default
'nbformat', # for Jupyter notebook integration
'pylint', 'pyflakes',
'pyenchant', # The spell tab.
'pyshortcuts >= 1.7', # desktop integration (#1243)
'sphinx', # rST plugin
'tk', # tkinter.
# For leoAst.py and leoTokens.py.
'asttokens', # abstract syntax tree text parsing
'black', # coding syntax standards
'windows-curses; platform_system=="Windows"', # for console mode on Windows
]
Viktor, as an experiment, you could try the following:
- git clone leo, that is: git clone https://github.com/leo-editor/leo-editor.git
- Create your own version of requirements.txt that omits anything related to guis.
- Install the dependencies: pip install -r requirements.txt.
Summary
Leo issue #3767 suggests using only requirements.txt.
requirements.txt should distinguish required from optional dependencies in requirements.txt.
A timely question indeed.
Edward
setup.py specifies requirements in the section called << define install_requires >>.
This section lists the following dependencies:
install_requires = [
'nbformat', # for Jupyter notebook integration
]
Didn't we decide not to support Jupyter notebooks any more? If so, nbformat can probably be omitted in the future.
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/c200ee02-b307-47e4-90af-5ac7137f2afdn%40googlegroups.com.
> What effort would it be to package a version of Leo providing ~everything~ but the GUI?
Thanks for this timely question.
tl;dr: Making things work as I am guessing you would like should be straightforward.
...
Viktor, as an experiment, you could try the following:
- git clone leo, that is: git clone https://github.com/leo-editor/leo-editor.git
- Create your own version of requirements.txt that omits anything related to guis.
- Install the dependencies: pip install -r requirements.txt.
Hi Viktor, thanks for bringing this up! I've thought about this in the past and completely forgot about it!!
I would also like very much users to be able to just need the leo sources, without installing any qt libs nor any other UI/graphical libs, to be able to run leoInteg or use the bridge / server in general for any other uses, if possible.
Might be worth taking a look at it.
Viktor, as an experiment, you could try the following:
- git clone leo, that is: git clone https://github.com/leo-editor/leo-editor.git
- Create your own version of requirements.txt that omits anything related to guis.
- Install the dependencies: pip install -r requirements.txt.
I'll spend some time on the weekend & will report back my results.
Thanks a lot for your detailed feedback !
On Wed, Jan 24, 2024 at 12:06 AM Viktor Ransmayr wrote:Viktor, as an experiment, you could try the following:
- git clone leo, that is: git clone https://github.com/leo-editor/leo-editor.git
- Create your own version of requirements.txt that omits anything related to guis.
- Install the dependencies: pip install -r requirements.txt.
I'll spend some time on the weekend & will report back my results.