Question related to 'Installing Leo with Git'?

109 views
Skip to first unread message

Viktor Ransmayr

unread,
Apr 25, 2020, 11:14:37 AM4/25/20
to leo-editor
Hello Edward & Community,

As I stated in my other message ( https://groups.google.com/d/msg/leo-editor/gNXPxjD9Yvg/z4bW4CtNAwAJ ) I now have successfully created a third PyVE, where I followed the method described in [1].

What's surprising to me - and - I'm taking the view of a Leo newbie here, is that the installed Leo instance is

###

Leo Log Window
Leo 6.2.1 final, master branch, build 49c5e4fa3c
2020-03-30 08:39:10 -0500
Python 3.7.6, PyQt version 5.14.2
linux
setting leoID from os.getenv('USER'): 'user'
current dir: /home/user/PyVE/Repo/Leo-Repo
...

###

Why should I prefer this method, if I don't get anything else than if I would simple do a 'pip install leo'? - What am I missing?

With kind regards,

Viktor

---

Matt Wilkie

unread,
Apr 25, 2020, 2:27:15 PM4/25/20
to leo-editor
Why should I prefer this method, if I don't get anything else than if I would simple do a 'pip install leo'? - What am I missing?
  • Upgrades are faster and easier, a simple `git pull` and you're done. Only the new and changed files are downloaded. With a pip upgrade a full download, uninstall, reinstall cycle is needed.
  • Switching between stable release and development versions or even downgrading is easy: `git checkout master`, `git checkout devel` or `git checkout v6.0`.
  • you have all the files in the root directory so when opening certain .leo files distributed with Leo there won't be complaints about missing files (as per in my reply to the other thread).
-matt

Viktor Ransmayr

unread,
Apr 25, 2020, 2:38:34 PM4/25/20
to leo-e...@googlegroups.com
Hello Matt,

Thanks for this explanation!

Am Sa., 25. Apr. 2020 um 20:27 Uhr schrieb Matt Wilkie <map...@gmail.com>:
Why should I prefer this method, if I don't get anything else than if I would simple do a 'pip install leo'? - What am I missing?
  • Upgrades are faster and easier, a simple `git pull` and you're done. Only the new and changed files are downloaded. With a pip upgrade a full download, uninstall, reinstall cycle is needed.
  • Switching between stable release and development versions or even downgrading is easy: `git checkout master`, `git checkout devel` or `git checkout v6.0`.
This is the main point (IMO) , that should be added to the description of "Installing Leo with Git" [1].
  • you have all the files in the root directory so when opening certain .leo files distributed with Leo there won't be complaints about missing files (as per in my reply to the other thread).
 

Thomas Passin

unread,
Apr 25, 2020, 7:09:11 PM4/25/20
to leo-editor
As the footnoted reference says, If you install from Git, you can get the latest development versions.  What it does not say is that the latest development version is usually not in the "master" branch of the git repository.  It is usually in the "devel" branch.  If you don't know Git a bit - so that you can switch the branch - or don't want to fuss with learning about it, you might as well not bother.  Also, installing with pip sets up some things that simply running from a Git clone does not.  This could explain some of the error messages, if you get them using the Git clone and not using the pip installation. (These messages are harmless, mostly about missing test-related components).


On Saturday, April 25, 2020 at 11:14:37 AM UTC-4, Viktor Ransmayr wrote:
Hello Edward & Community,

As I stated in my other message ( https://groups.google.com/d/msg/leo-editor/gNXPxjD9Yvg/z4bW4CtNAwAJ ) I now have successfully created a third PyVE, where I followed the method described in [1].

What's surprising to me - and - I'm taking the view of a Leo newbie here, is that the installed Leo instance is

[snip]

Matt Wilkie

unread,
Apr 25, 2020, 7:35:03 PM4/25/20
to leo-editor

As the footnoted reference says, If you install from Git, you can get the latest development versions.  What it does not say is that the latest development version is usually not in the "master" branch of the git repository.  It is usually in the "devel" branch. 

Good point, I added how to switch.
 
-matt

Thomas Passin

unread,
Apr 25, 2020, 8:00:15 PM4/25/20
to leo-editor
I am going to reiterate here something I posted in another thread.  If you want to use the git method (or indeed run from a downloaded unzipped archive), there is another way to set up your system besides virtual environments or pip install --editable.  I do it this way because I have the standard python installation I started with, and then later I wanted to use git clones since I was doing some development on a plugin.  Python uses an environmental variable just for purposes like this: PYTHONPATH.

Python will look for imports and library files in PYTHONPATH first.  So I set it to point to the location of my Leo git clone.  On my Windows machine, the command is:

set PYTHONPATH=d:\tom\git\leo-editor

(On Linux, of course,it would be more like

PYTHONPATH=....
export $PYTHONPATH
)

I find this way very satisfactory, because:

1. I get all the benefits of using a git clone;
2. I can go back to my standard install simply by not setting the variable;
3. If I want to work with a clone of some other Python library (such as rst2pdf, which I did a bit of work on), I just set PYTHONPATH to point there instead;
4. I get confused after a time when I set up more than a few virtual environments, because I forget what they were all for and what the state of their libraries and configuration is.  This way I don't need those virtual environments.

Edward K. Ream

unread,
Apr 26, 2020, 9:09:24 AM4/26/20
to leo-editor
On Sat, Apr 25, 2020 at 6:35 PM Matt Wilkie <map...@gmail.com> wrote:

As the footnoted reference says, If you install from Git, you can get the latest development versions.  What it does not say is that the latest development version is usually not in the "master" branch of the git repository.  It is usually in the "devel" branch. 

Good point, I added how to switch.

Drat. You may have to add back those words.

Edward

Matt Wilkie

unread,
Apr 26, 2020, 8:49:25 PM4/26/20
to leo-editor
4. I get confused after a time when I set up more than a few virtual environments, because I forget what they were all for and what the state of their libraries and configuration is.  This way I don't need those virtual environments.

Changing PYTHONPATH between d:\code\leo-devel or d:\code\leo-experiment12 can be simpler than setting up different virtual enviroments for them, especially if they use all the same libraries. For me this doesn't solve the #4 problem though, forgetting what those folders are for! Switching venv or variable, it's the same end from different paths. (haha! pun intended, but I didn't see until aftewards.)

(BTW, I'm not trying to persuade you or anyone else to move away from what works for you. We each have our own best fitting clothes.)

-matt

Matt Wilkie

unread,
Apr 26, 2020, 9:42:00 PM4/26/20
to leo-editor
Drat. You may have to add back those words.

Done :)

matt

Edward K. Ream

unread,
Apr 27, 2020, 5:54:33 AM4/27/20
to leo-editor
On Sun, Apr 26, 2020 at 8:42 PM Matt Wilkie <map...@gmail.com> wrote:
Drat. You may have to add back those words.

Done :)

Thanks, Matt.

Edward

Viktor Ransmayr

unread,
May 3, 2020, 2:44:19 PM5/3/20
to leo-editor
Am Sonntag, 26. April 2020 01:35:03 UTC+2 schrieb Matt Wilkie:

As the footnoted reference says, If you install from Git, you can get the latest development versions.  What it does not say is that the latest development version is usually not in the "master" branch of the git repository.  It is usually in the "devel" branch. 

Good point, I added how to switch.

Thanks! - I've been able to check out the development branch from the cloned repository - and - install it using pip.

The logical next step would be to deliver a simple change, e.g. fixing the simple typo ``git chekout devel`` in

* .../leo-editor/leo/doc/LeoDocs.leo#Leo's Documentation-->Installing & running Leo-->@rst html/installing.html-->Installing Leo itself-->Installing Leo with git

as a pull request (PR) for leo-editor ...

Is there anything specific to Leo, that should be considered in addition to the available information on GitHub on how to deliver PRs?

With kind regards,

Viktor

Matt Wilkie

unread,
May 4, 2020, 7:25:48 PM5/4/20
to leo-editor
Doc fixes are always welcome! Good documentation is hard and rarely done well alone.

Is there anything specific to Leo, that should be considered in addition to the available information on GitHub on how to deliver PRs?

Nothing that I can think of. Anything that might bere there can be sorted out during the PR review process.

-matt

Viktor Ransmayr

unread,
May 5, 2020, 1:37:50 AM5/5/20
to leo-e...@googlegroups.com
Hello Matt,

OK, then I'll reserve some time to work on my first PR.

With kind regards,

Viktor

Reply all
Reply to author
Forward
0 new messages