i am trying …
loadRecipe('existingpackage')
class NewPackage(PackageRecipe):
name = 'newpackage-test'
p = existingpackage.version
print p
but getting error, that existingpackage is not defined
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You got it right that loadRecipe needs the name of the package. But to access information from the recipe, you should use the class defined there, not the package name or the recipe filename. (That’s also quite natural. Sometimes recipes can define more than one classes.)
For example, in a firefox plugin, I want the version of firefox, so that the plugin can be installed to the right place.
I load the firefox recipe and use Firefox.version to get what I want.