Sharing code between different projects?

Miki Tebeka miki.tebeka at gmail.com
Wed Aug 15 14:07:36 EDT 2012


> In plus I'm using perforce which doesn't have any svn:externals-like
You can probably use views to this (http://www.perforce.com/perforce/r12.1/manuals/cmdref/o.views.html).

> Second problem is that one of the two projects has a quite insane
> requirement, which is to be able to re-run itself on a specific
> version depending on a value fetched from the database.
You can probably play with PYTHONPATH to do that.

> The third problem is that from the moment is not just me using these
> things, how can I be sure that changing something will not break
> someone else code?
That's always a problem with libraries you distribute, no matter what is the mechanism for distribution.

If you go the views/link way. You can link to tags instead of trunk (or the perforce equivalent) and then client can still to know "good" version. If you go the PyPi route, you can specify package version in setup.py dependencies (foo==0.10.2)





More information about the Python-list mailing list