[Dev] Moving third-party parcels around

Chih-Chao Lam chao at osafoundation.org
Tue May 3 16:26:06 PDT 2005


I've been experimenting with moving my Chandler sprint parcel so that  
it can be distributed to anyone who has downloaded Chandler 0.5 who can  
simply drop my parcel into a folder and get it up and running (i.e. no  
futzing around with PARCELPATH and shellscripts).

This was more difficult than I had anticipated, so I thought I'll share  
with you what I found out. Notes can also be found at
http://wiki.osafoundation.org/bin/view/Journal/ 
ChandlerTechnicalUpdateApril2005SprintNotes

The good news is that I did succeed in moving the parcel from the  
samples directory (set by PATHPATH ) to the parcels/osaf/examples/  
directory that ships with Chandler with a little help from Alec.

Changes and mistakes I had to make can be grouped into 3 areas:

1) I needed to change all my python paths.
	a) Python paths can be found in the python code itself, usually as the  
"import" statement. e.g. I had to change
	import AmazonKinds
to
	import osaf.examples.amazon.AmazonKinds as AmazonKinds

	b) Python paths are also found in the parcel.xml files. e.g.
    	<classes key="python">amazon.AmazonKinds.AmazonCollection</classes>
to
     	<classes  
key="python">osaf.examples.amazon.AmazonKinds.AmazonCollection</ 
classes>

2) For each new kind declared, I needed to change the kindPath to the  
kind definition in the repository
e.g.
     myKindPath = "//parcels/amazon/schema/AmazonCollection"
to
     myKindPath =  
"//parcels/osaf/examples/amazon/schema/AmazonCollection"

3) For every change I made, I found out the hard way that I needed to  
start from a clean repository. This stumped me for a while until Alec  
point me the way.

4) You don't have to change the path for any of the XML namspace URLs,  
although I have unanswered questions about how these namespaces can be  
made unique.

I think the eventual goal should be to make parcels independent of  
these directory paths, or to have just one place for third-party  
parcels. This should eliminate these somewhat tedious and mechanical  
transforms. But I'm not sure what the priority of this is.

Hope this helps whoever is creating the next third party parcel,
chao



More information about the Dev mailing list