Add support for poetry build with wheel #2425
Open
+9
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Earlier I created #2049 to show how we can now use
poetry build
to create sdist in python:With recent merge of #2192, we move the openapi code generation into python. The problem with this is, now it is depends on openapi template file which is outside python directory and
generate_clients.py
is referring the the template one directory above. Thus, we are no longer able to provide sdist (we never provided as well...often time sdist is less preferred).Now another issue I noticed is the wheel files generated by current main doesn't include the actual code files generated by
poetry build
but the sdist has it. Upon debugging, this seems to be due to the project layout we are using is not matching to what poetry suggests:"If your project structure differs from the standard one supported by poetry, you can specify the packages you want to include in the final distribution." (ref: https://python-poetry.org/docs/pyproject/#packages). Here is the sample content if we try to generate one:
Thus, I purpose the change in this PR to implicitly add those files. Here is the new sample output:
Also, this PR add support with Makefile so now we can use
make client-build
to create the new wheel file.