Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use isolated build environments #65145

Merged
merged 4 commits into from
Jan 28, 2022
Merged

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Jan 28, 2022

Proposed change

PEP 517 added the option to specify build backends via pyproject.toml. The build package is then used to create isolated build environments. This helps ensure that the all builds are reproducible. E.g. in the past it was possible that the build was tested with one version of setuptools while the final release was done with another (older) one which didn't work as expected.

https://setuptools.pypa.io/en/latest/build_meta.html

The change will also allow us to eventually remove setup.py completely.

/CC @balloob

The deprecation warning is a result of pip 21.2 and can be ignore. It will disappear with 21.3.x.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant probot-home-assistant bot added the small-pr PRs with less than 30 lines. label Jan 28, 2022
@cdce8p cdce8p requested a review from a team January 28, 2022 18:46
script/release Outdated
@@ -27,6 +27,9 @@ then
exit 1
fi

echo "Install build and twine"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually don't use this script for releasing...

- name: Build package
shell: bash
run: |
pip install twine wheel
python setup.py sdist bdist_wheel

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Updated that too. I'm not entirely sure which workflow Github will choose once this is merged, the old or new one (for the 2022.1 release).

To be safe, it might make sense to cherry-pick the prerequisite PRs:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I am aware (thus not 100% certain), it will use the default branch, which is dev

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove script/release

Copy link
Member Author

@cdce8p cdce8p Jan 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I am aware (thus not 100% certain), it will use the default branch, which is dev

That's what I remember as well. In that case, the three merged PRs above and this one should be cherry-picked if accepted.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove script/release

👍🏻 Done

@cdce8p cdce8p mentioned this pull request Jan 28, 2022
22 tasks
@balloob balloob merged commit 783e26e into home-assistant:dev Jan 28, 2022
@frenck
Copy link
Member

frenck commented Jan 28, 2022

@balloob This means we need to tag this and the other listed above for the milestone.
Do we want this in the current beta path?

@balloob balloob added this to the 2022.2.0 milestone Jan 28, 2022
@cdce8p cdce8p deleted the build-system branch January 29, 2022 00:01
balloob pushed a commit that referenced this pull request Jan 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cherry-picked cla-signed small-pr PRs with less than 30 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants