Converting from setup.py and PBR to pyproject.toml
I make no claim to be an expert at this, but I did just need to convert a project from a slightly complicated setup.py / PBR configuration to pyproject.toml and thought I should write up where I landed. I say “slightly complicated” because there are a few very OpenStacky things I like to do in these things. Specifically:
- version numbers are driven by git tags not hard coded in the configuration file.
- console scripts are a thing.
- I often include data files in the built package.
So here’s an example of all of those things that is working ok for me: