Hello Markus I don't have real-world experience with this, but I am not sure if changing branches and distcleaning/recompiling is the most convenient workflow. I think I would prefer to have multiple local repositories with different branches checked out. Thankfully git makes it rather easy to have this. E.g.:
1. You create two root directories. One for Python2 and one for Python3: mkdir /home/user/git/grass-p{2,3} 2. Create a virtualenv inside grass-p2 and grass-p3. E.g.: cd /home/user/git/grass-p2 virtualenv -p python2 venv cd /home/user/git/grass-p2 python3 -m venv venv 3. Clone the remote GRASS repo and name the local repo `dev`. You will only do this for `grass-p3`: cd /home/user/git/grass-p3 git clone https://github.com/neteler/grass dev 5. For python 2 and for each release branch you will make a local git clone. This way you won't be wasting disk space. Read more about this [here]( https://stackoverflow.com/questions/7187088/git-how-to-create-local-repo-with-symbolic-links-to-the-git-main-repo ). cd /home/user/git/grass-p2 git clone ../grass-p3/dev dev git clone ../grass-p3/dev r72 git clone ../grass-p3/dev r74 git clone ../grass-p3/dev r76 6. The dir structure should look like this: $ tree grass* grass-p2 ├── dev ├── r72 ├── r74 ├── r76 └── venv grass-p3 ├── dev └── venv 7. On each release clone you need to checkout the respective branch: cd /home/user/git/grass-p2/r72 && git checkout releasebranch_7_2 cd /home/user/git/grass-p2/r74 && git checkout releasebranch_7_4 cd /home/user/git/grass-p2/r76 && git checkout releasebranch_7_6 7. Each directory is a full blown git repo. It is only by convention that 7.6 backports will happen in `r76` etc. If you want to directly pull/push from/to github from the release directories, you will probably need to setup remotes. Regardless, setting up remotes etc should only be done once. 8. Obviously, when 7.8 gets released, two more directories will need to be added (one for python2 and one for python 3). The benefit of this approach is that at least for trivial backports, you will not need to recompile everything and, perhaps more importantly, you will not need to recompile "master" in order to test a fix in 7.2. all the best, Panos PS1. There are other ways to achieve something like this, e.g. [`--singlebranch`](https://stackoverflow.com/a/1911126/592289) but I don't see much benefit. PS2. You can optionally use something like [direnv]( https://github.com/direnv/direnv) to automatically activate the virtualenvs when you cd into the corresponding directory. This way there is no confusion WRT which python is active. I use this and it works marvellously.
_______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev