def getRecipeClass(self):

        clearBuildRequires()
        f = self.openSourceFile('VERSION')
        readVersion = f.read()[:-1]
        f.close()

        class RealRecipe(PackageRecipe):
            name = self.packageName
            version = readVersion

            def setup(r):
                if False:
                    # make sure FactoryException is available
                    raise FactoryException

                r.Create("/foo", contents = readVersion + "\\n")

        return RealRecipe