Skip to content

Instantly share code, notes, and snippets.

@msyyc
Created June 22, 2022 10:48
Show Gist options
  • Save msyyc/c84081ca97e4b9f9885979b5224c3ec5 to your computer and use it in GitHub Desktop.
Save msyyc/c84081ca97e4b9f9885979b5224c3ec5 to your computer and use it in GitHub Desktop.
Design to solve version problem in multi client package

Problem

For multi client configuration(like azure-purview-administration), current python codegen does not generate _version.py in package folder which is needed by setup.py. What's worse, customers need to edit the file manually to update version number before they release package which is very inconvenient.

Solution

To solve the problem, we need new Plugin in python codegen. The new Plugin will generate necessary files(_version.py, etc) for multi client package. Customers will configure like:

image

In new plugin, we just need to add files in output_folder. The plugin will act as independent process in autorest.python and not influence existing plugin.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment