azure-sdk-for-python
azure-sdk-for-python copied to clipboard
Swap to `python -m build` instead of `python setup.py <format>`
As warned in our CI, we really needed to modernize how we produce our wheels/sdists.
Unfortunately, it looks like I'm going to need to add a post-step that unzips the tar.gz and rezips it if we want to continue publishing our sdists as zip. Unfortunately, unlike python setup.py, it doesn't look like build honors --format=sdist.
EDIT: found the official docs referencing the new requirement: https://packaging.python.org/en/latest/key_projects/#build, for anyone concerned about introducing a random build package 👍
- [x] Check all tox environments
- [x] This PR somehow destroys all the logging cleanup that I had finished with
python setup.py. Need to resolve this before merging.python -m buildis loud. - [x] Ensure that integration and pypi publishing still works
- [x] Ensure that github.io and docs.ms productions still work
I'm not super familiar with packaging -- though I'd like to learn -- but I do remember having read that setup.py was out of date. Are the failures in the current pipeline run expected from this change?
Eventually, there definitely will be failures. I'll ask Laurent at scrum if we want to look into unzip/rezip. I believe that pip will install a tar.gz just fine, so we should be ok. I'll still get that verified though.
/azp run python - core
Azure Pipelines successfully started running 1 pipeline(s).
/azp run python - template
Azure Pipelines successfully started running 1 pipeline(s).
I am going to wait to merge this until after the release week. Effectively, this means next week.
Due to the fact that we will be using python setup.py until we migrate to pyproject.toml, I am closing this PR. It is ready to go.