v0.11.x to v0.12.0 Migration Guide

CLI and build.py Changes

  • install_dependencies task, while still available, is most likely no longer necessary as PyBuilder 0.12.x manages venvs automatically.
  • it’s highly recommended to run pyb --update-project to create pyproject.toml and update setup.py.
  • Coverage 5.0+ uses sqlite to store coverage data which is now saved in $dir_target/*.coverage. If you have CI coverage analytics running you need to update the reference to the location of the coverage files.

API Changes

ExternalCommandBuilder

Where as in 0.11.x the ExternalCommandBuilder constructor was

class ExternalCommandBuilder(object):
    def __init__(self, command_name, project):
        self.command_name = command_name
        self.parts = [command_name]
        self.project = project

in 0.12.x the API now requires a reactor and an optional venv name to be able to utilize PyBuilder venv infrastructure:

class ExternalCommandBuilder(object):
    def __init__(self, command_name, project, reactor, python_env_name="pybuilder"):
        self.command_name = command_name
        self.parts = [command_name]
        self.project = project
        self.reactor = reactor
        self._env = self.reactor.python_env_registry[python_env_name]

Project.home_page

The field project.home_page was vestigial from time immemorial and has been removed as it was not used to generate any distribution metadata or anywhere else for that matter. Please use project.url or project.urls as a functioning alternative.