def _create_miragefile(self, version, author, email, git_url, license_name,
                        description, copyrightors):
     with open("Miragefile", "w") as f:
         f.write(
             source.create(self._project_name, version, author, email,
                           git_url, license_name, description,
                           copyrightors))
示例#2
0
    def _configure(self):

        if fileable.exists("Miragefile"):
            if log("Miragefile is exists. Are you sure to overwrite Miragefile?",
                   withConfirm=True):
                os.remove("Miragefile")
            else:
                log("Miragefile is already exists!", withError=True)
                raise FileExistsError
                return

        app_name = log("App name", withInput=True)
        version = log("App version", withInput=True)
        author = log("Author name", withInput=True)
        email = log("Email", withInput=True)
        git_url = log("Git URL", withInput=True)
        license_name = log("License", withInput=True)
        description = log("Description", withInput=True)
        copyrightor = log("Copyrightor", withInput=True, default=author)

        with open("Miragefile", "w") as f:
            f.write(
                source.create(app_name, version, author, email, git_url,
                              license_name, description, copyrightor))