6

I have multiple projects that shares child apps with other projects. When working within the project directory I want to be able to make changes to the app, update it, and pull those updates into the second project.

Requirement:

  • No use of symbolic links (my IDE's debugger doesn't work well with them)
  • No compiling/rerun a script. I would like to make changes to the app without having to rerun a script/buildout.
  • Apps must be within the project folder.

Here's the structure:

app_one (git repo)
  |-- app_one (actual app uses by projects)
  |   +-- models.py
  |-- README.md
  +-- setup.py

project_one  (git repo)
  |-- project_one
  |   |-- apps
  |   |   |-- app_one
  |   |   |   +-- models.py
  |   |   | -- app_two
  |-- setup.cfg
  +-- setup.py

project_two  (git repo)
  |-- project_two
  |   |-- apps
  |   |   |-- app_one (same app as project_one)
  |   |   |   +-- models.py
  |   |   | -- app_two
  |-- setup.cfg
  +-- setup.py

Currently I'm using git-submodules for this; the downside is there is no way to link to a subfolder of a repo. I recently read about subtree, would this work better?

Ideally I would like to use buildout, but I haven't found a good way to accomplish this without the use of symbolic links. If there's a way to to do this please let me know.

Any suggestions would be greatly appreciated.

Kyle Finley
  • 11,842
  • 6
  • 43
  • 64

1 Answers1

3

mr.developer. When a mr.developer source is checked out and activated, it becomes a setuptools/distribute develop egg in the buildout and so the checkout will be what is used by any scripts (such as a zc.recipe.egg generated python interpreter) in the buildout.

Ross Patterson
  • 5,702
  • 20
  • 38
  • does mr.developer allow you to work directly with the source? Or is there a compile step? If possible I would like to work directly on the `app` without having to recompile after every change. – Kyle Finley Aug 21 '11 at 19:31
  • thank you for your response and the link, I'm still trying to grasp exactly what they are saying. By 'compile step' I ment rerunning buildout. Is it necessary to rerun buildout after every change? In case it's relevant this is for an app engine project so the source code, E.g. `app_one` has to be within the `project_one/apps` directory – Kyle Finley Aug 21 '11 at 20:09
  • You need to re-run buildout only if you *change which eggs* are activated/in develop mode. IOW, as long as all the eggs you are making code changes to are *already* activated, you do not need to re-run buildout. This is *exactly* what mr.developer is for. Keep in mind that some setup.py changes, such as adding new dependencies would require re-running buildout. – Ross Patterson Aug 21 '11 at 20:12
  • @Kyle: Note that mr.developer has an `update` command, which will update all source-control directories under it's control. `bin/develop up` is the same as `git pull`, `svn up`, etc. in all your mr.developer-managed dependencies. – Martijn Pieters Aug 22 '11 at 07:04