You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/02/04 07:53:49 UTC

[buildstream] branch tristan/bst2-separation created (now 8af144d)

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a change to branch tristan/bst2-separation
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


      at 8af144d  Implement new required 'version' specification in project.conf

This branch includes the following new commits:

     new f3413e6  Change namespace from buildstream to buildstream2
     new c63ae8c  _context.py: New default configuration file for BuildStream 2
     new 8850b16  doc/source/using_config.rst: Update documentation about default config file
     new 548c977  setup.py: Allow optionality of main entry point at install time.
     new 6f423b6  setup.py: Generate the bash completions scriptlet at install time.
     new 8af144d  Implement new required 'version' specification in project.conf

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[buildstream] 05/06: setup.py: Generate the bash completions scriptlet at install time.

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/bst2-separation
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 6f423b69e4b32e3b0443ff38c631df46ea60e7f8
Author: Tristan Van Berkom <tr...@codethink.co.uk>
AuthorDate: Tue Apr 9 15:50:25 2019 +0900

    setup.py: Generate the bash completions scriptlet at install time.
    
    The completions scriptlet needs to install the completions for
    the name of the program it installs, since BuildStream 2 can be
    installed as either `bst` or `bst2`, we need to generate this
    file with the appropriate name.
---
 buildstream2/data/bst | 21 ---------------------
 setup.py              | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 46 insertions(+), 22 deletions(-)

diff --git a/buildstream2/data/bst b/buildstream2/data/bst
deleted file mode 100644
index e38720f..0000000
--- a/buildstream2/data/bst
+++ /dev/null
@@ -1,21 +0,0 @@
-# BuildStream bash completion scriptlet.
-#
-# On systems which use the bash-completion module for
-# completion discovery with bash, this can be installed at:
-#
-#   pkg-config --variable=completionsdir bash-completion
-#
-# If BuildStream is not installed system wide, you can
-# simply source this script to enable completions or append
-# this script to your ~/.bash_completion file.
-#
-_bst_completion() {
-    local IFS=$'
-'
-    COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \
-                   COMP_CWORD=$COMP_CWORD \
-                   _BST_COMPLETION=complete $1 ) )
-    return 0
-}
-
-complete -F _bst_completion -o nospace bst;
diff --git a/setup.py b/setup.py
index 7076e8b..f348c93 100755
--- a/setup.py
+++ b/setup.py
@@ -151,6 +151,51 @@ if not os.environ.get('BST_ARTIFACTS_ONLY', ''):
         '{} = buildstream2._frontend:cli'.format(bst_entry_point)
     ]
 
+
+#####################################################
+#       Generate the bash completion scriptlet      #
+#####################################################
+#
+# Generate the bash completion scriptlet as 'bst' or 'bst2'
+# depending on the selected entry point name.
+#
+COMPLETION_SCRIPTLET = """# BuildStream bash completion scriptlet.
+#
+# On systems which use the bash-completion module for
+# completion discovery with bash, this can be installed at:
+#
+#   pkg-config --variable=completionsdir bash-completion
+#
+# If BuildStream is not installed system wide, you can
+# simply source this script to enable completions or append
+# this script to your ~/.bash_completion file.
+#
+_{entry_point}_completion() {{
+    local IFS=$'
+'
+    COMPREPLY=( $( env COMP_WORDS="${{COMP_WORDS[*]}}" \\
+                   COMP_CWORD=$COMP_CWORD \\
+                   _BST_COMPLETION=complete $1 ) )
+    return 0
+}}
+
+complete -F _bst_completion -o nospace {entry_point};
+""".format(entry_point=bst_entry_point)
+
+
+def get_completions_scriptlet():
+    bst_dir = os.path.dirname(os.path.abspath(__file__))
+    path = os.path.join(bst_dir, 'buildstream2', 'data', bst_entry_point)
+
+    # Generate the file on demand, only in response to
+    # actually installing.
+    with open(path, 'w') as f:
+        f.write(COMPLETION_SCRIPTLET)
+
+    # Return the relative path
+    return os.path.join('buildstream2', 'data', bst_entry_point)
+
+
 #####################################################
 #    Monkey-patching setuptools for performance     #
 #####################################################
@@ -352,7 +397,7 @@ setup(name='BuildStream2',
           #
           ('share/man/man1', list_man_pages()),
           ('share/bash-completion/completions', [
-              os.path.join('buildstream2', 'data', 'bst')
+              get_completions_scriptlet()
           ])
       ],
       install_requires=install_requires,


[buildstream] 02/06: _context.py: New default configuration file for BuildStream 2

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/bst2-separation
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit c63ae8c6ee45c188696cf9e447136770fbdb6388
Author: Tristan Van Berkom <tr...@codethink.co.uk>
AuthorDate: Thu Apr 4 18:27:29 2019 +0900

    _context.py: New default configuration file for BuildStream 2
    
    Default to loading ~/.config/buildstream2.conf instead
    of ~/.config/buildstream.conf.
---
 buildstream2/_context.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/buildstream2/_context.py b/buildstream2/_context.py
index fffeea1..84ea8f3 100644
--- a/buildstream2/_context.py
+++ b/buildstream2/_context.py
@@ -184,11 +184,11 @@ class Context():
     @PROFILER.profile(Topics.LOAD_CONTEXT, "load")
     def load(self, config=None):
         # If a specific config file is not specified, default to trying
-        # a $XDG_CONFIG_HOME/buildstream.conf file
+        # a $XDG_CONFIG_HOME/buildstream2.conf file
         #
         if not config:
             default_config = os.path.join(os.environ['XDG_CONFIG_HOME'],
-                                          'buildstream.conf')
+                                          'buildstream2.conf')
             if os.path.exists(default_config):
                 config = default_config
 


[buildstream] 06/06: Implement new required 'version' specification in project.conf

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/bst2-separation
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 8af144d30d3a743fa946e8579b85f7789b72e1ba
Author: Tristan Van Berkom <tr...@codethink.co.uk>
AuthorDate: Wed Apr 10 19:46:47 2019 +0900

    Implement new required 'version' specification in project.conf
    
    This adds a required field to project.conf to specify the BuildStream
    version required by the project, and this serves two separate purposes
    at once:
    
      A.) It is a more practical method for users to specify the format-version
    
          The "format-version" field requires that users know about which
          format version each YAML feature was added in, and this version
          is separate from the BuildStream version.
    
          As such, it is more difficult to use - the field is still
          preserved and supported, but mostly only useful in order
          to depend on format versions in unstable release periods.
    
      B.) It serves to ensure that the wrong major point version
          of BuildStream is never used with the wrong project.
    
    Changes in this commit include:
    
      * _versions.py: Added BST_API_VERION_MAJOR and BST_API_VERION_MINOR
    
        These include comments about how the fields must be updated when
        work commences on any major or minor point stable release, usually
        on the master branch.
    
      * _project.py: Support parsing the new "version"
    
      * _frontend/app.py: The `bst init` command has been extended to also
        dump the current API version automatically.
    
        This should really be enhanced separately, but since the test cases
        use `bst init` in some places in order to create projects for test
        purposes, I've included the minimal change here and will enhance
        `bst init` separately.
    
      * tests: All tests updated to include a "version: 2.0" specification
        in the project.conf files under test
---
 buildstream2/_frontend/app.py                      |  5 +++-
 buildstream2/_project.py                           | 33 ++++++++++++++++++++--
 buildstream2/_versions.py                          | 25 ++++++++++++++++
 buildstream2/testing/_sourcetests/mirror.py        | 12 ++++++--
 .../project/files/sub-project/project.conf         |  3 +-
 .../testing/_sourcetests/project/project.conf      |  1 +
 .../testing/_sourcetests/track_cross_junction.py   |  1 +
 buildstream2/testing/_utils/__init__.py            |  1 +
 doc/examples/autotools/project.conf                |  4 +--
 doc/examples/developing/project.conf               |  4 +--
 doc/examples/first-project/project.conf            |  4 +--
 doc/examples/flatpak-autotools/project.conf        |  2 ++
 doc/examples/integration-commands/project.conf     |  4 +--
 doc/examples/junctions/autotools/project.conf      |  4 +--
 doc/examples/junctions/project.conf                |  4 +--
 doc/examples/running-commands/project.conf         |  4 +--
 tests/artifactcache/cache_size.py                  |  3 +-
 tests/artifactcache/config.py                      |  3 +-
 tests/artifactcache/expiry/project.conf            |  1 +
 .../artifactcache/junctions/foo/base/project.conf  |  1 +
 tests/artifactcache/junctions/foo/project.conf     |  1 +
 tests/artifactcache/project/project.conf           |  3 +-
 tests/cachekey/cachekey.py                         |  1 +
 tests/cachekey/project/project.conf                |  1 +
 tests/elements/filter.py                           |  5 ++++
 tests/elements/filter/basic/project.conf           |  1 +
 tests/format/assertion/project.conf                |  1 +
 tests/format/dependencies1/project.conf            |  2 +-
 tests/format/dependencies2/project.conf            |  3 +-
 tests/format/include.py                            |  4 +--
 tests/format/include/conditional/project.conf      |  1 +
 .../format/include/eventual_overrides/project.conf |  1 +
 tests/format/include/file/project.conf             |  1 +
 .../include/file_with_subproject/project.conf      |  1 +
 .../file_with_subproject/subproject/project.conf   |  1 +
 tests/format/include/inner/project.conf            |  1 +
 tests/format/include/junction/project.conf         |  1 +
 .../include/junction/subproject/project.conf       |  1 +
 .../format/include/local_to_junction/project.conf  |  1 +
 .../local_to_junction/subproject/project.conf      |  1 +
 tests/format/include/options/project.conf          |  1 +
 .../format/include/overrides-junction/project.conf |  1 +
 .../overrides-junction/subproject/project.conf     |  1 +
 tests/format/include/overrides/project.conf        |  1 +
 .../include/overrides/subproject/project.conf      |  1 +
 tests/format/include/recursive/project.conf        |  1 +
 tests/format/include/string/project.conf           |  1 +
 tests/format/include/sub-include/project.conf      |  1 +
 tests/format/include_composition.py                |  2 +-
 tests/format/junctions/bar/project.conf            |  1 +
 tests/format/junctions/base/project.conf           |  1 +
 tests/format/junctions/conflict/project.conf       |  1 +
 tests/format/junctions/foo/project.conf            |  1 +
 .../junctionA/junctionB/project.conf               |  1 +
 .../inconsistent-names/junctionA/project.conf      |  1 +
 .../junctions/inconsistent-names/project.conf      |  1 +
 tests/format/junctions/invalid/project.conf        |  1 +
 .../junctionA/junctionB/project.conf               |  1 +
 .../missing-element/junctionA/project.conf         |  1 +
 .../format/junctions/missing-element/project.conf  |  1 +
 tests/format/junctions/nested/project.conf         |  1 +
 tests/format/junctions/options-base/project.conf   |  1 +
 .../format/junctions/options-default/project.conf  |  1 +
 .../format/junctions/options-inherit/project.conf  |  1 +
 tests/format/junctions/options/project.conf        |  1 +
 tests/format/junctions/toplevel/project.conf       |  1 +
 .../list-directive-error-element/project.conf      |  1 +
 .../list-directive-error-project/project.conf      |  1 +
 .../format/list-directive-type-error/project.conf  |  1 +
 tests/format/option-arch-alias/project.conf        |  1 +
 tests/format/option-arch-unknown/project.conf      |  1 +
 tests/format/option-arch/project.conf              |  1 +
 tests/format/option-bool/project.conf              |  1 +
 .../option-element-mask-invalid/project.conf       |  1 +
 tests/format/option-element-mask/project.conf      |  1 +
 tests/format/option-enum-missing/project.conf      |  1 +
 tests/format/option-enum/project.conf              |  1 +
 tests/format/option-exports/project.conf           |  1 +
 tests/format/option-flags-missing/project.conf     |  1 +
 tests/format/option-flags/project.conf             |  1 +
 tests/format/option-os/project.conf                |  1 +
 tests/format/option-overrides/project.conf         |  1 +
 .../options/compound-and-condition/project.conf    |  1 +
 .../options/compound-or-condition/project.conf     |  1 +
 tests/format/options/deep-nesting/project.conf     |  1 +
 .../format/options/invalid-condition/project.conf  |  1 +
 .../format/options/invalid-expression/project.conf |  1 +
 .../options/invalid-name-dashes/project.conf       |  1 +
 .../invalid-name-leading-number/project.conf       |  1 +
 .../format/options/invalid-name-plus/project.conf  |  1 +
 .../options/invalid-name-spaces/project.conf       |  1 +
 tests/format/options/invalid-type/project.conf     |  1 +
 .../invalid-variable-name-plus/project.conf        |  1 +
 .../invalid-variable-name-spaces/project.conf      |  1 +
 tests/format/options/nested-condition/project.conf |  1 +
 tests/format/options/simple-condition/project.conf |  1 +
 .../format/options/undefined-variable/project.conf |  1 +
 .../prepend-configure-commands/project.conf        |  1 +
 tests/format/project.py                            |  1 +
 tests/format/project/default/project.conf          |  1 +
 .../format/project/duplicate-plugins/project.conf  |  1 +
 tests/format/project/element-path/project.conf     |  1 +
 tests/format/project/empty-depends/project.conf    |  1 +
 tests/format/project/emptyname/project.conf        |  1 +
 tests/format/project/invalid-yaml/project.conf     |  4 +--
 tests/format/project/invalidname/project.conf      |  1 +
 tests/format/project/local-plugin/project.conf     |  1 +
 tests/format/project/missing-element/project.conf  |  1 +
 tests/format/project/missing-junction/project.conf |  1 +
 tests/format/project/missingname/project.conf      |  1 +
 tests/format/project/overridepath/project.conf     |  1 +
 tests/format/project/plugin-allowed/project.conf   |  1 +
 tests/format/project/plugin-forbidden/project.conf |  1 +
 .../project/plugin-preflight-error/project.conf    |  1 +
 .../project/project-from-subdir/project.conf       |  4 +--
 tests/format/project/refs-options/project.conf     |  1 +
 tests/format/project/unsupported/project.conf      |  1 +
 tests/format/variables.py                          |  2 ++
 .../format/variables/cyclic_variables/project.conf |  1 +
 tests/format/variables/defaults/project.conf       |  3 +-
 .../variables/missing_variables/project.conf       |  3 +-
 tests/format/variables/overrides/project.conf      |  3 +-
 tests/format/variables/protected-vars/project.conf |  1 +
 tests/frontend/__init__.py                         |  1 +
 .../completions/no-element-path/project.conf       |  2 +-
 tests/frontend/completions/project/project.conf    |  3 +-
 .../frontend/completions/sub-folders/project.conf  |  3 +-
 tests/frontend/configurable_warnings.py            |  1 +
 tests/frontend/configuredwarning/project.conf      |  1 +
 tests/frontend/consistencyerror/project.conf       |  1 +
 tests/frontend/cross_junction_workspace.py         |  4 +--
 tests/frontend/exceptions/project.conf             |  3 +-
 tests/frontend/invalid_element_path/project.conf   |  3 +-
 tests/frontend/mirror.py                           |  5 ++++
 tests/frontend/overlaps.py                         |  3 +-
 .../project/files/sub-project/project.conf         |  3 +-
 tests/frontend/project/project.conf                |  3 +-
 tests/frontend/project_default/project.conf        |  3 +-
 tests/frontend/project_fail/project.conf           |  3 +-
 .../project_world/files/sub-project/project.conf   |  3 +-
 tests/frontend/project_world/project.conf          |  3 +-
 .../track-cross-junction/subproject/project.conf   |  1 +
 tests/frontend/track-optional-inline/project.conf  |  2 +-
 .../track-optional-project-refs/project.conf       |  1 +
 tests/frontend/track.py                            |  1 +
 tests/frontend/workspaced-build-dep/project.conf   |  4 +--
 tests/frontend/workspaced-runtime-dep/project.conf |  4 +--
 tests/integration/project/project.conf             |  2 +-
 tests/internals/loader/onefile/project.conf        |  1 +
 .../pluginloading/badversionelement/project.conf   |  1 +
 .../pluginloading/badversionsource/project.conf    |  1 +
 .../pluginloading/customelement/project.conf       |  1 +
 .../pluginloading/customsource/project.conf        |  1 +
 .../deprecationwarnings/project/project.conf       |  4 +--
 tests/remoteexecution/project/project.conf         |  1 +
 tests/sandboxes/missing-command/project.conf       |  1 +
 tests/sandboxes/missing-dependencies/project.conf  |  2 +-
 tests/sourcecache/project/project.conf             |  2 +-
 tests/sources/bzr/project.conf                     |  1 +
 tests/sources/deb.py                               |  1 +
 tests/sources/git.py                               |  5 ++++
 tests/sources/git/project-override/project.conf    |  1 +
 tests/sources/git/template/project.conf            |  1 +
 tests/sources/local/basic/project.conf             |  1 +
 tests/sources/local/directory/project.conf         |  1 +
 tests/sources/local/file-exists/project.conf       |  1 +
 .../local/invalid-relative-path/project.conf       |  1 +
 tests/sources/local/symlink/project.conf           |  1 +
 tests/sources/no-fetch-cached/project.conf         |  2 +-
 tests/sources/ostree/template/project.conf         |  1 +
 tests/sources/patch/basic/project.conf             |  1 +
 .../patch/different-strip-level/project.conf       |  1 +
 .../patch/invalid-relative-path/project.conf       |  1 +
 tests/sources/patch/multiple-patches/project.conf  |  1 +
 .../sources/patch/separate-patch-dir/project.conf  |  1 +
 tests/sources/pip.py                               |  2 +-
 tests/sources/previous_source_access/project.conf  |  2 ++
 tests/sources/project_key_test/project.conf        |  2 +-
 tests/sources/remote.py                            |  2 ++
 tests/sources/tar.py                               |  2 ++
 tests/sources/zip.py                               |  2 ++
 181 files changed, 282 insertions(+), 78 deletions(-)

diff --git a/buildstream2/_frontend/app.py b/buildstream2/_frontend/app.py
index d4ea838..9849367 100644
--- a/buildstream2/_frontend/app.py
+++ b/buildstream2/_frontend/app.py
@@ -36,7 +36,7 @@ from .._project import Project
 from .._exceptions import BstError, StreamError, LoadError, LoadErrorReason, AppError
 from .._message import Message, MessageType, unconditional_messages
 from .._stream import Stream
-from .._versions import BST_FORMAT_VERSION
+from .._versions import BST_FORMAT_VERSION, BST_API_VERSION_MAJOR, BST_API_VERSION_MINOR
 from .. import _yaml
 from .._scheduler import ElementJob, JobStatus
 
@@ -355,6 +355,9 @@ class App():
                 with open(project_path, 'w') as f:
                     f.write("# Unique project name\n" +
                             "name: {}\n\n".format(project_name) +
+                            "# Required BuildStream version\n" +
+                            "version: {}.{}\n\n".format(BST_API_VERSION_MAJOR,
+                                                        BST_API_VERSION_MINOR) +
                             "# Required BuildStream format version\n" +
                             "format-version: {}\n\n".format(format_version) +
                             "# Subdirectory where elements are stored\n" +
diff --git a/buildstream2/_project.py b/buildstream2/_project.py
index 788ebb4..d45cde7 100644
--- a/buildstream2/_project.py
+++ b/buildstream2/_project.py
@@ -40,7 +40,7 @@ from ._elementfactory import ElementFactory
 from ._sourcefactory import SourceFactory
 from .types import CoreWarnings
 from ._projectrefs import ProjectRefs, ProjectRefStorage
-from ._versions import BST_FORMAT_VERSION
+from ._versions import BST_FORMAT_VERSION, BST_API_VERSION_MAJOR, BST_API_VERSION_MINOR
 from ._loader import Loader
 from .element import Element
 from ._message import Message, MessageType
@@ -331,7 +331,7 @@ class Project():
 
     def _validate_node(self, node):
         _yaml.node_validate(node, [
-            'format-version',
+            'version', 'format-version',
             'element-path', 'variables',
             'environment', 'environment-nocache',
             'split-rules', 'elements', 'plugins',
@@ -583,6 +583,10 @@ class Project():
         _yaml.composite(pre_config_node, self._project_conf)
 
         # Assert project's format version early, before validating toplevel keys
+        #
+        # This is optional and allows fine grained control on format additions
+        # in between stable releases.
+        #
         format_version = _yaml.node_get(pre_config_node, int, 'format-version')
         if BST_FORMAT_VERSION < format_version:
             major, minor = utils.get_bst_version()
@@ -591,6 +595,31 @@ class Project():
                 "Project requested format version {}, but BuildStream {}.{} only supports up until format version {}"
                 .format(format_version, major, minor, BST_FORMAT_VERSION))
 
+        # Assert project's API version early, before validating toplevel keys
+        #
+        # This is mandatory (there is no default specified in the default project YAML),
+        # and this is the normal way for specifying the minimal version of BuildStream
+        # required by the project.
+        api_version = _yaml.node_get(pre_config_node, str, 'version')
+        api_versions = api_version.split('.')
+        if not all(v.isdigit() for v in api_versions) or len(api_versions) != 2:
+            p = _yaml.node_get_provenance(pre_config_node, 'version')
+            raise LoadError(
+                LoadErrorReason.INVALID_DATA,
+                "{}: Malformed version specified: {}".format(p, api_version),
+                detail="The required version must be specified as MAJOR.MINOR, " +
+                "the current version is: {}.{}".format(BST_API_VERSION_MAJOR,
+                                                       BST_API_VERSION_MINOR))
+
+        # Major version must match, minor version is minimal bound.
+        if int(api_versions[0]) != BST_API_VERSION_MAJOR or \
+           int(api_versions[1]) > BST_API_VERSION_MINOR:
+            raise LoadError(
+                LoadErrorReason.UNSUPPORTED_PROJECT,
+                "Project requested BuildStream {}.{} and cannot be loaded with BuildStream {}.{}"
+                .format(api_versions[0], api_versions[1],
+                        BST_API_VERSION_MAJOR, BST_API_VERSION_MINOR))
+
         self._validate_node(pre_config_node)
 
         # The project name, element path and option declarations
diff --git a/buildstream2/_versions.py b/buildstream2/_versions.py
index 56fd952..baf821a 100644
--- a/buildstream2/_versions.py
+++ b/buildstream2/_versions.py
@@ -17,6 +17,31 @@
 #  Authors:
 #        Tristan Van Berkom <tr...@codethink.co.uk>
 
+# The API version.
+#
+# This is encoded into BuildStream so that we can perform
+# checks in advance of a release.
+#
+# Rules for updating the versions:
+#
+#    BST_API_VERSION_MAJOR
+#    ~~~~~~~~~~~~~~~~~~~~~
+#    This indicates the main API version, it should only ever
+#    be incremented if we break API again and release BuildStream 3.
+#
+#    BST_API_VERSION_MINOR
+#    ~~~~~~~~~~~~~~~~~~~~~
+#    This should be incremented to the next even number in the master
+#    branch directly after releasing a new stable minor point release.
+#
+#    I.e. after releasing BuildStream 2.0, BST_API_VERSION_MINOR should
+#    be set to 2 in the master branch where we will create development
+#    snapshots of 2.1, leading up to the next feature adding release
+#    of 2.2.
+#
+BST_API_VERSION_MAJOR = 2
+BST_API_VERSION_MINOR = 0
+
 
 # The base BuildStream format version
 #
diff --git a/buildstream2/testing/_sourcetests/mirror.py b/buildstream2/testing/_sourcetests/mirror.py
index 7c4694e..cbc11df 100644
--- a/buildstream2/testing/_sourcetests/mirror.py
+++ b/buildstream2/testing/_sourcetests/mirror.py
@@ -70,6 +70,7 @@ def test_mirror_fetch(cli, tmpdir, datafiles, kind):
 
     project = {
         'name': 'test',
+        'version': '2.0',
         'element-path': 'elements',
         'aliases': {
             alias: upstream_map + "/"
@@ -128,6 +129,7 @@ def test_mirror_fetch_upstream_absent(cli, tmpdir, datafiles, kind):
 
     project = {
         'name': 'test',
+        'version': '2.0',
         'element-path': 'elements',
         'aliases': {
             alias: 'http://www.example.com/'
@@ -184,7 +186,8 @@ def test_mirror_from_includes(cli, tmpdir, datafiles, kind):
     config_project_dir = str(tmpdir.join('config'))
     os.makedirs(config_project_dir, exist_ok=True)
     config_project = {
-        'name': 'config'
+        'name': 'config',
+        'version': '2.0'
     }
     _yaml.dump(config_project, os.path.join(config_project_dir, 'project.conf'))
     extra_mirrors = {
@@ -204,6 +207,7 @@ def test_mirror_from_includes(cli, tmpdir, datafiles, kind):
 
     project = {
         'name': 'test',
+        'version': '2.0',
         'element-path': 'elements',
         'aliases': {
             alias: upstream_map + "/"
@@ -257,7 +261,8 @@ def test_mirror_junction_from_includes(cli, tmpdir, datafiles, kind):
     config_project_dir = str(tmpdir.join('config'))
     os.makedirs(config_project_dir, exist_ok=True)
     config_project = {
-        'name': 'config'
+        'name': 'config',
+        'version': '2.0'
     }
     _yaml.dump(config_project, os.path.join(config_project_dir, 'project.conf'))
     extra_mirrors = {
@@ -277,6 +282,7 @@ def test_mirror_junction_from_includes(cli, tmpdir, datafiles, kind):
 
     project = {
         'name': 'test',
+        'version': '2.0',
         'element-path': 'elements',
         'aliases': {
             alias: upstream_map + "/"
@@ -336,6 +342,7 @@ def test_mirror_track_upstream_present(cli, tmpdir, datafiles, kind):
 
     project = {
         'name': 'test',
+        'version': '2.0',
         'element-path': 'elements',
         'aliases': {
             alias: upstream_map + "/"
@@ -401,6 +408,7 @@ def test_mirror_track_upstream_absent(cli, tmpdir, datafiles, kind):
 
     project = {
         'name': 'test',
+        'version': '2.0',
         'element-path': 'elements',
         'aliases': {
             alias: 'http://www.example.com/'
diff --git a/buildstream2/testing/_sourcetests/project/files/sub-project/project.conf b/buildstream2/testing/_sourcetests/project/files/sub-project/project.conf
index bbb8414..2e22edc 100644
--- a/buildstream2/testing/_sourcetests/project/files/sub-project/project.conf
+++ b/buildstream2/testing/_sourcetests/project/files/sub-project/project.conf
@@ -1,4 +1,3 @@
-# Project config for frontend build test
 name: subtest
-
+version: 2.0
 element-path: elements
diff --git a/buildstream2/testing/_sourcetests/project/project.conf b/buildstream2/testing/_sourcetests/project/project.conf
index 05b68bf..c01635f 100644
--- a/buildstream2/testing/_sourcetests/project/project.conf
+++ b/buildstream2/testing/_sourcetests/project/project.conf
@@ -1,5 +1,6 @@
 # Project config for frontend build test
 name: test
+version: 2.0
 element-path: elements
 aliases:
   alpine: https://bst-integration-test-images.ams3.cdn.digitaloceanspaces.com/
diff --git a/buildstream2/testing/_sourcetests/track_cross_junction.py b/buildstream2/testing/_sourcetests/track_cross_junction.py
index 96f02e3..d4517b9 100644
--- a/buildstream2/testing/_sourcetests/track_cross_junction.py
+++ b/buildstream2/testing/_sourcetests/track_cross_junction.py
@@ -72,6 +72,7 @@ def generate_project(tmpdir, name, config=None):
 
     project_conf = {
         'name': name,
+        'version': '2.0',
         'element-path': 'elements'
     }
     project_conf.update(config)
diff --git a/buildstream2/testing/_utils/__init__.py b/buildstream2/testing/_utils/__init__.py
index 0d1484a..79b1d53 100644
--- a/buildstream2/testing/_utils/__init__.py
+++ b/buildstream2/testing/_utils/__init__.py
@@ -6,5 +6,6 @@ from .junction import generate_junction
 
 def configure_project(path, config):
     config['name'] = 'test'
+    config['version'] = '2.0'
     config['element-path'] = 'elements'
     _yaml.dump(config, os.path.join(path, 'project.conf'))
diff --git a/doc/examples/autotools/project.conf b/doc/examples/autotools/project.conf
index 96e0284..134d6e9 100644
--- a/doc/examples/autotools/project.conf
+++ b/doc/examples/autotools/project.conf
@@ -1,8 +1,8 @@
 # Unique project name
 name: autotools
 
-# Required BuildStream format version
-format-version: 9
+# Required BuildStream version
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/doc/examples/developing/project.conf b/doc/examples/developing/project.conf
index 1ae2e08..1adafb2 100644
--- a/doc/examples/developing/project.conf
+++ b/doc/examples/developing/project.conf
@@ -1,8 +1,8 @@
 # Unique project name
 name: developing 
 
-# Required BuildStream format version
-format-version: 9
+# Required BuildStream version
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/doc/examples/first-project/project.conf b/doc/examples/first-project/project.conf
index 2182d35..f423b27 100644
--- a/doc/examples/first-project/project.conf
+++ b/doc/examples/first-project/project.conf
@@ -1,8 +1,8 @@
 # Unique project name
 name: first-project
 
-# Required BuildStream format version
-format-version: 9
+# Required BuildStream version
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/doc/examples/flatpak-autotools/project.conf b/doc/examples/flatpak-autotools/project.conf
index 401dc56..34faeb7 100644
--- a/doc/examples/flatpak-autotools/project.conf
+++ b/doc/examples/flatpak-autotools/project.conf
@@ -1,5 +1,7 @@
 name: flatpak-autotools
 
+version: 2.0
+
 aliases:
   gnomesdk: https://sdk.gnome.org/
 
diff --git a/doc/examples/integration-commands/project.conf b/doc/examples/integration-commands/project.conf
index 9ae5b2a..7d889a7 100644
--- a/doc/examples/integration-commands/project.conf
+++ b/doc/examples/integration-commands/project.conf
@@ -1,8 +1,8 @@
 # Unique project name
 name: integration-commands
 
-# Required BuildStream format version
-format-version: 9
+# Required BuildStream version
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/doc/examples/junctions/autotools/project.conf b/doc/examples/junctions/autotools/project.conf
index 2cf5824..9f5f1c8 100644
--- a/doc/examples/junctions/autotools/project.conf
+++ b/doc/examples/junctions/autotools/project.conf
@@ -1,8 +1,8 @@
 # Unique project name
 name: autotools
 
-# Required BuildStream format version
-format-version: 9
+# Required BuildStream version
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/doc/examples/junctions/project.conf b/doc/examples/junctions/project.conf
index 7f8ca6a..fc1cdec 100644
--- a/doc/examples/junctions/project.conf
+++ b/doc/examples/junctions/project.conf
@@ -1,8 +1,8 @@
 # Unique project name
 name: junctions
 
-# Required BuildStream format version
-format-version: 9
+# Required BuildStream version
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/doc/examples/running-commands/project.conf b/doc/examples/running-commands/project.conf
index 7127b0d..85e3155 100644
--- a/doc/examples/running-commands/project.conf
+++ b/doc/examples/running-commands/project.conf
@@ -1,8 +1,8 @@
 # Unique project name
 name: running-commands
 
-# Required BuildStream format version
-format-version: 9
+# Required BuildStream version
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/tests/artifactcache/cache_size.py b/tests/artifactcache/cache_size.py
index 1209802..6479e77 100644
--- a/tests/artifactcache/cache_size.py
+++ b/tests/artifactcache/cache_size.py
@@ -17,7 +17,8 @@ from tests.testutils import create_element_size
 def create_project(project_dir):
     project_file = os.path.join(project_dir, "project.conf")
     project_conf = {
-        "name": "test"
+        "name": "test",
+        "version": "2.0"
     }
     _yaml.dump(project_conf, project_file)
     element_name = "test.bst"
diff --git a/tests/artifactcache/config.py b/tests/artifactcache/config.py
index 1eceef5..c422e8e 100644
--- a/tests/artifactcache/config.py
+++ b/tests/artifactcache/config.py
@@ -90,6 +90,7 @@ def test_artifact_cache_precedence(tmpdir, override_caches, project_caches, user
     # Produce a fake user and project config with the cache configuration.
     user_config, project_config = configure_remote_caches(override_caches, project_caches, user_caches)
     project_config['name'] = 'test'
+    project_config['version'] = '2.0'
 
     user_config_file = str(tmpdir.join('buildstream.conf'))
     _yaml.dump(_yaml.node_sanitize(user_config), filename=user_config_file)
@@ -124,7 +125,7 @@ def test_missing_certs(cli, datafiles, config_key, config_value):
 
     project_conf = {
         'name': 'test',
-
+        'version': '2.0',
         'artifacts': {
             'url': 'https://cache.example.com:12345',
             'push': 'true',
diff --git a/tests/artifactcache/expiry/project.conf b/tests/artifactcache/expiry/project.conf
index 18db7da..2fae7ed 100644
--- a/tests/artifactcache/expiry/project.conf
+++ b/tests/artifactcache/expiry/project.conf
@@ -1,5 +1,6 @@
 # Project config for cache expiry test
 name: test
+version: 2.0
 element-path: elements
 aliases:
   project_dir: file://{project_dir}
diff --git a/tests/artifactcache/junctions/foo/base/project.conf b/tests/artifactcache/junctions/foo/base/project.conf
index 951ea1a..5ab1fe9 100644
--- a/tests/artifactcache/junctions/foo/base/project.conf
+++ b/tests/artifactcache/junctions/foo/base/project.conf
@@ -1 +1,2 @@
 name: base
+version: 2.0
diff --git a/tests/artifactcache/junctions/foo/project.conf b/tests/artifactcache/junctions/foo/project.conf
index 5a240e3..a0b5d61 100644
--- a/tests/artifactcache/junctions/foo/project.conf
+++ b/tests/artifactcache/junctions/foo/project.conf
@@ -1 +1,2 @@
 name: foo
+version: 2.0
diff --git a/tests/artifactcache/project/project.conf b/tests/artifactcache/project/project.conf
index 854e386..7c4d235 100644
--- a/tests/artifactcache/project/project.conf
+++ b/tests/artifactcache/project/project.conf
@@ -1,4 +1,3 @@
-# Project config for frontend build test
 name: test
-
+version: 2.0
 element-path: elements
diff --git a/tests/cachekey/cachekey.py b/tests/cachekey/cachekey.py
index f871f84..fbbadf5 100644
--- a/tests/cachekey/cachekey.py
+++ b/tests/cachekey/cachekey.py
@@ -193,6 +193,7 @@ def test_cache_key_fatal_warnings(cli, tmpdir, first_warnings, second_warnings,
     def run_get_cache_key(project_name, warnings):
         config = {
             'name': project_name,
+            'version': '2.0',
             'element-path': 'elements',
             'fatal-warnings': warnings
         }
diff --git a/tests/cachekey/project/project.conf b/tests/cachekey/project/project.conf
index 49726cd..4fe5d59 100644
--- a/tests/cachekey/project/project.conf
+++ b/tests/cachekey/project/project.conf
@@ -1,2 +1,3 @@
 # Project config for cache key test
 name: cachekey
+version: 2.0
diff --git a/tests/elements/filter.py b/tests/elements/filter.py
index 8da5575..14d2bbc 100644
--- a/tests/elements/filter.py
+++ b/tests/elements/filter.py
@@ -199,6 +199,7 @@ def test_filter_track(datafiles, cli, tmpdir):
 
     project_config = {
         "name": "filter-track-test",
+        "version": "2.0",
         "element-path": "elements",
     }
     project_file = os.path.join(str(tmpdir), "project.conf")
@@ -254,6 +255,7 @@ def test_filter_track_excepted(datafiles, cli, tmpdir):
 
     project_config = {
         "name": "filter-track-test",
+        "version": "2.0",
         "element-path": "elements",
     }
     project_file = os.path.join(str(tmpdir), "project.conf")
@@ -308,6 +310,7 @@ def test_filter_track_multi_to_one(datafiles, cli, tmpdir):
 
     project_config = {
         "name": "filter-track-test",
+        "version": "2.0",
         "element-path": "elements",
     }
     project_file = os.path.join(str(tmpdir), "project.conf")
@@ -364,6 +367,7 @@ def test_filter_track_multi(datafiles, cli, tmpdir):
 
     project_config = {
         "name": "filter-track-test",
+        "version": "2.0",
         "element-path": "elements",
     }
     project_file = os.path.join(str(tmpdir), "project.conf")
@@ -434,6 +438,7 @@ def test_filter_track_multi_exclude(datafiles, cli, tmpdir):
 
     project_config = {
         "name": "filter-track-test",
+        "version": "2.0",
         "element-path": "elements",
     }
     project_file = os.path.join(str(tmpdir), "project.conf")
diff --git a/tests/elements/filter/basic/project.conf b/tests/elements/filter/basic/project.conf
index 418ed02..5752adc 100644
--- a/tests/elements/filter/basic/project.conf
+++ b/tests/elements/filter/basic/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 element-path: elements
 plugins:
 - origin: local
diff --git a/tests/format/assertion/project.conf b/tests/format/assertion/project.conf
index 4c00166..5a1fd09 100644
--- a/tests/format/assertion/project.conf
+++ b/tests/format/assertion/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   pony:
diff --git a/tests/format/dependencies1/project.conf b/tests/format/dependencies1/project.conf
index fcd60b6..7c4d235 100644
--- a/tests/format/dependencies1/project.conf
+++ b/tests/format/dependencies1/project.conf
@@ -1,3 +1,3 @@
-# Basic project
 name: test
+version: 2.0
 element-path: elements
diff --git a/tests/format/dependencies2/project.conf b/tests/format/dependencies2/project.conf
index 2027cc2..0932d16 100644
--- a/tests/format/dependencies2/project.conf
+++ b/tests/format/dependencies2/project.conf
@@ -1,3 +1,2 @@
-# Basic project configuration that doesnt override anything
-#
 name: pony
+version: 2.0
diff --git a/tests/format/include.py b/tests/format/include.py
index 4b1da92..1143bd4 100644
--- a/tests/format/include.py
+++ b/tests/format/include.py
@@ -32,7 +32,7 @@ def test_include_project_file(cli, datafiles):
 
 
 def test_include_missing_file(cli, tmpdir):
-    tmpdir.join('project.conf').write('{"name": "test"}')
+    tmpdir.join('project.conf').write('{"name": "test", "version": "2.0"}')
     element = tmpdir.join('include_missing_file.bst')
 
     # Normally we would use dicts and _yaml.dump to write such things, but here
@@ -51,7 +51,7 @@ def test_include_missing_file(cli, tmpdir):
 
 
 def test_include_dir(cli, tmpdir):
-    tmpdir.join('project.conf').write('{"name": "test"}')
+    tmpdir.join('project.conf').write('{"name": "test", "version": "2.0"}')
     tmpdir.mkdir('subdir')
     element = tmpdir.join('include_dir.bst')
 
diff --git a/tests/format/include/conditional/project.conf b/tests/format/include/conditional/project.conf
index cb54779..46e3c0b 100644
--- a/tests/format/include/conditional/project.conf
+++ b/tests/format/include/conditional/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   build_arch:
diff --git a/tests/format/include/eventual_overrides/project.conf b/tests/format/include/eventual_overrides/project.conf
index b327536..91db2ee 100644
--- a/tests/format/include/eventual_overrides/project.conf
+++ b/tests/format/include/eventual_overrides/project.conf
@@ -1 +1,2 @@
 name: test
+version: 2.0
diff --git a/tests/format/include/file/project.conf b/tests/format/include/file/project.conf
index a7791a4..cdcfbc1 100644
--- a/tests/format/include/file/project.conf
+++ b/tests/format/include/file/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 (@):
   - extra_conf.yml
diff --git a/tests/format/include/file_with_subproject/project.conf b/tests/format/include/file_with_subproject/project.conf
index a7791a4..cdcfbc1 100644
--- a/tests/format/include/file_with_subproject/project.conf
+++ b/tests/format/include/file_with_subproject/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 (@):
   - extra_conf.yml
diff --git a/tests/format/include/file_with_subproject/subproject/project.conf b/tests/format/include/file_with_subproject/subproject/project.conf
index 7a66554..733abed 100644
--- a/tests/format/include/file_with_subproject/subproject/project.conf
+++ b/tests/format/include/file_with_subproject/subproject/project.conf
@@ -1 +1,2 @@
 name: test-sub
+version: 2.0
diff --git a/tests/format/include/inner/project.conf b/tests/format/include/inner/project.conf
index 8bdfc42..3cca4c3 100644
--- a/tests/format/include/inner/project.conf
+++ b/tests/format/include/inner/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   (@):
diff --git a/tests/format/include/junction/project.conf b/tests/format/include/junction/project.conf
index 4836c5f..6a56aaa 100644
--- a/tests/format/include/junction/project.conf
+++ b/tests/format/include/junction/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 (@):
   - junction.bst:extra_conf.yml
diff --git a/tests/format/include/junction/subproject/project.conf b/tests/format/include/junction/subproject/project.conf
index 7a66554..733abed 100644
--- a/tests/format/include/junction/subproject/project.conf
+++ b/tests/format/include/junction/subproject/project.conf
@@ -1 +1,2 @@
 name: test-sub
+version: 2.0
diff --git a/tests/format/include/local_to_junction/project.conf b/tests/format/include/local_to_junction/project.conf
index 4836c5f..6a56aaa 100644
--- a/tests/format/include/local_to_junction/project.conf
+++ b/tests/format/include/local_to_junction/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 (@):
   - junction.bst:extra_conf.yml
diff --git a/tests/format/include/local_to_junction/subproject/project.conf b/tests/format/include/local_to_junction/subproject/project.conf
index 7a66554..733abed 100644
--- a/tests/format/include/local_to_junction/subproject/project.conf
+++ b/tests/format/include/local_to_junction/subproject/project.conf
@@ -1 +1,2 @@
 name: test-sub
+version: 2.0
diff --git a/tests/format/include/options/project.conf b/tests/format/include/options/project.conf
index a7791a4..cdcfbc1 100644
--- a/tests/format/include/options/project.conf
+++ b/tests/format/include/options/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 (@):
   - extra_conf.yml
diff --git a/tests/format/include/overrides-junction/project.conf b/tests/format/include/overrides-junction/project.conf
index d03bec6..e3a0179 100644
--- a/tests/format/include/overrides-junction/project.conf
+++ b/tests/format/include/overrides-junction/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 elements:
   junction:
diff --git a/tests/format/include/overrides-junction/subproject/project.conf b/tests/format/include/overrides-junction/subproject/project.conf
index 7a66554..733abed 100644
--- a/tests/format/include/overrides-junction/subproject/project.conf
+++ b/tests/format/include/overrides-junction/subproject/project.conf
@@ -1 +1,2 @@
 name: test-sub
+version: 2.0
diff --git a/tests/format/include/overrides/project.conf b/tests/format/include/overrides/project.conf
index fa3c757..4bc8f63 100644
--- a/tests/format/include/overrides/project.conf
+++ b/tests/format/include/overrides/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 elements:
   junction:
diff --git a/tests/format/include/overrides/subproject/project.conf b/tests/format/include/overrides/subproject/project.conf
index 7a66554..733abed 100644
--- a/tests/format/include/overrides/subproject/project.conf
+++ b/tests/format/include/overrides/subproject/project.conf
@@ -1 +1,2 @@
 name: test-sub
+version: 2.0
diff --git a/tests/format/include/recursive/project.conf b/tests/format/include/recursive/project.conf
index a7791a4..cdcfbc1 100644
--- a/tests/format/include/recursive/project.conf
+++ b/tests/format/include/recursive/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 (@):
   - extra_conf.yml
diff --git a/tests/format/include/string/project.conf b/tests/format/include/string/project.conf
index 6ee9988..4276b3e 100644
--- a/tests/format/include/string/project.conf
+++ b/tests/format/include/string/project.conf
@@ -1,3 +1,4 @@
 name: test
+version: 2.0
 
 (@): extra_conf.yml
diff --git a/tests/format/include/sub-include/project.conf b/tests/format/include/sub-include/project.conf
index 7f7df84..4dd5b28 100644
--- a/tests/format/include/sub-include/project.conf
+++ b/tests/format/include/sub-include/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 elements:
   manual:
diff --git a/tests/format/include_composition.py b/tests/format/include_composition.py
index 00097ea..2c880dd 100644
--- a/tests/format/include_composition.py
+++ b/tests/format/include_composition.py
@@ -6,7 +6,7 @@ from buildstream2 import _yaml
 
 
 def make_includes(basedir):
-    _yaml.dump({'name': 'test'},
+    _yaml.dump({'name': 'test', 'version': '2.0'},
                os.path.join(basedir, 'project.conf'))
     context = Context()
     project = Project(basedir, context)
diff --git a/tests/format/junctions/bar/project.conf b/tests/format/junctions/bar/project.conf
index f8ed662..a8ef1cc 100644
--- a/tests/format/junctions/bar/project.conf
+++ b/tests/format/junctions/bar/project.conf
@@ -1 +1,2 @@
 name: bar
+version: 2.0
diff --git a/tests/format/junctions/base/project.conf b/tests/format/junctions/base/project.conf
index 951ea1a..5ab1fe9 100644
--- a/tests/format/junctions/base/project.conf
+++ b/tests/format/junctions/base/project.conf
@@ -1 +1,2 @@
 name: base
+version: 2.0
diff --git a/tests/format/junctions/conflict/project.conf b/tests/format/junctions/conflict/project.conf
index 395bb84..fd429e4 100644
--- a/tests/format/junctions/conflict/project.conf
+++ b/tests/format/junctions/conflict/project.conf
@@ -1 +1,2 @@
 name: conflict
+version: 2.0
diff --git a/tests/format/junctions/foo/project.conf b/tests/format/junctions/foo/project.conf
index 5a240e3..a0b5d61 100644
--- a/tests/format/junctions/foo/project.conf
+++ b/tests/format/junctions/foo/project.conf
@@ -1 +1,2 @@
 name: foo
+version: 2.0
diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf b/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf
index 2e96170..9c41e13 100644
--- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf
+++ b/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf
@@ -1,5 +1,6 @@
 # Unique project name
 name: projectB
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/tests/format/junctions/inconsistent-names/junctionA/project.conf b/tests/format/junctions/inconsistent-names/junctionA/project.conf
index 166c4b7..14924ba 100644
--- a/tests/format/junctions/inconsistent-names/junctionA/project.conf
+++ b/tests/format/junctions/inconsistent-names/junctionA/project.conf
@@ -1,5 +1,6 @@
 # Unique project name
 name: projectA
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/tests/format/junctions/inconsistent-names/project.conf b/tests/format/junctions/inconsistent-names/project.conf
index 064bbc5..200a970 100644
--- a/tests/format/junctions/inconsistent-names/project.conf
+++ b/tests/format/junctions/inconsistent-names/project.conf
@@ -1,5 +1,6 @@
 # Unique project name
 name: inconsistent-names
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/tests/format/junctions/invalid/project.conf b/tests/format/junctions/invalid/project.conf
index 38070bf..75ca8e4 100644
--- a/tests/format/junctions/invalid/project.conf
+++ b/tests/format/junctions/invalid/project.conf
@@ -1 +1,2 @@
 name: invalid
+version: 2.0
diff --git a/tests/format/junctions/missing-element/junctionA/junctionB/project.conf b/tests/format/junctions/missing-element/junctionA/junctionB/project.conf
index 41b8d6c..929fcd6 100644
--- a/tests/format/junctions/missing-element/junctionA/junctionB/project.conf
+++ b/tests/format/junctions/missing-element/junctionA/junctionB/project.conf
@@ -1 +1,2 @@
 name: projectB
+version: 2.0
diff --git a/tests/format/junctions/missing-element/junctionA/project.conf b/tests/format/junctions/missing-element/junctionA/project.conf
index 5f6ab28..eb367c6 100644
--- a/tests/format/junctions/missing-element/junctionA/project.conf
+++ b/tests/format/junctions/missing-element/junctionA/project.conf
@@ -1 +1,2 @@
 name: projectA
+version: 2.0
diff --git a/tests/format/junctions/missing-element/project.conf b/tests/format/junctions/missing-element/project.conf
index b327536..91db2ee 100644
--- a/tests/format/junctions/missing-element/project.conf
+++ b/tests/format/junctions/missing-element/project.conf
@@ -1 +1,2 @@
 name: test
+version: 2.0
diff --git a/tests/format/junctions/nested/project.conf b/tests/format/junctions/nested/project.conf
index 551f51c..37e651a 100644
--- a/tests/format/junctions/nested/project.conf
+++ b/tests/format/junctions/nested/project.conf
@@ -1 +1,2 @@
 name: nested
+version: 2.0
diff --git a/tests/format/junctions/options-base/project.conf b/tests/format/junctions/options-base/project.conf
index a98ebd5..a445a66 100644
--- a/tests/format/junctions/options-base/project.conf
+++ b/tests/format/junctions/options-base/project.conf
@@ -1,4 +1,5 @@
 name: options-base
+version: 2.0
 options:
   animal:
     type: enum
diff --git a/tests/format/junctions/options-default/project.conf b/tests/format/junctions/options-default/project.conf
index b9e58a5..f1bc5de 100644
--- a/tests/format/junctions/options-default/project.conf
+++ b/tests/format/junctions/options-default/project.conf
@@ -1 +1,2 @@
 name: options-default
+version: 2.0
diff --git a/tests/format/junctions/options-inherit/project.conf b/tests/format/junctions/options-inherit/project.conf
index 1e0ea44..e9ffe5c 100644
--- a/tests/format/junctions/options-inherit/project.conf
+++ b/tests/format/junctions/options-inherit/project.conf
@@ -1,4 +1,5 @@
 name: options-inherit
+version: 2.0
 options:
   animal:
     type: enum
diff --git a/tests/format/junctions/options/project.conf b/tests/format/junctions/options/project.conf
index de53ae1..b9b9d56 100644
--- a/tests/format/junctions/options/project.conf
+++ b/tests/format/junctions/options/project.conf
@@ -1 +1,2 @@
 name: options
+version: 2.0
diff --git a/tests/format/junctions/toplevel/project.conf b/tests/format/junctions/toplevel/project.conf
index 496c821..acf57b2 100644
--- a/tests/format/junctions/toplevel/project.conf
+++ b/tests/format/junctions/toplevel/project.conf
@@ -1 +1,2 @@
 name: toplevel
+version: 2.0
diff --git a/tests/format/list-directive-error-element/project.conf b/tests/format/list-directive-error-element/project.conf
index b327536..91db2ee 100644
--- a/tests/format/list-directive-error-element/project.conf
+++ b/tests/format/list-directive-error-element/project.conf
@@ -1 +1,2 @@
 name: test
+version: 2.0
diff --git a/tests/format/list-directive-error-project/project.conf b/tests/format/list-directive-error-project/project.conf
index 2d66408..13ca9a8 100644
--- a/tests/format/list-directive-error-project/project.conf
+++ b/tests/format/list-directive-error-project/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 artifacts:
   (>):
diff --git a/tests/format/list-directive-type-error/project.conf b/tests/format/list-directive-type-error/project.conf
index 79f7340..330589f 100644
--- a/tests/format/list-directive-type-error/project.conf
+++ b/tests/format/list-directive-type-error/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   arch:
diff --git a/tests/format/option-arch-alias/project.conf b/tests/format/option-arch-alias/project.conf
index 47f0945..6f7e1bb 100644
--- a/tests/format/option-arch-alias/project.conf
+++ b/tests/format/option-arch-alias/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   machine_arch:
diff --git a/tests/format/option-arch-unknown/project.conf b/tests/format/option-arch-unknown/project.conf
index 0827ec3..c3e0ca3 100644
--- a/tests/format/option-arch-unknown/project.conf
+++ b/tests/format/option-arch-unknown/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   machine_arch:
diff --git a/tests/format/option-arch/project.conf b/tests/format/option-arch/project.conf
index 8b94232..f391552 100644
--- a/tests/format/option-arch/project.conf
+++ b/tests/format/option-arch/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   machine_arch:
diff --git a/tests/format/option-bool/project.conf b/tests/format/option-bool/project.conf
index a51c4fc..a11d9c8 100644
--- a/tests/format/option-bool/project.conf
+++ b/tests/format/option-bool/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   pony:
diff --git a/tests/format/option-element-mask-invalid/project.conf b/tests/format/option-element-mask-invalid/project.conf
index a3d3818..a52a15a 100644
--- a/tests/format/option-element-mask-invalid/project.conf
+++ b/tests/format/option-element-mask-invalid/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   debug_elements:
diff --git a/tests/format/option-element-mask/project.conf b/tests/format/option-element-mask/project.conf
index ede07fb..23c9132 100644
--- a/tests/format/option-element-mask/project.conf
+++ b/tests/format/option-element-mask/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   debug_elements:
diff --git a/tests/format/option-enum-missing/project.conf b/tests/format/option-enum-missing/project.conf
index d6cd704..9eac7e7 100644
--- a/tests/format/option-enum-missing/project.conf
+++ b/tests/format/option-enum-missing/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   empty:
diff --git a/tests/format/option-enum/project.conf b/tests/format/option-enum/project.conf
index 0b8ea6d..3cfe5ac 100644
--- a/tests/format/option-enum/project.conf
+++ b/tests/format/option-enum/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   brother:
diff --git a/tests/format/option-exports/project.conf b/tests/format/option-exports/project.conf
index e81a313..e7fb547 100644
--- a/tests/format/option-exports/project.conf
+++ b/tests/format/option-exports/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
 
diff --git a/tests/format/option-flags-missing/project.conf b/tests/format/option-flags-missing/project.conf
index 6554022..c45ad1f 100644
--- a/tests/format/option-flags-missing/project.conf
+++ b/tests/format/option-flags-missing/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   empty:
diff --git a/tests/format/option-flags/project.conf b/tests/format/option-flags/project.conf
index 1cab9e3..0a7adaf 100644
--- a/tests/format/option-flags/project.conf
+++ b/tests/format/option-flags/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   # Include an enum option here so we can compare it
diff --git a/tests/format/option-os/project.conf b/tests/format/option-os/project.conf
index 5edb507..dc9a89c 100644
--- a/tests/format/option-os/project.conf
+++ b/tests/format/option-os/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   machine_os:
diff --git a/tests/format/option-overrides/project.conf b/tests/format/option-overrides/project.conf
index c8058f0..afc8985 100644
--- a/tests/format/option-overrides/project.conf
+++ b/tests/format/option-overrides/project.conf
@@ -2,6 +2,7 @@
 # in the element overrides.
 #
 name: test
+version: 2.0
 
 options:
   arch:
diff --git a/tests/format/options/compound-and-condition/project.conf b/tests/format/options/compound-and-condition/project.conf
index 650d017..ac4399f 100644
--- a/tests/format/options/compound-and-condition/project.conf
+++ b/tests/format/options/compound-and-condition/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   debug:
diff --git a/tests/format/options/compound-or-condition/project.conf b/tests/format/options/compound-or-condition/project.conf
index c59cc64..8266d1c 100644
--- a/tests/format/options/compound-or-condition/project.conf
+++ b/tests/format/options/compound-or-condition/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   debug:
diff --git a/tests/format/options/deep-nesting/project.conf b/tests/format/options/deep-nesting/project.conf
index d912cd1..9d706f5 100644
--- a/tests/format/options/deep-nesting/project.conf
+++ b/tests/format/options/deep-nesting/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 options:
   pony:
     type: bool
diff --git a/tests/format/options/invalid-condition/project.conf b/tests/format/options/invalid-condition/project.conf
index b31f35c..8c5d9a2 100644
--- a/tests/format/options/invalid-condition/project.conf
+++ b/tests/format/options/invalid-condition/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   opt:
diff --git a/tests/format/options/invalid-expression/project.conf b/tests/format/options/invalid-expression/project.conf
index ee01472..d5c4483 100644
--- a/tests/format/options/invalid-expression/project.conf
+++ b/tests/format/options/invalid-expression/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   opt:
diff --git a/tests/format/options/invalid-name-dashes/project.conf b/tests/format/options/invalid-name-dashes/project.conf
index 045ce56..965aa75 100644
--- a/tests/format/options/invalid-name-dashes/project.conf
+++ b/tests/format/options/invalid-name-dashes/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   name-with-dashes:
diff --git a/tests/format/options/invalid-name-leading-number/project.conf b/tests/format/options/invalid-name-leading-number/project.conf
index bb3e2ef..eee2825 100644
--- a/tests/format/options/invalid-name-leading-number/project.conf
+++ b/tests/format/options/invalid-name-leading-number/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   123number_is_first:
diff --git a/tests/format/options/invalid-name-plus/project.conf b/tests/format/options/invalid-name-plus/project.conf
index d62869e..e060277 100644
--- a/tests/format/options/invalid-name-plus/project.conf
+++ b/tests/format/options/invalid-name-plus/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   name_with_+:
diff --git a/tests/format/options/invalid-name-spaces/project.conf b/tests/format/options/invalid-name-spaces/project.conf
index 66931e2..f7ed256 100644
--- a/tests/format/options/invalid-name-spaces/project.conf
+++ b/tests/format/options/invalid-name-spaces/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   name with spaces:
diff --git a/tests/format/options/invalid-type/project.conf b/tests/format/options/invalid-type/project.conf
index b4280cd..653c919 100644
--- a/tests/format/options/invalid-type/project.conf
+++ b/tests/format/options/invalid-type/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   opt:
diff --git a/tests/format/options/invalid-variable-name-plus/project.conf b/tests/format/options/invalid-variable-name-plus/project.conf
index 5652bb8..c0595e5 100644
--- a/tests/format/options/invalid-variable-name-plus/project.conf
+++ b/tests/format/options/invalid-variable-name-plus/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   pony:
diff --git a/tests/format/options/invalid-variable-name-spaces/project.conf b/tests/format/options/invalid-variable-name-spaces/project.conf
index 5115115..e14c4de 100644
--- a/tests/format/options/invalid-variable-name-spaces/project.conf
+++ b/tests/format/options/invalid-variable-name-spaces/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   pony:
diff --git a/tests/format/options/nested-condition/project.conf b/tests/format/options/nested-condition/project.conf
index 104b895..91b730a 100644
--- a/tests/format/options/nested-condition/project.conf
+++ b/tests/format/options/nested-condition/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   debug:
diff --git a/tests/format/options/simple-condition/project.conf b/tests/format/options/simple-condition/project.conf
index b6bd29f..5afcfbd 100644
--- a/tests/format/options/simple-condition/project.conf
+++ b/tests/format/options/simple-condition/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   opt:
diff --git a/tests/format/options/undefined-variable/project.conf b/tests/format/options/undefined-variable/project.conf
index d634ef0..b1182ca 100644
--- a/tests/format/options/undefined-variable/project.conf
+++ b/tests/format/options/undefined-variable/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 options:
   pony:
diff --git a/tests/format/project-overrides/prepend-configure-commands/project.conf b/tests/format/project-overrides/prepend-configure-commands/project.conf
index 439a218..3e95b2b 100644
--- a/tests/format/project-overrides/prepend-configure-commands/project.conf
+++ b/tests/format/project-overrides/prepend-configure-commands/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 # Test that prepending to configure-commands works
 elements:
diff --git a/tests/format/project.py b/tests/format/project.py
index 4ddd1d8..e6f4f94 100644
--- a/tests/format/project.py
+++ b/tests/format/project.py
@@ -189,6 +189,7 @@ def test_plugin_no_load_ref(cli, datafiles, ref_storage):
     #
     config = {
         'name': 'test',
+        'version': '2.0',
         'ref-storage': ref_storage,
         'plugins': [
             {
diff --git a/tests/format/project/default/project.conf b/tests/format/project/default/project.conf
index fd3134c..c2c1d5f 100644
--- a/tests/format/project/default/project.conf
+++ b/tests/format/project/default/project.conf
@@ -2,3 +2,4 @@
 #
 
 name: pony
+version: 2.0
diff --git a/tests/format/project/duplicate-plugins/project.conf b/tests/format/project/duplicate-plugins/project.conf
index 4b8f5be..e755c26 100644
--- a/tests/format/project/duplicate-plugins/project.conf
+++ b/tests/format/project/duplicate-plugins/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 plugins:
 - origin: local
diff --git a/tests/format/project/element-path/project.conf b/tests/format/project/element-path/project.conf
index 57e87de..51ffd4b 100644
--- a/tests/format/project/element-path/project.conf
+++ b/tests/format/project/element-path/project.conf
@@ -1,2 +1,3 @@
 name: foo
+version: 2.0
 element-path: elements
diff --git a/tests/format/project/empty-depends/project.conf b/tests/format/project/empty-depends/project.conf
index b327536..91db2ee 100644
--- a/tests/format/project/empty-depends/project.conf
+++ b/tests/format/project/empty-depends/project.conf
@@ -1 +1,2 @@
 name: test
+version: 2.0
diff --git a/tests/format/project/emptyname/project.conf b/tests/format/project/emptyname/project.conf
index 2c5cf07..9e74f92 100644
--- a/tests/format/project/emptyname/project.conf
+++ b/tests/format/project/emptyname/project.conf
@@ -2,3 +2,4 @@
 # this one is an empty string
 #
 name: ''
+version: 2.0
diff --git a/tests/format/project/invalid-yaml/project.conf b/tests/format/project/invalid-yaml/project.conf
index 5f9282b..e6ac02f 100644
--- a/tests/format/project/invalid-yaml/project.conf
+++ b/tests/format/project/invalid-yaml/project.conf
@@ -1,7 +1,5 @@
-# Basic project configuration that doesnt override anything
-#
-
 name: pony
+version: 2.0
 
 variables:
   sbindir: "%{bindir}
diff --git a/tests/format/project/invalidname/project.conf b/tests/format/project/invalidname/project.conf
index 3b064d7..5fec88b 100644
--- a/tests/format/project/invalidname/project.conf
+++ b/tests/format/project/invalidname/project.conf
@@ -2,3 +2,4 @@
 # this one contains a space
 #
 name: Project Name
+version: 2.0
diff --git a/tests/format/project/local-plugin/project.conf b/tests/format/project/local-plugin/project.conf
index 97166e3..b6b6308 100644
--- a/tests/format/project/local-plugin/project.conf
+++ b/tests/format/project/local-plugin/project.conf
@@ -1,4 +1,5 @@
 name: foo
+version: 2.0
 plugins:
 - origin: local
   path: plugins
diff --git a/tests/format/project/missing-element/project.conf b/tests/format/project/missing-element/project.conf
index b327536..91db2ee 100644
--- a/tests/format/project/missing-element/project.conf
+++ b/tests/format/project/missing-element/project.conf
@@ -1 +1,2 @@
 name: test
+version: 2.0
diff --git a/tests/format/project/missing-junction/project.conf b/tests/format/project/missing-junction/project.conf
index b327536..91db2ee 100644
--- a/tests/format/project/missing-junction/project.conf
+++ b/tests/format/project/missing-junction/project.conf
@@ -1 +1,2 @@
 name: test
+version: 2.0
diff --git a/tests/format/project/missingname/project.conf b/tests/format/project/missingname/project.conf
index e69de29..6ec12fe 100644
--- a/tests/format/project/missingname/project.conf
+++ b/tests/format/project/missingname/project.conf
@@ -0,0 +1 @@
+version: 2.0
diff --git a/tests/format/project/overridepath/project.conf b/tests/format/project/overridepath/project.conf
index ef1d01c..730ba19 100644
--- a/tests/format/project/overridepath/project.conf
+++ b/tests/format/project/overridepath/project.conf
@@ -1,6 +1,7 @@
 # A project configuration which overrides the sandbox PATH environment variable
 
 name: foo
+version: 2.0
 
 environment:
   PATH: /bin:/sbin
diff --git a/tests/format/project/plugin-allowed/project.conf b/tests/format/project/plugin-allowed/project.conf
index d49e40d..582fc2e 100644
--- a/tests/format/project/plugin-allowed/project.conf
+++ b/tests/format/project/plugin-allowed/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 plugins:
 - origin: local
diff --git a/tests/format/project/plugin-forbidden/project.conf b/tests/format/project/plugin-forbidden/project.conf
index 39cc3d6..785b02c 100644
--- a/tests/format/project/plugin-forbidden/project.conf
+++ b/tests/format/project/plugin-forbidden/project.conf
@@ -1,2 +1,3 @@
 name: test
+version: 2.0
 
diff --git a/tests/format/project/plugin-preflight-error/project.conf b/tests/format/project/plugin-preflight-error/project.conf
index 20a2344..31dcf12 100644
--- a/tests/format/project/plugin-preflight-error/project.conf
+++ b/tests/format/project/plugin-preflight-error/project.conf
@@ -1,6 +1,7 @@
 # Basic project configuration that doesnt override anything
 #
 name: pony
+version: 2.0
 
 # Whitelist the local test Source "errorplugin" to be loaded
 #
diff --git a/tests/format/project/project-from-subdir/project.conf b/tests/format/project/project-from-subdir/project.conf
index fd3134c..0932d16 100644
--- a/tests/format/project/project-from-subdir/project.conf
+++ b/tests/format/project/project-from-subdir/project.conf
@@ -1,4 +1,2 @@
-# Basic project configuration that doesnt override anything
-#
-
 name: pony
+version: 2.0
diff --git a/tests/format/project/refs-options/project.conf b/tests/format/project/refs-options/project.conf
index a44806d..0163d56 100644
--- a/tests/format/project/refs-options/project.conf
+++ b/tests/format/project/refs-options/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 ref-storage: project.refs
 
 options:
diff --git a/tests/format/project/unsupported/project.conf b/tests/format/project/unsupported/project.conf
index ecd8e06..a66b624 100644
--- a/tests/format/project/unsupported/project.conf
+++ b/tests/format/project/unsupported/project.conf
@@ -1,3 +1,4 @@
 # A project which requires a too new version of the format
 name: foo
+version: 2.0
 format-version: 5000
diff --git a/tests/format/variables.py b/tests/format/variables.py
index 4a954eb..f1185e9 100644
--- a/tests/format/variables.py
+++ b/tests/format/variables.py
@@ -106,6 +106,7 @@ def test_use_of_protected_var_project_conf(cli, datafiles, protected_var):
     project = str(datafiles)
     conf = {
         'name': 'test',
+        'version': '2.0',
         'variables': {
             protected_var: 'some-value'
         }
@@ -134,6 +135,7 @@ def test_use_of_protected_var_element_overrides(cli, datafiles, protected_var):
     project = str(datafiles)
     conf = {
         'name': 'test',
+        'version': '2.0',
         'elements': {
             'manual': {
                 'variables': {
diff --git a/tests/format/variables/cyclic_variables/project.conf b/tests/format/variables/cyclic_variables/project.conf
index b327536..91db2ee 100644
--- a/tests/format/variables/cyclic_variables/project.conf
+++ b/tests/format/variables/cyclic_variables/project.conf
@@ -1 +1,2 @@
 name: test
+version: 2.0
diff --git a/tests/format/variables/defaults/project.conf b/tests/format/variables/defaults/project.conf
index 2027cc2..0932d16 100644
--- a/tests/format/variables/defaults/project.conf
+++ b/tests/format/variables/defaults/project.conf
@@ -1,3 +1,2 @@
-# Basic project configuration that doesnt override anything
-#
 name: pony
+version: 2.0
diff --git a/tests/format/variables/missing_variables/project.conf b/tests/format/variables/missing_variables/project.conf
index 2027cc2..0932d16 100644
--- a/tests/format/variables/missing_variables/project.conf
+++ b/tests/format/variables/missing_variables/project.conf
@@ -1,3 +1,2 @@
-# Basic project configuration that doesnt override anything
-#
 name: pony
+version: 2.0
diff --git a/tests/format/variables/overrides/project.conf b/tests/format/variables/overrides/project.conf
index 2027cc2..0932d16 100644
--- a/tests/format/variables/overrides/project.conf
+++ b/tests/format/variables/overrides/project.conf
@@ -1,3 +1,2 @@
-# Basic project configuration that doesnt override anything
-#
 name: pony
+version: 2.0
diff --git a/tests/format/variables/protected-vars/project.conf b/tests/format/variables/protected-vars/project.conf
index 5a240e3..a0b5d61 100644
--- a/tests/format/variables/protected-vars/project.conf
+++ b/tests/format/variables/protected-vars/project.conf
@@ -1 +1,2 @@
 name: foo
+version: 2.0
diff --git a/tests/frontend/__init__.py b/tests/frontend/__init__.py
index 45da670..7d1ab5f 100644
--- a/tests/frontend/__init__.py
+++ b/tests/frontend/__init__.py
@@ -6,5 +6,6 @@ from buildstream2 import _yaml
 #
 def configure_project(path, config):
     config['name'] = 'test'
+    config['version'] = '2.0'
     config['element-path'] = 'elements'
     _yaml.dump(config, os.path.join(path, 'project.conf'))
diff --git a/tests/frontend/completions/no-element-path/project.conf b/tests/frontend/completions/no-element-path/project.conf
index e7e35e7..91db2ee 100644
--- a/tests/frontend/completions/no-element-path/project.conf
+++ b/tests/frontend/completions/no-element-path/project.conf
@@ -1,2 +1,2 @@
-# Project config for frontend build test
 name: test
+version: 2.0
diff --git a/tests/frontend/completions/project/project.conf b/tests/frontend/completions/project/project.conf
index 854e386..7c4d235 100644
--- a/tests/frontend/completions/project/project.conf
+++ b/tests/frontend/completions/project/project.conf
@@ -1,4 +1,3 @@
-# Project config for frontend build test
 name: test
-
+version: 2.0
 element-path: elements
diff --git a/tests/frontend/completions/sub-folders/project.conf b/tests/frontend/completions/sub-folders/project.conf
index 854e386..7c4d235 100644
--- a/tests/frontend/completions/sub-folders/project.conf
+++ b/tests/frontend/completions/sub-folders/project.conf
@@ -1,4 +1,3 @@
-# Project config for frontend build test
 name: test
-
+version: 2.0
 element-path: elements
diff --git a/tests/frontend/configurable_warnings.py b/tests/frontend/configurable_warnings.py
index 96accf0..7f514cd 100644
--- a/tests/frontend/configurable_warnings.py
+++ b/tests/frontend/configurable_warnings.py
@@ -19,6 +19,7 @@ TOP_DIR = os.path.join(
 def get_project(fatal_warnings):
     return {
         "name": "test",
+        "version": "2.0",
         "element-path": "elements",
         "plugins": [
             {
diff --git a/tests/frontend/configuredwarning/project.conf b/tests/frontend/configuredwarning/project.conf
index c73d217..0b3f325 100644
--- a/tests/frontend/configuredwarning/project.conf
+++ b/tests/frontend/configuredwarning/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 element-path: elements
 plugins:
 - origin: local
diff --git a/tests/frontend/consistencyerror/project.conf b/tests/frontend/consistencyerror/project.conf
index 524a321..cfe7dba 100644
--- a/tests/frontend/consistencyerror/project.conf
+++ b/tests/frontend/consistencyerror/project.conf
@@ -1,6 +1,7 @@
 # Basic project configuration that doesnt override anything
 #
 name: test
+version: 2.0
 
 # Whitelist the local test Sources
 #
diff --git a/tests/frontend/cross_junction_workspace.py b/tests/frontend/cross_junction_workspace.py
index e302b32..5614f6c 100644
--- a/tests/frontend/cross_junction_workspace.py
+++ b/tests/frontend/cross_junction_workspace.py
@@ -13,8 +13,8 @@ def prepare_junction_project(cli, tmpdir):
     os.makedirs(str(main_project))
     os.makedirs(str(sub_project))
 
-    _yaml.dump({'name': 'main'}, str(main_project.join("project.conf")))
-    _yaml.dump({'name': 'sub'}, str(sub_project.join("project.conf")))
+    _yaml.dump({'name': 'main', 'version': '2.0'}, str(main_project.join("project.conf")))
+    _yaml.dump({'name': 'sub', 'version': '2.0'}, str(sub_project.join("project.conf")))
 
     import_dir = tmpdir.join("import")
     os.makedirs(str(import_dir))
diff --git a/tests/frontend/exceptions/project.conf b/tests/frontend/exceptions/project.conf
index 2027cc2..0932d16 100644
--- a/tests/frontend/exceptions/project.conf
+++ b/tests/frontend/exceptions/project.conf
@@ -1,3 +1,2 @@
-# Basic project configuration that doesnt override anything
-#
 name: pony
+version: 2.0
diff --git a/tests/frontend/invalid_element_path/project.conf b/tests/frontend/invalid_element_path/project.conf
index 7b09276..182d84d 100644
--- a/tests/frontend/invalid_element_path/project.conf
+++ b/tests/frontend/invalid_element_path/project.conf
@@ -1,4 +1,3 @@
-# Project config for frontend build test
 name: test
-
+version: 2.0
 elephant-path: elements
diff --git a/tests/frontend/mirror.py b/tests/frontend/mirror.py
index 499375d..01d75bf 100644
--- a/tests/frontend/mirror.py
+++ b/tests/frontend/mirror.py
@@ -41,6 +41,7 @@ def generate_element(output_file):
 def generate_project():
     project = {
         'name': 'test',
+        'version': '2.0',
         'element-path': 'elements',
         'aliases': {
             'foo': 'FOO/',
@@ -132,6 +133,7 @@ def test_mirror_fetch_ref_storage(cli, tmpdir, datafiles, ref_storage, mirror):
 
     project = {
         'name': 'test',
+        'version': '2.0',
         'element-path': 'elements',
         'aliases': {
             alias: upstream_map + "/"
@@ -352,6 +354,7 @@ def test_mirror_git_submodule_fetch(cli, tmpdir, datafiles):
     mirror_map, _ = os.path.split(full_mirror)
     project = {
         'name': 'test',
+        'version': '2.0',
         'element-path': 'elements',
         'aliases': {
             alias: 'http://www.example.com/'
@@ -437,6 +440,7 @@ def test_mirror_fallback_git_only_submodules(cli, tmpdir, datafiles):
 
     project = {
         'name': 'test',
+        'version': '2.0',
         'element-path': 'elements',
         'aliases': {
             alias: upstream_map + "/"
@@ -533,6 +537,7 @@ def test_mirror_fallback_git_with_submodules(cli, tmpdir, datafiles):
 
     project = {
         'name': 'test',
+        'version': '2.0',
         'element-path': 'elements',
         'aliases': {
             alias: upstream_map + "/"
diff --git a/tests/frontend/overlaps.py b/tests/frontend/overlaps.py
index 7cc4930..9e6059b 100644
--- a/tests/frontend/overlaps.py
+++ b/tests/frontend/overlaps.py
@@ -18,7 +18,8 @@ DATA_DIR = os.path.join(
 
 def gen_project(project_dir, fail_on_overlap, use_fatal_warnings=True, project_name="test"):
     template = {
-        "name": project_name
+        "name": project_name,
+        "version": '2.0'
     }
     if use_fatal_warnings:
         template["fatal-warnings"] = [CoreWarnings.OVERLAPS] if fail_on_overlap else []
diff --git a/tests/frontend/project/files/sub-project/project.conf b/tests/frontend/project/files/sub-project/project.conf
index bbb8414..2e22edc 100644
--- a/tests/frontend/project/files/sub-project/project.conf
+++ b/tests/frontend/project/files/sub-project/project.conf
@@ -1,4 +1,3 @@
-# Project config for frontend build test
 name: subtest
-
+version: 2.0
 element-path: elements
diff --git a/tests/frontend/project/project.conf b/tests/frontend/project/project.conf
index ed18221..58f1e09 100644
--- a/tests/frontend/project/project.conf
+++ b/tests/frontend/project/project.conf
@@ -1,6 +1,7 @@
-# Project config for frontend build test
 name: test
 
+version: 2.0
+
 element-path: elements
 
 fatal-warnings:
diff --git a/tests/frontend/project_default/project.conf b/tests/frontend/project_default/project.conf
index 5987c82..80c19f9 100644
--- a/tests/frontend/project_default/project.conf
+++ b/tests/frontend/project_default/project.conf
@@ -1,6 +1,7 @@
-# Project config for frontend build test
 name: test
 
+version: 2.0
+
 element-path: elements
 
 fatal-warnings:
diff --git a/tests/frontend/project_fail/project.conf b/tests/frontend/project_fail/project.conf
index 854e386..7c4d235 100644
--- a/tests/frontend/project_fail/project.conf
+++ b/tests/frontend/project_fail/project.conf
@@ -1,4 +1,3 @@
-# Project config for frontend build test
 name: test
-
+version: 2.0
 element-path: elements
diff --git a/tests/frontend/project_world/files/sub-project/project.conf b/tests/frontend/project_world/files/sub-project/project.conf
index bbb8414..2e22edc 100644
--- a/tests/frontend/project_world/files/sub-project/project.conf
+++ b/tests/frontend/project_world/files/sub-project/project.conf
@@ -1,4 +1,3 @@
-# Project config for frontend build test
 name: subtest
-
+version: 2.0
 element-path: elements
diff --git a/tests/frontend/project_world/project.conf b/tests/frontend/project_world/project.conf
index a7e4a02..3c78eb1 100644
--- a/tests/frontend/project_world/project.conf
+++ b/tests/frontend/project_world/project.conf
@@ -1,6 +1,5 @@
-# Project config for frontend build test
 name: test
-
+version: 2.0
 element-path: elements
 
 fatal-warnings:
diff --git a/tests/frontend/track-cross-junction/subproject/project.conf b/tests/frontend/track-cross-junction/subproject/project.conf
index b327536..91db2ee 100644
--- a/tests/frontend/track-cross-junction/subproject/project.conf
+++ b/tests/frontend/track-cross-junction/subproject/project.conf
@@ -1 +1,2 @@
 name: test
+version: 2.0
diff --git a/tests/frontend/track-optional-inline/project.conf b/tests/frontend/track-optional-inline/project.conf
index 3f02c47..9213770 100644
--- a/tests/frontend/track-optional-inline/project.conf
+++ b/tests/frontend/track-optional-inline/project.conf
@@ -1,5 +1,5 @@
 name: test
-
+version: 2.0
 options:
   test:
     type: bool
diff --git a/tests/frontend/track-optional-project-refs/project.conf b/tests/frontend/track-optional-project-refs/project.conf
index 37fe02c..c740bc1 100644
--- a/tests/frontend/track-optional-project-refs/project.conf
+++ b/tests/frontend/track-optional-project-refs/project.conf
@@ -1,4 +1,5 @@
 name: test
+version: 2.0
 
 ref-storage: project.refs
 
diff --git a/tests/frontend/track.py b/tests/frontend/track.py
index 0eb1e96..8af783d 100644
--- a/tests/frontend/track.py
+++ b/tests/frontend/track.py
@@ -154,6 +154,7 @@ def test_track_cross_junction(cli, tmpdir, datafiles, cross_junction, ref_storag
     #
     project_conf = {
         'name': 'test',
+        'version': '2.0',
         'ref-storage': ref_storage
     }
     _yaml.dump(project_conf, os.path.join(project, 'project.conf'))
diff --git a/tests/frontend/workspaced-build-dep/project.conf b/tests/frontend/workspaced-build-dep/project.conf
index e017957..47da8cf 100644
--- a/tests/frontend/workspaced-build-dep/project.conf
+++ b/tests/frontend/workspaced-build-dep/project.conf
@@ -1,8 +1,8 @@
 # Unique project name
 name: test
 
-# Required BuildStream format version
-format-version: 12
+# Required BuildStream version
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/tests/frontend/workspaced-runtime-dep/project.conf b/tests/frontend/workspaced-runtime-dep/project.conf
index e017957..47da8cf 100644
--- a/tests/frontend/workspaced-runtime-dep/project.conf
+++ b/tests/frontend/workspaced-runtime-dep/project.conf
@@ -1,8 +1,8 @@
 # Unique project name
 name: test
 
-# Required BuildStream format version
-format-version: 12
+# Required BuildStream version
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/tests/integration/project/project.conf b/tests/integration/project/project.conf
index ddfe47b..2bece19 100644
--- a/tests/integration/project/project.conf
+++ b/tests/integration/project/project.conf
@@ -1,5 +1,5 @@
-# Project config for frontend build test
 name: test
+version: 2.0
 element-path: elements
 aliases:
   alpine: https://bst-integration-test-images.ams3.cdn.digitaloceanspaces.com/
diff --git a/tests/internals/loader/onefile/project.conf b/tests/internals/loader/onefile/project.conf
index afa0f54..9086b92 100644
--- a/tests/internals/loader/onefile/project.conf
+++ b/tests/internals/loader/onefile/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/internals/pluginloading/badversionelement/project.conf b/tests/internals/pluginloading/badversionelement/project.conf
index 4f32752..4bbf396 100644
--- a/tests/internals/pluginloading/badversionelement/project.conf
+++ b/tests/internals/pluginloading/badversionelement/project.conf
@@ -1,4 +1,5 @@
 name: pony
+version: 2.0
 element-path: elements
 
 plugins:
diff --git a/tests/internals/pluginloading/badversionsource/project.conf b/tests/internals/pluginloading/badversionsource/project.conf
index 58cf9c5..3755bcc 100644
--- a/tests/internals/pluginloading/badversionsource/project.conf
+++ b/tests/internals/pluginloading/badversionsource/project.conf
@@ -1,4 +1,5 @@
 name: pony
+version: 2.0
 element-path: elements
 
 plugins:
diff --git a/tests/internals/pluginloading/customelement/project.conf b/tests/internals/pluginloading/customelement/project.conf
index bdc9099..6d22507 100644
--- a/tests/internals/pluginloading/customelement/project.conf
+++ b/tests/internals/pluginloading/customelement/project.conf
@@ -1,4 +1,5 @@
 name: pony
+version: 2.0
 element-path: elements
 plugins:
 - origin: local
diff --git a/tests/internals/pluginloading/customsource/project.conf b/tests/internals/pluginloading/customsource/project.conf
index 8205d18..0c5c0d8 100644
--- a/tests/internals/pluginloading/customsource/project.conf
+++ b/tests/internals/pluginloading/customsource/project.conf
@@ -1,4 +1,5 @@
 name: pony
+version: 2.0
 element-path: elements
 plugins:
 - origin: local
diff --git a/tests/plugins/deprecationwarnings/project/project.conf b/tests/plugins/deprecationwarnings/project/project.conf
index 18e368f..1299835 100644
--- a/tests/plugins/deprecationwarnings/project/project.conf
+++ b/tests/plugins/deprecationwarnings/project/project.conf
@@ -1,8 +1,8 @@
 # Unique project name
 name: deprecation-warnings
 
-# Required BuildStream format version
-format-version: 20
+# Required BuildStream version
+version: 2.0
 
 # Subdirectory where elements are stored
 element-path: elements
diff --git a/tests/remoteexecution/project/project.conf b/tests/remoteexecution/project/project.conf
index ddfe47b..c83abf6 100644
--- a/tests/remoteexecution/project/project.conf
+++ b/tests/remoteexecution/project/project.conf
@@ -1,5 +1,6 @@
 # Project config for frontend build test
 name: test
+version: 2.0
 element-path: elements
 aliases:
   alpine: https://bst-integration-test-images.ams3.cdn.digitaloceanspaces.com/
diff --git a/tests/sandboxes/missing-command/project.conf b/tests/sandboxes/missing-command/project.conf
index b327536..91db2ee 100644
--- a/tests/sandboxes/missing-command/project.conf
+++ b/tests/sandboxes/missing-command/project.conf
@@ -1 +1,2 @@
 name: test
+version: 2.0
diff --git a/tests/sandboxes/missing-dependencies/project.conf b/tests/sandboxes/missing-dependencies/project.conf
index 080ab75..1848467 100755
--- a/tests/sandboxes/missing-dependencies/project.conf
+++ b/tests/sandboxes/missing-dependencies/project.conf
@@ -1,4 +1,4 @@
 # Project config for missing dependencies test
 name: test
-
+version: 2.0
 element-path: elements
diff --git a/tests/sourcecache/project/project.conf b/tests/sourcecache/project/project.conf
index 728f3fa..3b578a9 100644
--- a/tests/sourcecache/project/project.conf
+++ b/tests/sourcecache/project/project.conf
@@ -1,5 +1,5 @@
-# Project config for frontend build test
 name: test
+version: 2.0
 
 element-path: elements
 
diff --git a/tests/sources/bzr/project.conf b/tests/sources/bzr/project.conf
index 04b8463..19cd3ee 100644
--- a/tests/sources/bzr/project.conf
+++ b/tests/sources/bzr/project.conf
@@ -1,2 +1,3 @@
 # Basic Project
 name: foo
+version: 2.0
diff --git a/tests/sources/deb.py b/tests/sources/deb.py
index ca44974..21f413d 100644
--- a/tests/sources/deb.py
+++ b/tests/sources/deb.py
@@ -24,6 +24,7 @@ def generate_project(project_dir, tmpdir):
     project_file = os.path.join(project_dir, "project.conf")
     _yaml.dump({
         'name': 'foo',
+        'version': '2.0',
         'aliases': {
             'tmpdir': "file:///" + str(tmpdir)
         }
diff --git a/tests/sources/git.py b/tests/sources/git.py
index 5a4fabd..26c61d1 100644
--- a/tests/sources/git.py
+++ b/tests/sources/git.py
@@ -428,6 +428,7 @@ def test_ref_not_in_track(cli, tmpdir, datafiles, fail):
     if fail == 'error':
         project_template = {
             "name": "foo",
+            "version": "2.0",
             "fatal-warnings": [CoreWarnings.REF_NOT_IN_TRACK]
         }
         _yaml.dump(project_template, os.path.join(project, 'project.conf'))
@@ -471,6 +472,7 @@ def test_unlisted_submodule(cli, tmpdir, datafiles, fail):
     if fail == 'error':
         project_template = {
             "name": "foo",
+            "version": "2.0",
             "fatal-warnings": ['git:unlisted-submodule']
         }
         _yaml.dump(project_template, os.path.join(project, 'project.conf'))
@@ -544,6 +546,7 @@ def test_track_unlisted_submodule(cli, tmpdir, datafiles, fail):
     if fail == 'error':
         project_template = {
             "name": "foo",
+            "version": "2.0",
             "fatal-warnings": ['git:unlisted-submodule']
         }
         _yaml.dump(project_template, os.path.join(project, 'project.conf'))
@@ -607,6 +610,7 @@ def test_invalid_submodule(cli, tmpdir, datafiles, fail):
     if fail == 'error':
         project_template = {
             "name": "foo",
+            "version": "2.0",
             "fatal-warnings": ['git:invalid-submodule']
         }
         _yaml.dump(project_template, os.path.join(project, 'project.conf'))
@@ -679,6 +683,7 @@ def test_track_invalid_submodule(cli, tmpdir, datafiles, fail):
     if fail == 'error':
         project_template = {
             "name": "foo",
+            "version": "2.0",
             "fatal-warnings": ['git:invalid-submodule']
         }
         _yaml.dump(project_template, os.path.join(project, 'project.conf'))
diff --git a/tests/sources/git/project-override/project.conf b/tests/sources/git/project-override/project.conf
index 299992f..ff7035c 100644
--- a/tests/sources/git/project-override/project.conf
+++ b/tests/sources/git/project-override/project.conf
@@ -1,5 +1,6 @@
 # Basic project
 name: foo
+version: 2.0
 sources:
   git:
     config:
diff --git a/tests/sources/git/template/project.conf b/tests/sources/git/template/project.conf
index afa0f54..9086b92 100644
--- a/tests/sources/git/template/project.conf
+++ b/tests/sources/git/template/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/sources/local/basic/project.conf b/tests/sources/local/basic/project.conf
index afa0f54..9086b92 100644
--- a/tests/sources/local/basic/project.conf
+++ b/tests/sources/local/basic/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/sources/local/directory/project.conf b/tests/sources/local/directory/project.conf
index afa0f54..9086b92 100644
--- a/tests/sources/local/directory/project.conf
+++ b/tests/sources/local/directory/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/sources/local/file-exists/project.conf b/tests/sources/local/file-exists/project.conf
index afa0f54..9086b92 100644
--- a/tests/sources/local/file-exists/project.conf
+++ b/tests/sources/local/file-exists/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/sources/local/invalid-relative-path/project.conf b/tests/sources/local/invalid-relative-path/project.conf
index afa0f54..9086b92 100644
--- a/tests/sources/local/invalid-relative-path/project.conf
+++ b/tests/sources/local/invalid-relative-path/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/sources/local/symlink/project.conf b/tests/sources/local/symlink/project.conf
index afa0f54..9086b92 100644
--- a/tests/sources/local/symlink/project.conf
+++ b/tests/sources/local/symlink/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/sources/no-fetch-cached/project.conf b/tests/sources/no-fetch-cached/project.conf
index af0cec1..1983bd4 100644
--- a/tests/sources/no-fetch-cached/project.conf
+++ b/tests/sources/no-fetch-cached/project.conf
@@ -1,6 +1,6 @@
 # Project with local source plugins
 name: no-fetch-cached
-
+version: 2.0
 plugins:
 - origin: local
   path: plugins/sources
diff --git a/tests/sources/ostree/template/project.conf b/tests/sources/ostree/template/project.conf
index afa0f54..9086b92 100644
--- a/tests/sources/ostree/template/project.conf
+++ b/tests/sources/ostree/template/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/sources/patch/basic/project.conf b/tests/sources/patch/basic/project.conf
index afa0f54..9086b92 100644
--- a/tests/sources/patch/basic/project.conf
+++ b/tests/sources/patch/basic/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/sources/patch/different-strip-level/project.conf b/tests/sources/patch/different-strip-level/project.conf
index afa0f54..9086b92 100644
--- a/tests/sources/patch/different-strip-level/project.conf
+++ b/tests/sources/patch/different-strip-level/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/sources/patch/invalid-relative-path/project.conf b/tests/sources/patch/invalid-relative-path/project.conf
index afa0f54..9086b92 100644
--- a/tests/sources/patch/invalid-relative-path/project.conf
+++ b/tests/sources/patch/invalid-relative-path/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/sources/patch/multiple-patches/project.conf b/tests/sources/patch/multiple-patches/project.conf
index afa0f54..9086b92 100644
--- a/tests/sources/patch/multiple-patches/project.conf
+++ b/tests/sources/patch/multiple-patches/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/sources/patch/separate-patch-dir/project.conf b/tests/sources/patch/separate-patch-dir/project.conf
index afa0f54..9086b92 100644
--- a/tests/sources/patch/separate-patch-dir/project.conf
+++ b/tests/sources/patch/separate-patch-dir/project.conf
@@ -1,2 +1,3 @@
 # Basic project
 name: foo
+version: 2.0
diff --git a/tests/sources/pip.py b/tests/sources/pip.py
index eba5a5e..467ed20 100644
--- a/tests/sources/pip.py
+++ b/tests/sources/pip.py
@@ -17,7 +17,7 @@ DATA_DIR = os.path.join(
 
 def generate_project(project_dir):
     project_file = os.path.join(project_dir, "project.conf")
-    _yaml.dump({'name': 'foo'}, project_file)
+    _yaml.dump({'name': 'foo', 'version': '2.0'}, project_file)
 
 
 # Test that without ref, consistency is set appropriately.
diff --git a/tests/sources/previous_source_access/project.conf b/tests/sources/previous_source_access/project.conf
index 1749b3d..cdf14a6 100644
--- a/tests/sources/previous_source_access/project.conf
+++ b/tests/sources/previous_source_access/project.conf
@@ -1,6 +1,8 @@
 # Project with local source plugins
 name: foo
 
+version: 2.0
+
 element-path: elements
 
 plugins:
diff --git a/tests/sources/project_key_test/project.conf b/tests/sources/project_key_test/project.conf
index 97ab12c..6eab67a 100644
--- a/tests/sources/project_key_test/project.conf
+++ b/tests/sources/project_key_test/project.conf
@@ -1,5 +1,5 @@
 name: key-test
-
+version: 2.0
 element-path: elements
 
 plugins:
diff --git a/tests/sources/remote.py b/tests/sources/remote.py
index 1b96828..034e05b 100644
--- a/tests/sources/remote.py
+++ b/tests/sources/remote.py
@@ -20,6 +20,7 @@ def generate_project(project_dir, tmpdir):
     project_file = os.path.join(project_dir, "project.conf")
     _yaml.dump({
         'name': 'foo',
+        'version': '2.0',
         'aliases': {
             'tmpdir': "file:///" + str(tmpdir)
         }
@@ -30,6 +31,7 @@ def generate_project_file_server(server, project_dir):
     project_file = os.path.join(project_dir, "project.conf")
     _yaml.dump({
         'name': 'foo',
+        'version': '2.0',
         'aliases': {
             'tmpdir': server.base_url()
         }
diff --git a/tests/sources/tar.py b/tests/sources/tar.py
index 69095fe..a6f1c9f 100644
--- a/tests/sources/tar.py
+++ b/tests/sources/tar.py
@@ -49,6 +49,7 @@ def generate_project(project_dir, tmpdir):
     project_file = os.path.join(project_dir, "project.conf")
     _yaml.dump({
         'name': 'foo',
+        'version': '2.0',
         'aliases': {
             'tmpdir': "file:///" + str(tmpdir)
         }
@@ -59,6 +60,7 @@ def generate_project_file_server(base_url, project_dir):
     project_file = os.path.join(project_dir, "project.conf")
     _yaml.dump({
         'name': 'foo',
+        'version': '2.0',
         'aliases': {
             'tmpdir': base_url
         }
diff --git a/tests/sources/zip.py b/tests/sources/zip.py
index cc1eb25..5086859 100644
--- a/tests/sources/zip.py
+++ b/tests/sources/zip.py
@@ -34,6 +34,7 @@ def generate_project(project_dir, tmpdir):
     project_file = os.path.join(project_dir, "project.conf")
     _yaml.dump({
         'name': 'foo',
+        'version': '2.0',
         'aliases': {
             'tmpdir': "file:///" + str(tmpdir)
         }
@@ -44,6 +45,7 @@ def generate_project_file_server(server, project_dir):
     project_file = os.path.join(project_dir, "project.conf")
     _yaml.dump({
         'name': 'foo',
+        'version': '2.0',
         'aliases': {
             'tmpdir': server.base_url()
         }


[buildstream] 03/06: doc/source/using_config.rst: Update documentation about default config file

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/bst2-separation
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 8850b1608ab8ad0944b464bf9e500e1674570293
Author: Tristan Van Berkom <tr...@codethink.co.uk>
AuthorDate: Thu Apr 4 18:28:21 2019 +0900

    doc/source/using_config.rst: Update documentation about default config file
    
    Updated docs to mention the default configuration file is buildstream2.conf
---
 doc/source/using_config.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/source/using_config.rst b/doc/source/using_config.rst
index f8ef934..a415117 100644
--- a/doc/source/using_config.rst
+++ b/doc/source/using_config.rst
@@ -19,8 +19,8 @@ the default configuration.
 
 Unless a configuration file is explicitly specified on the command line when
 invoking ``bst``, an attempt is made to load user specific configuration from
-``$XDG_CONFIG_HOME/buildstream.conf``. On most Linux based systems, the location
-will be ``~/.config/buildstream.conf``
+``$XDG_CONFIG_HOME/buildstream2.conf``. On most Linux based systems, the location
+will be ``~/.config/buildstream2.conf``
 
 
 Project specific value
@@ -255,7 +255,7 @@ cache in the user configuration. This can be done in two ways:
 1. By restricting the maximum size of the cache directory itself.
 
 For example, to ensure that BuildStream's cache does not grow beyond 100 GB,
-simply declare the following in your user configuration (``~/.config/buildstream.conf``):
+simply declare the following in your user configuration (``~/.config/buildstream2.conf``):
 
 .. code:: yaml
 


[buildstream] 01/06: Change namespace from buildstream to buildstream2

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/bst2-separation
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit f3413e617ef2e248a85b4959dc20857664d4c1ea
Author: Tristan Van Berkom <tr...@codethink.co.uk>
AuthorDate: Thu Apr 4 17:32:41 2019 +0900

    Change namespace from buildstream to buildstream2
    
    This patch changes the buildstream namespace to buildstream2, so
    that BuildStream 2 can be parallel installable with BuildStream 1.
    
     * Moved buildstream/ directory to buildstream2/
    
     * Updated toplevel files to reflect this change:
       - .pylintrc
       - setup.py
       - setup.cfg
       - tox.ini
       - MANIFEST.in
    
     * pluginutils/runcli.py module to use relative imports, this is
       now a part of BuildStream so it should not import "from buildstream2"
    
     * Updated plugins to derive from buildstream2 plugins (and to literalinclude
       their YAML files for documentation from the new ../buildstream2/plugins/.. path).
    
     * Updated imports in test cases to import from buildstream2
    
     * _project.py, _plugincontext.py: Use the "buildstream2.plugins" namespace for plugin loading.
    
     * _protos: Regenerated the protos, these generated python files import
        from the buildstream module instead of using relative imports, so they
        needed an update.
    
     * .coveragerc: Update for new buildstream2 namespace
    
     * doc/Makefile: Update to build docs with new buildstream2 namespace
    
     * doc/bst2html.py: Import from new buildstream2 namespace
    
     * doc/source/conf.py: Update to refer to new buildstream2 namespace
    
     * doc/source/sample_plugin/setup.py: Update to refer to new buildstream2 namespace
    
     * element.py, source.py, sandbox/sandbox.py, utils.py: Updated documentation links
       to refer to symbols in new buildstream2 namespace
---
 .coveragerc                                        |  16 +-
 .pylintrc                                          |   2 +-
 MANIFEST.in                                        |   2 +-
 {buildstream => buildstream2}/__init__.py          |   0
 {buildstream => buildstream2}/__main__.py          |   0
 {buildstream => buildstream2}/_artifact.py         |   0
 {buildstream => buildstream2}/_artifactcache.py    |   0
 {buildstream => buildstream2}/_artifactelement.py  |   0
 {buildstream => buildstream2}/_basecache.py        |   0
 {buildstream => buildstream2}/_cachekey.py         |   0
 {buildstream => buildstream2}/_cas/__init__.py     |   0
 {buildstream => buildstream2}/_cas/cascache.py     |   0
 {buildstream => buildstream2}/_cas/casremote.py    |   0
 {buildstream => buildstream2}/_cas/casserver.py    |   0
 {buildstream => buildstream2}/_context.py          |   0
 {buildstream => buildstream2}/_elementfactory.py   |   0
 {buildstream => buildstream2}/_exceptions.py       |   0
 .../_frontend/__init__.py                          |   0
 {buildstream => buildstream2}/_frontend/app.py     |   0
 {buildstream => buildstream2}/_frontend/cli.py     |   0
 .../_frontend/complete.py                          |   0
 .../_frontend/linuxapp.py                          |   0
 {buildstream => buildstream2}/_frontend/profile.py |   0
 {buildstream => buildstream2}/_frontend/status.py  |   0
 {buildstream => buildstream2}/_frontend/widget.py  |   0
 {buildstream => buildstream2}/_fuse/__init__.py    |   0
 {buildstream => buildstream2}/_fuse/fuse.py        |   0
 {buildstream => buildstream2}/_fuse/hardlinks.py   |   0
 {buildstream => buildstream2}/_fuse/mount.py       |   0
 {buildstream => buildstream2}/_gitsourcebase.py    |   0
 {buildstream => buildstream2}/_includes.py         |   0
 {buildstream => buildstream2}/_loader/__init__.py  |   0
 .../_loader/loadelement.py                         |   0
 {buildstream => buildstream2}/_loader/loader.py    |   0
 .../_loader/metaelement.py                         |   0
 .../_loader/metasource.py                          |   0
 {buildstream => buildstream2}/_loader/types.py     |   0
 {buildstream => buildstream2}/_message.py          |   0
 {buildstream => buildstream2}/_options/__init__.py |   0
 {buildstream => buildstream2}/_options/option.py   |   0
 .../_options/optionarch.py                         |   0
 .../_options/optionbool.py                         |   0
 .../_options/optioneltmask.py                      |   0
 .../_options/optionenum.py                         |   0
 .../_options/optionflags.py                        |   0
 {buildstream => buildstream2}/_options/optionos.py |   0
 .../_options/optionpool.py                         |   0
 {buildstream => buildstream2}/_ostree.py           |   0
 {buildstream => buildstream2}/_pipeline.py         |   0
 .../_platform/__init__.py                          |   0
 {buildstream => buildstream2}/_platform/darwin.py  |   0
 {buildstream => buildstream2}/_platform/linux.py   |   0
 .../_platform/platform.py                          |   0
 {buildstream => buildstream2}/_platform/unix.py    |   0
 {buildstream => buildstream2}/_plugincontext.py    |   2 +-
 {buildstream => buildstream2}/_profile.py          |   0
 {buildstream => buildstream2}/_project.py          |   2 +-
 {buildstream => buildstream2}/_projectrefs.py      |   0
 .../_protos}/__init__.py                           |   0
 .../_protos/build}/__init__.py                     |   0
 .../_protos/build/bazel}/__init__.py               |   0
 .../_protos/build/bazel/remote}/__init__.py        |   0
 .../build/bazel/remote/execution}/__init__.py      |   0
 .../build/bazel/remote/execution/v2}/__init__.py   |   0
 .../remote/execution/v2/remote_execution.proto     |   0
 .../remote/execution/v2/remote_execution_pb2.py    | 410 ++++++++++-----------
 .../execution/v2/remote_execution_pb2_grpc.py      |   4 +-
 .../_protos/build/bazel/semver}/__init__.py        |   0
 .../_protos/build/bazel/semver/semver.proto        |   0
 .../_protos/build/bazel/semver/semver_pb2.py       |  12 +-
 .../_protos/build/bazel/semver/semver_pb2_grpc.py  |   0
 .../_protos/buildstream}/__init__.py               |   0
 .../_protos/buildstream/v2/__init__.py             |   0
 .../_protos/buildstream/v2/artifact.proto          |   0
 .../_protos/buildstream/v2/artifact_pb2.py         |   4 +-
 .../_protos/buildstream/v2/artifact_pb2_grpc.py    |   3 +-
 .../_protos/buildstream/v2/buildstream.proto       |   0
 .../_protos/buildstream/v2/buildstream_pb2.py      |  42 +--
 .../_protos/buildstream/v2/buildstream_pb2_grpc.py |   2 +-
 .../_protos/google}/__init__.py                    |   0
 .../_protos/google/api}/__init__.py                |   0
 .../_protos/google/api/annotations.proto           |   0
 .../_protos/google/api/annotations_pb2.py          |   9 +-
 .../_protos/google/api/annotations_pb2_grpc.py     |   0
 .../_protos/google/api/http.proto                  |   0
 .../_protos/google/api/http_pb2.py                 |  37 +-
 .../_protos/google/api/http_pb2_grpc.py            |   0
 .../_protos/google/bytestream}/__init__.py         |   0
 .../_protos/google/bytestream/bytestream.proto     |   0
 .../_protos/google/bytestream/bytestream_pb2.py    |  51 ++-
 .../google/bytestream/bytestream_pb2_grpc.py       |   2 +-
 .../_protos/google/longrunning}/__init__.py        |   0
 .../_protos/google/longrunning/operations.proto    |   0
 .../_protos/google/longrunning/operations_pb2.py   |  59 ++-
 .../google/longrunning/operations_pb2_grpc.py      |   2 +-
 .../_protos/google/rpc}/__init__.py                |   0
 .../_protos/google/rpc/code.proto                  |   0
 .../_protos/google/rpc/code_pb2.py                 |   0
 .../_protos/google/rpc/code_pb2_grpc.py            |   0
 .../_protos/google/rpc/status.proto                |   0
 .../_protos/google/rpc/status_pb2.py               |  13 +-
 .../_protos/google/rpc/status_pb2_grpc.py          |   0
 .../_scheduler/__init__.py                         |   0
 .../_scheduler/jobs/__init__.py                    |   0
 .../_scheduler/jobs/cachesizejob.py                |   0
 .../_scheduler/jobs/cleanupjob.py                  |   0
 .../_scheduler/jobs/elementjob.py                  |   0
 .../_scheduler/jobs/job.py                         |   0
 .../_scheduler/queues/__init__.py                  |   0
 .../_scheduler/queues/artifactpushqueue.py         |   0
 .../_scheduler/queues/buildqueue.py                |   0
 .../_scheduler/queues/fetchqueue.py                |   0
 .../_scheduler/queues/pullqueue.py                 |   0
 .../_scheduler/queues/queue.py                     |   0
 .../_scheduler/queues/sourcepushqueue.py           |   0
 .../_scheduler/queues/trackqueue.py                |   0
 .../_scheduler/resources.py                        |   0
 .../_scheduler/scheduler.py                        |   0
 {buildstream => buildstream2}/_signals.py          |   0
 {buildstream => buildstream2}/_site.py             |   0
 {buildstream => buildstream2}/_sourcecache.py      |   0
 {buildstream => buildstream2}/_sourcefactory.py    |   0
 {buildstream => buildstream2}/_stream.py           |   0
 {buildstream => buildstream2}/_variables.py        |   0
 {buildstream => buildstream2}/_version.py          |   0
 {buildstream => buildstream2}/_versions.py         |   0
 {buildstream => buildstream2}/_workspaces.py       |   0
 {buildstream => buildstream2}/_yaml.py             |   0
 {buildstream => buildstream2}/buildelement.py      |   0
 {buildstream => buildstream2}/data/bst             |   0
 {buildstream => buildstream2}/data/build-all.sh.in |   0
 .../data/build-module.sh.in                        |   0
 .../data/projectconfig.yaml                        |   0
 {buildstream => buildstream2}/data/userconfig.yaml |   0
 {buildstream => buildstream2}/element.py           |  26 +-
 {buildstream => buildstream2}/plugin.py            |  46 +--
 .../plugins/elements}/__init__.py                  |   0
 .../plugins/elements/autotools.py                  |   4 +-
 .../plugins/elements/autotools.yaml                |   0
 .../plugins/elements/cmake.py                      |   4 +-
 .../plugins/elements/cmake.yaml                    |   0
 .../plugins/elements/compose.py                    |   4 +-
 .../plugins/elements/compose.yaml                  |   0
 .../plugins/elements/distutils.py                  |   4 +-
 .../plugins/elements/distutils.yaml                |   0
 .../plugins/elements/filter.py                     |   4 +-
 .../plugins/elements/filter.yaml                   |   0
 .../plugins/elements/import.py                     |   4 +-
 .../plugins/elements/import.yaml                   |   0
 .../plugins/elements/junction.py                   |   4 +-
 .../plugins/elements/make.py                       |   4 +-
 .../plugins/elements/make.yaml                     |   0
 .../plugins/elements/makemaker.py                  |   4 +-
 .../plugins/elements/makemaker.yaml                |   0
 .../plugins/elements/manual.py                     |   4 +-
 .../plugins/elements/manual.yaml                   |   0
 .../plugins/elements/meson.py                      |   4 +-
 .../plugins/elements/meson.yaml                    |   0
 .../plugins/elements/modulebuild.py                |   4 +-
 .../plugins/elements/modulebuild.yaml              |   0
 .../plugins/elements/pip.py                        |   4 +-
 .../plugins/elements/pip.yaml                      |   0
 .../plugins/elements/qmake.py                      |   4 +-
 .../plugins/elements/qmake.yaml                    |   0
 .../plugins/elements/script.py                     |   6 +-
 .../plugins/elements/script.yaml                   |   0
 .../plugins/elements/stack.py                      |   2 +-
 .../plugins/sources}/__init__.py                   |   0
 .../plugins/sources/_downloadablefilesource.py     |   4 +-
 .../plugins/sources/bzr.py                         |   4 +-
 .../plugins/sources/deb.py                         |   0
 .../plugins/sources/git.py                         |   2 +-
 .../plugins/sources/local.py                       |   4 +-
 .../plugins/sources/ostree.py                      |   8 +-
 .../plugins/sources/patch.py                       |   4 +-
 .../plugins/sources/pip.py                         |   2 +-
 .../plugins/sources/remote.py                      |   2 +-
 .../plugins/sources/tar.py                         |   4 +-
 .../plugins/sources/zip.py                         |   4 +-
 {buildstream => buildstream2}/sandbox/__init__.py  |   0
 {buildstream => buildstream2}/sandbox/_config.py   |   0
 {buildstream => buildstream2}/sandbox/_mount.py    |   0
 {buildstream => buildstream2}/sandbox/_mounter.py  |   0
 .../sandbox/_sandboxbwrap.py                       |   0
 .../sandbox/_sandboxchroot.py                      |   0
 .../sandbox/_sandboxdummy.py                       |   0
 .../sandbox/_sandboxremote.py                      |   0
 {buildstream => buildstream2}/sandbox/sandbox.py   |   2 +-
 {buildstream => buildstream2}/scriptelement.py     |   0
 {buildstream => buildstream2}/source.py            |  66 ++--
 {buildstream => buildstream2}/storage/__init__.py  |   0
 .../storage/_casbaseddirectory.py                  |   0
 .../storage/_filebaseddirectory.py                 |   0
 {buildstream => buildstream2}/storage/directory.py |   0
 {buildstream => buildstream2}/testing/__init__.py  |   0
 .../testing/_sourcetests}/__init__.py              |   0
 .../testing/_sourcetests/build_checkout.py         |   6 +-
 .../testing/_sourcetests/fetch.py                  |   2 +-
 .../testing/_sourcetests/mirror.py                 |   4 +-
 .../testing/_sourcetests/project/elements/base.bst |   0
 .../project/elements/base/base-alpine.bst          |   0
 .../_sourcetests/project/elements/import-bin.bst   |   0
 .../_sourcetests/project/elements/import-dev.bst   |   0
 .../multiple_targets/dependency/horsey.bst         |   0
 .../elements/multiple_targets/dependency/pony.bst  |   0
 .../elements/multiple_targets/dependency/zebry.bst |   0
 .../project/elements/multiple_targets/order/0.bst  |   0
 .../project/elements/multiple_targets/order/1.bst  |   0
 .../project/elements/multiple_targets/order/2.bst  |   0
 .../project/elements/multiple_targets/order/3.bst  |   0
 .../project/elements/multiple_targets/order/4.bst  |   0
 .../project/elements/multiple_targets/order/5.bst  |   0
 .../project/elements/multiple_targets/order/6.bst  |   0
 .../project/elements/multiple_targets/order/7.bst  |   0
 .../project/elements/multiple_targets/order/8.bst  |   0
 .../project/elements/multiple_targets/order/9.bst  |   0
 .../elements/multiple_targets/order/run.bst        |   0
 .../testing/_sourcetests/project/files/bar         |   0
 .../project/files/bin-files/usr/bin/hello          |   0
 .../project/files/dev-files/usr/include/pony.h     |   0
 .../project/files/etc-files/etc/buildstream/config |   0
 .../testing/_sourcetests/project/files/foo         |   0
 .../project/files/source-bundle/llamas.txt         |   0
 .../files/sub-project/elements/import-etc.bst      |   0
 .../sub-project/files/etc-files/etc/animal.conf    |   0
 .../project/files/sub-project/project.conf         |   0
 .../testing/_sourcetests/project/project.conf      |   0
 .../testing/_sourcetests/source_determinism.py     |   2 +-
 .../testing/_sourcetests/track.py                  |   4 +-
 .../testing/_sourcetests/track_cross_junction.py   |   2 +-
 .../testing/_sourcetests/workspace.py              |   2 +-
 .../testing/_utils/__init__.py                     |   2 +-
 .../testing/_utils/junction.py                     |   2 +-
 .../testing/_utils/site.py                         |   2 +-
 .../testing/integration.py                         |   0
 {buildstream => buildstream2}/testing/repo.py      |   2 +-
 {buildstream => buildstream2}/testing/runcli.py    |   8 +-
 {buildstream => buildstream2}/types.py             |   2 +-
 {buildstream => buildstream2}/utils.py             |   0
 doc/Makefile                                       |   8 +-
 doc/bst2html.py                                    |   8 +-
 doc/source/arch_data_model.rst                     |   6 +-
 doc/source/arch_dependency_model.rst               |   8 +-
 doc/source/arch_sandboxing.rst                     |   4 +-
 doc/source/conf.py                                 |   6 +-
 doc/source/core_framework.rst                      |  22 +-
 doc/source/format_declaring.rst                    |   2 +-
 doc/source/format_intro.rst                        |   2 +-
 doc/source/format_project.rst                      |  16 +-
 doc/source/format_public.rst                       |  10 +-
 doc/source/main_core.rst                           |   2 +-
 doc/source/sample_plugin/setup.py                  |   2 +-
 doc/source/tutorial/autotools.rst                  |   4 +-
 doc/source/tutorial/running-commands.rst           |   2 +-
 doc/source/using_commands.rst                      |  40 +-
 doc/source/using_config.rst                        |   2 +-
 doc/source/using_configuring_artifact_server.rst   |   2 +-
 setup.cfg                                          |   6 +-
 setup.py                                           |  18 +-
 tests/artifactcache/artifactservice.py             |  10 +-
 tests/artifactcache/cache_size.py                  |  10 +-
 tests/artifactcache/config.py                      |  16 +-
 tests/artifactcache/expiry.py                      |   8 +-
 tests/artifactcache/junctions.py                   |   4 +-
 tests/artifactcache/pull.py                        |  10 +-
 tests/artifactcache/push.py                        |  12 +-
 tests/cachekey/cachekey.py                         |   6 +-
 tests/cachekey/update.py                           |   2 +-
 tests/conftest.py                                  |   5 +-
 tests/elements/filter.py                           |   8 +-
 .../filter/basic/element_plugins/dynamic.py        |   2 +-
 tests/examples/autotools.py                        |   4 +-
 tests/examples/developing.py                       |   4 +-
 tests/examples/first-project.py                    |   4 +-
 tests/examples/flatpak-autotools.py                |   4 +-
 tests/examples/integration-commands.py             |   2 +-
 tests/examples/junctions.py                        |   2 +-
 tests/examples/running-commands.py                 |   2 +-
 tests/format/assertion.py                          |   4 +-
 tests/format/dependencies.py                       |   4 +-
 tests/format/include.py                            |   8 +-
 tests/format/include_composition.py                |   8 +-
 tests/format/junctions.py                          |   8 +-
 tests/format/listdirectiveerrors.py                |   4 +-
 tests/format/optionarch.py                         |   6 +-
 tests/format/optionbool.py                         |   6 +-
 tests/format/optioneltmask.py                      |   6 +-
 tests/format/optionenum.py                         |   6 +-
 tests/format/optionexports.py                      |   4 +-
 tests/format/optionflags.py                        |   6 +-
 tests/format/optionos.py                           |   6 +-
 tests/format/optionoverrides.py                    |   4 +-
 tests/format/options.py                            |   6 +-
 tests/format/project.py                            |   6 +-
 tests/format/project/duplicate-plugins/bar/foo.py  |   2 +-
 tests/format/project/duplicate-plugins/bar/frob.py |   2 +-
 tests/format/project/duplicate-plugins/baz/foo.py  |   2 +-
 tests/format/project/duplicate-plugins/baz/frob.py |   2 +-
 tests/format/project/plugin-allowed/plugins/foo.py |   2 +-
 .../forbidden-plugins/forbidden-plugin.py          |   2 +-
 .../plugin-no-load-ref/plugins/noloadref.py        |   2 +-
 .../errorplugin/preflighterror.py                  |   2 +-
 tests/format/projectoverrides.py                   |   4 +-
 tests/format/variables.py                          |   6 +-
 tests/frontend/__init__.py                         |   2 +-
 tests/frontend/artifact.py                         |   2 +-
 tests/frontend/buildcheckout.py                    |   6 +-
 tests/frontend/buildtrack.py                       |   8 +-
 tests/frontend/completions.py                      |   2 +-
 tests/frontend/compose_splits.py                   |   2 +-
 tests/frontend/configurable_warnings.py            |   8 +-
 .../frontend/configuredwarning/plugins/corewarn.py |   4 +-
 .../frontend/configuredwarning/plugins/warninga.py |   2 +-
 .../frontend/configuredwarning/plugins/warningb.py |   2 +-
 .../consistencyerror/plugins/consistencybug.py     |   2 +-
 .../consistencyerror/plugins/consistencyerror.py   |   2 +-
 tests/frontend/cross_junction_workspace.py         |   6 +-
 tests/frontend/fetch.py                            |   8 +-
 tests/frontend/help.py                             |   2 +-
 tests/frontend/init.py                             |  10 +-
 tests/frontend/logging.py                          |   8 +-
 tests/frontend/main.py                             |   2 +-
 tests/frontend/mirror.py                           |   6 +-
 tests/frontend/order.py                            |   6 +-
 tests/frontend/overlaps.py                         |   8 +-
 tests/frontend/project/sources/fetch_source.py     |   2 +-
 tests/frontend/pull.py                             |   4 +-
 tests/frontend/push.py                             |   4 +-
 tests/frontend/rebuild.py                          |   2 +-
 tests/frontend/remote-caches.py                    |   4 +-
 tests/frontend/show.py                             |   6 +-
 tests/frontend/source_checkout.py                  |   6 +-
 tests/frontend/track.py                            |   8 +-
 tests/frontend/version.py                          |   4 +-
 tests/frontend/workspace.py                        |  10 +-
 tests/integration/artifact.py                      |   6 +-
 tests/integration/autotools.py                     |   4 +-
 tests/integration/build-uid.py                     |   2 +-
 tests/integration/cachedfail.py                    |   6 +-
 tests/integration/cmake.py                         |   4 +-
 tests/integration/compose-symlinks.py              |   2 +-
 tests/integration/compose.py                       |   6 +-
 tests/integration/import.py                        |   6 +-
 tests/integration/make.py                          |   4 +-
 tests/integration/manual.py                        |   4 +-
 tests/integration/messages.py                      |   6 +-
 tests/integration/pip_element.py                   |   6 +-
 tests/integration/pip_source.py                    |   6 +-
 tests/integration/pullbuildtrees.py                |   8 +-
 tests/integration/sandbox-bwrap.py                 |   4 +-
 tests/integration/script.py                        |   4 +-
 tests/integration/shell.py                         |   4 +-
 tests/integration/shellbuildtrees.py               |   4 +-
 tests/integration/sockets.py                       |   2 +-
 tests/integration/source-determinism.py            |   6 +-
 tests/integration/stack.py                         |   2 +-
 tests/integration/symlinks.py                      |   2 +-
 tests/integration/workspace.py                     |   4 +-
 tests/internals/context.py                         |   4 +-
 tests/internals/loader.py                          |   8 +-
 tests/internals/pluginfactory.py                   |  10 +-
 .../internals/pluginfactory/anotherelement/foo.py  |   2 +-
 tests/internals/pluginfactory/anothersource/foo.py |   2 +-
 .../pluginfactory/badversionelement/foo.py         |   2 +-
 .../pluginfactory/badversionsource/foo.py          |   2 +-
 tests/internals/pluginfactory/customelement/foo.py |   2 +-
 tests/internals/pluginfactory/customsource/foo.py  |   2 +-
 tests/internals/pluginloading.py                   |   8 +-
 .../badversionelement/customelements/foo.py        |   2 +-
 .../badversionsource/customsources/foo.py          |   2 +-
 .../customelement/pluginelements/foo.py            |   2 +-
 .../customsource/pluginsources/foo.py              |   2 +-
 tests/internals/storage.py                         |   6 +-
 tests/internals/storage_vdir_import.py             |   6 +-
 tests/internals/utils_move_atomic.py               |   2 +-
 tests/internals/utils_save_atomic.py               |   2 +-
 tests/internals/yaml.py                            |   4 +-
 .../deprecationwarnings/deprecationwarnings.py     |   2 +-
 .../project/plugins/elements/deprecated_plugin.py  |   2 +-
 tests/remoteexecution/partial.py                   |   6 +-
 tests/remoteexecution/simple.py                    |   4 +-
 tests/sandboxes/missing-command.py                 |   4 +-
 tests/sandboxes/missing_dependencies.py            |   6 +-
 tests/sandboxes/mounting/mount_simple.py           |   2 +-
 tests/sandboxes/remote-exec-config.py              |   6 +-
 tests/sourcecache/config.py                        |   6 +-
 tests/sourcecache/fetch.py                         |  12 +-
 .../project/plugins/elements/always_fail.py        |   4 +-
 tests/sourcecache/push.py                          |  12 +-
 tests/sourcecache/source-checkout.py               |   4 +-
 tests/sourcecache/staging.py                       |   6 +-
 tests/sourcecache/workspace.py                     |   2 +-
 tests/sources/bzr.py                               |   6 +-
 tests/sources/deb.py                               |   6 +-
 tests/sources/git.py                               |  10 +-
 tests/sources/keytest.py                           |   4 +-
 tests/sources/local.py                             |   4 +-
 .../plugins/sources/always_cached.py               |   2 +-
 tests/sources/no_fetch_cached.py                   |   6 +-
 tests/sources/ostree.py                            |   8 +-
 tests/sources/patch.py                             |   4 +-
 tests/sources/pip.py                               |   8 +-
 tests/sources/previous_source_access.py            |   2 +-
 .../plugins/sources/foo_transform.py               |   2 +-
 .../project_key_test/plugins/sources/key-test.py   |   2 +-
 tests/sources/remote.py                            |   6 +-
 tests/sources/tar.py                               |   6 +-
 tests/sources/zip.py                               |   6 +-
 tests/testutils/artifactshare.py                   |   8 +-
 tests/testutils/element_generators.py              |   6 +-
 tests/testutils/junction.py                        |   4 +-
 tests/testutils/repo/bzr.py                        |   2 +-
 tests/testutils/repo/git.py                        |   2 +-
 tests/testutils/repo/ostree.py                     |   2 +-
 tests/testutils/repo/tar.py                        |   4 +-
 tests/testutils/repo/zip.py                        |   4 +-
 tests/testutils/site.py                            |   6 +-
 tests/testutils/yaml.py                            |   2 +-
 tox.ini                                            |   6 +-
 419 files changed, 939 insertions(+), 946 deletions(-)

diff --git a/.coveragerc b/.coveragerc
index ca47c8a..bd90fb1 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -1,15 +1,15 @@
 [run]
 concurrency = multiprocessing
 include =
-  */buildstream/*
+  */buildstream2/*
 
 omit =
   # Omit some internals
-  */buildstream/_profile.py
-  */buildstream/__main__.py
-  */buildstream/_version.py
+  */buildstream2/_profile.py
+  */buildstream2/__main__.py
+  */buildstream2/_version.py
   # Omit generated code
-  */buildstream/_protos/*
+  */buildstream2/_protos/*
   */.eggs/*
   # Omit .tox directory
   */.tox/*
@@ -20,6 +20,6 @@ precision = 2
 
 [paths]
 source =
-    buildstream/
-    */site-packages/buildstream/
-    */buildstream/buildstream/
+    buildstream2/
+    */site-packages/buildstream2/
+    */buildstream/buildstream2/
diff --git a/.pylintrc b/.pylintrc
index c47ef92..1632d49 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -183,7 +183,7 @@ ignored-classes=optparse.Values,thread._local,_thread._local,contextlib.closing,
 # (useful for modules/projects where namespaces are manipulated during runtime
 # and thus existing member attributes cannot be deduced by static analysis. It
 # supports qualified module names, as well as Unix pattern matching.
-ignored-modules=pkg_resources,gi.repository,grpc,buildstream._protos.*
+ignored-modules=pkg_resources,gi.repository,grpc,buildstream2._protos.*
 
 # Show a hint with possible names when a member name was not found. The aspect
 # of finding the hint is based on edit distance.
diff --git a/MANIFEST.in b/MANIFEST.in
index 729a3e9..29767a2 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -31,7 +31,7 @@ include .coveragerc
 include .pylintrc
 
 # Protocol Buffers
-recursive-include buildstream/_protos *.proto
+recursive-include buildstream2/_protos *.proto
 
 # Requirements files
 include requirements/requirements.in
diff --git a/buildstream/__init__.py b/buildstream2/__init__.py
similarity index 100%
rename from buildstream/__init__.py
rename to buildstream2/__init__.py
diff --git a/buildstream/__main__.py b/buildstream2/__main__.py
similarity index 100%
rename from buildstream/__main__.py
rename to buildstream2/__main__.py
diff --git a/buildstream/_artifact.py b/buildstream2/_artifact.py
similarity index 100%
rename from buildstream/_artifact.py
rename to buildstream2/_artifact.py
diff --git a/buildstream/_artifactcache.py b/buildstream2/_artifactcache.py
similarity index 100%
rename from buildstream/_artifactcache.py
rename to buildstream2/_artifactcache.py
diff --git a/buildstream/_artifactelement.py b/buildstream2/_artifactelement.py
similarity index 100%
rename from buildstream/_artifactelement.py
rename to buildstream2/_artifactelement.py
diff --git a/buildstream/_basecache.py b/buildstream2/_basecache.py
similarity index 100%
rename from buildstream/_basecache.py
rename to buildstream2/_basecache.py
diff --git a/buildstream/_cachekey.py b/buildstream2/_cachekey.py
similarity index 100%
rename from buildstream/_cachekey.py
rename to buildstream2/_cachekey.py
diff --git a/buildstream/_cas/__init__.py b/buildstream2/_cas/__init__.py
similarity index 100%
rename from buildstream/_cas/__init__.py
rename to buildstream2/_cas/__init__.py
diff --git a/buildstream/_cas/cascache.py b/buildstream2/_cas/cascache.py
similarity index 100%
rename from buildstream/_cas/cascache.py
rename to buildstream2/_cas/cascache.py
diff --git a/buildstream/_cas/casremote.py b/buildstream2/_cas/casremote.py
similarity index 100%
rename from buildstream/_cas/casremote.py
rename to buildstream2/_cas/casremote.py
diff --git a/buildstream/_cas/casserver.py b/buildstream2/_cas/casserver.py
similarity index 100%
rename from buildstream/_cas/casserver.py
rename to buildstream2/_cas/casserver.py
diff --git a/buildstream/_context.py b/buildstream2/_context.py
similarity index 100%
rename from buildstream/_context.py
rename to buildstream2/_context.py
diff --git a/buildstream/_elementfactory.py b/buildstream2/_elementfactory.py
similarity index 100%
rename from buildstream/_elementfactory.py
rename to buildstream2/_elementfactory.py
diff --git a/buildstream/_exceptions.py b/buildstream2/_exceptions.py
similarity index 100%
rename from buildstream/_exceptions.py
rename to buildstream2/_exceptions.py
diff --git a/buildstream/_frontend/__init__.py b/buildstream2/_frontend/__init__.py
similarity index 100%
rename from buildstream/_frontend/__init__.py
rename to buildstream2/_frontend/__init__.py
diff --git a/buildstream/_frontend/app.py b/buildstream2/_frontend/app.py
similarity index 100%
rename from buildstream/_frontend/app.py
rename to buildstream2/_frontend/app.py
diff --git a/buildstream/_frontend/cli.py b/buildstream2/_frontend/cli.py
similarity index 100%
rename from buildstream/_frontend/cli.py
rename to buildstream2/_frontend/cli.py
diff --git a/buildstream/_frontend/complete.py b/buildstream2/_frontend/complete.py
similarity index 100%
rename from buildstream/_frontend/complete.py
rename to buildstream2/_frontend/complete.py
diff --git a/buildstream/_frontend/linuxapp.py b/buildstream2/_frontend/linuxapp.py
similarity index 100%
rename from buildstream/_frontend/linuxapp.py
rename to buildstream2/_frontend/linuxapp.py
diff --git a/buildstream/_frontend/profile.py b/buildstream2/_frontend/profile.py
similarity index 100%
rename from buildstream/_frontend/profile.py
rename to buildstream2/_frontend/profile.py
diff --git a/buildstream/_frontend/status.py b/buildstream2/_frontend/status.py
similarity index 100%
rename from buildstream/_frontend/status.py
rename to buildstream2/_frontend/status.py
diff --git a/buildstream/_frontend/widget.py b/buildstream2/_frontend/widget.py
similarity index 100%
rename from buildstream/_frontend/widget.py
rename to buildstream2/_frontend/widget.py
diff --git a/buildstream/_fuse/__init__.py b/buildstream2/_fuse/__init__.py
similarity index 100%
rename from buildstream/_fuse/__init__.py
rename to buildstream2/_fuse/__init__.py
diff --git a/buildstream/_fuse/fuse.py b/buildstream2/_fuse/fuse.py
similarity index 100%
rename from buildstream/_fuse/fuse.py
rename to buildstream2/_fuse/fuse.py
diff --git a/buildstream/_fuse/hardlinks.py b/buildstream2/_fuse/hardlinks.py
similarity index 100%
rename from buildstream/_fuse/hardlinks.py
rename to buildstream2/_fuse/hardlinks.py
diff --git a/buildstream/_fuse/mount.py b/buildstream2/_fuse/mount.py
similarity index 100%
rename from buildstream/_fuse/mount.py
rename to buildstream2/_fuse/mount.py
diff --git a/buildstream/_gitsourcebase.py b/buildstream2/_gitsourcebase.py
similarity index 100%
rename from buildstream/_gitsourcebase.py
rename to buildstream2/_gitsourcebase.py
diff --git a/buildstream/_includes.py b/buildstream2/_includes.py
similarity index 100%
rename from buildstream/_includes.py
rename to buildstream2/_includes.py
diff --git a/buildstream/_loader/__init__.py b/buildstream2/_loader/__init__.py
similarity index 100%
rename from buildstream/_loader/__init__.py
rename to buildstream2/_loader/__init__.py
diff --git a/buildstream/_loader/loadelement.py b/buildstream2/_loader/loadelement.py
similarity index 100%
rename from buildstream/_loader/loadelement.py
rename to buildstream2/_loader/loadelement.py
diff --git a/buildstream/_loader/loader.py b/buildstream2/_loader/loader.py
similarity index 100%
rename from buildstream/_loader/loader.py
rename to buildstream2/_loader/loader.py
diff --git a/buildstream/_loader/metaelement.py b/buildstream2/_loader/metaelement.py
similarity index 100%
rename from buildstream/_loader/metaelement.py
rename to buildstream2/_loader/metaelement.py
diff --git a/buildstream/_loader/metasource.py b/buildstream2/_loader/metasource.py
similarity index 100%
rename from buildstream/_loader/metasource.py
rename to buildstream2/_loader/metasource.py
diff --git a/buildstream/_loader/types.py b/buildstream2/_loader/types.py
similarity index 100%
rename from buildstream/_loader/types.py
rename to buildstream2/_loader/types.py
diff --git a/buildstream/_message.py b/buildstream2/_message.py
similarity index 100%
rename from buildstream/_message.py
rename to buildstream2/_message.py
diff --git a/buildstream/_options/__init__.py b/buildstream2/_options/__init__.py
similarity index 100%
rename from buildstream/_options/__init__.py
rename to buildstream2/_options/__init__.py
diff --git a/buildstream/_options/option.py b/buildstream2/_options/option.py
similarity index 100%
rename from buildstream/_options/option.py
rename to buildstream2/_options/option.py
diff --git a/buildstream/_options/optionarch.py b/buildstream2/_options/optionarch.py
similarity index 100%
rename from buildstream/_options/optionarch.py
rename to buildstream2/_options/optionarch.py
diff --git a/buildstream/_options/optionbool.py b/buildstream2/_options/optionbool.py
similarity index 100%
rename from buildstream/_options/optionbool.py
rename to buildstream2/_options/optionbool.py
diff --git a/buildstream/_options/optioneltmask.py b/buildstream2/_options/optioneltmask.py
similarity index 100%
rename from buildstream/_options/optioneltmask.py
rename to buildstream2/_options/optioneltmask.py
diff --git a/buildstream/_options/optionenum.py b/buildstream2/_options/optionenum.py
similarity index 100%
rename from buildstream/_options/optionenum.py
rename to buildstream2/_options/optionenum.py
diff --git a/buildstream/_options/optionflags.py b/buildstream2/_options/optionflags.py
similarity index 100%
rename from buildstream/_options/optionflags.py
rename to buildstream2/_options/optionflags.py
diff --git a/buildstream/_options/optionos.py b/buildstream2/_options/optionos.py
similarity index 100%
rename from buildstream/_options/optionos.py
rename to buildstream2/_options/optionos.py
diff --git a/buildstream/_options/optionpool.py b/buildstream2/_options/optionpool.py
similarity index 100%
rename from buildstream/_options/optionpool.py
rename to buildstream2/_options/optionpool.py
diff --git a/buildstream/_ostree.py b/buildstream2/_ostree.py
similarity index 100%
rename from buildstream/_ostree.py
rename to buildstream2/_ostree.py
diff --git a/buildstream/_pipeline.py b/buildstream2/_pipeline.py
similarity index 100%
rename from buildstream/_pipeline.py
rename to buildstream2/_pipeline.py
diff --git a/buildstream/_platform/__init__.py b/buildstream2/_platform/__init__.py
similarity index 100%
rename from buildstream/_platform/__init__.py
rename to buildstream2/_platform/__init__.py
diff --git a/buildstream/_platform/darwin.py b/buildstream2/_platform/darwin.py
similarity index 100%
rename from buildstream/_platform/darwin.py
rename to buildstream2/_platform/darwin.py
diff --git a/buildstream/_platform/linux.py b/buildstream2/_platform/linux.py
similarity index 100%
rename from buildstream/_platform/linux.py
rename to buildstream2/_platform/linux.py
diff --git a/buildstream/_platform/platform.py b/buildstream2/_platform/platform.py
similarity index 100%
rename from buildstream/_platform/platform.py
rename to buildstream2/_platform/platform.py
diff --git a/buildstream/_platform/unix.py b/buildstream2/_platform/unix.py
similarity index 100%
rename from buildstream/_platform/unix.py
rename to buildstream2/_platform/unix.py
diff --git a/buildstream/_plugincontext.py b/buildstream2/_plugincontext.py
similarity index 99%
rename from buildstream/_plugincontext.py
rename to buildstream2/_plugincontext.py
index 7a5407c..4f5cfd5 100644
--- a/buildstream/_plugincontext.py
+++ b/buildstream2/_plugincontext.py
@@ -95,7 +95,7 @@ class PluginContext():
             # key by a tuple to avoid collision
             try:
                 package = pkg_resources.get_entry_info(package_name,
-                                                       'buildstream.plugins',
+                                                       'buildstream2.plugins',
                                                        kind)
             except pkg_resources.DistributionNotFound as e:
                 raise PluginError("Failed to load {} plugin '{}': {}"
diff --git a/buildstream/_profile.py b/buildstream2/_profile.py
similarity index 100%
rename from buildstream/_profile.py
rename to buildstream2/_profile.py
diff --git a/buildstream/_project.py b/buildstream2/_project.py
similarity index 99%
rename from buildstream/_project.py
rename to buildstream2/_project.py
index 93ed9fc..788ebb4 100644
--- a/buildstream/_project.py
+++ b/buildstream2/_project.py
@@ -921,7 +921,7 @@ class Project():
                 self._store_origin(origin, 'sources', plugin_source_origins)
                 self._store_origin(origin, 'elements', plugin_element_origins)
 
-        pluginbase = PluginBase(package='buildstream.plugins')
+        pluginbase = PluginBase(package='buildstream2.plugins')
         output.element_factory = ElementFactory(pluginbase,
                                                 plugin_origins=plugin_element_origins,
                                                 format_versions=element_format_versions)
diff --git a/buildstream/_projectrefs.py b/buildstream2/_projectrefs.py
similarity index 100%
rename from buildstream/_projectrefs.py
rename to buildstream2/_projectrefs.py
diff --git a/buildstream/testing/_sourcetests/__init__.py b/buildstream2/_protos/__init__.py
similarity index 100%
rename from buildstream/testing/_sourcetests/__init__.py
rename to buildstream2/_protos/__init__.py
diff --git a/buildstream/plugins/sources/__init__.py b/buildstream2/_protos/build/__init__.py
similarity index 100%
rename from buildstream/plugins/sources/__init__.py
rename to buildstream2/_protos/build/__init__.py
diff --git a/buildstream/plugins/elements/__init__.py b/buildstream2/_protos/build/bazel/__init__.py
similarity index 100%
rename from buildstream/plugins/elements/__init__.py
rename to buildstream2/_protos/build/bazel/__init__.py
diff --git a/buildstream/_protos/google/rpc/__init__.py b/buildstream2/_protos/build/bazel/remote/__init__.py
similarity index 100%
rename from buildstream/_protos/google/rpc/__init__.py
rename to buildstream2/_protos/build/bazel/remote/__init__.py
diff --git a/buildstream/_protos/google/longrunning/__init__.py b/buildstream2/_protos/build/bazel/remote/execution/__init__.py
similarity index 100%
rename from buildstream/_protos/google/longrunning/__init__.py
rename to buildstream2/_protos/build/bazel/remote/execution/__init__.py
diff --git a/buildstream/_protos/google/bytestream/__init__.py b/buildstream2/_protos/build/bazel/remote/execution/v2/__init__.py
similarity index 100%
rename from buildstream/_protos/google/bytestream/__init__.py
rename to buildstream2/_protos/build/bazel/remote/execution/v2/__init__.py
diff --git a/buildstream/_protos/build/bazel/remote/execution/v2/remote_execution.proto b/buildstream2/_protos/build/bazel/remote/execution/v2/remote_execution.proto
similarity index 100%
rename from buildstream/_protos/build/bazel/remote/execution/v2/remote_execution.proto
rename to buildstream2/_protos/build/bazel/remote/execution/v2/remote_execution.proto
diff --git a/buildstream/_protos/build/bazel/remote/execution/v2/remote_execution_pb2.py b/buildstream2/_protos/build/bazel/remote/execution/v2/remote_execution_pb2.py
similarity index 92%
rename from buildstream/_protos/build/bazel/remote/execution/v2/remote_execution_pb2.py
rename to buildstream2/_protos/build/bazel/remote/execution/v2/remote_execution_pb2.py
index 46d59b1..82d62f0 100644
--- a/buildstream/_protos/build/bazel/remote/execution/v2/remote_execution_pb2.py
+++ b/buildstream2/_protos/build/bazel/remote/execution/v2/remote_execution_pb2.py
@@ -8,24 +8,24 @@ from google.protobuf import descriptor as _descriptor
 from google.protobuf import message as _message
 from google.protobuf import reflection as _reflection
 from google.protobuf import symbol_database as _symbol_database
-from google.protobuf import descriptor_pb2
 # @@protoc_insertion_point(imports)
 
 _sym_db = _symbol_database.Default()
 
 
-from buildstream._protos.build.bazel.semver import semver_pb2 as build_dot_bazel_dot_semver_dot_semver__pb2
-from buildstream._protos.google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
-from buildstream._protos.google.longrunning import operations_pb2 as google_dot_longrunning_dot_operations__pb2
+from buildstream2._protos.build.bazel.semver import semver_pb2 as build_dot_bazel_dot_semver_dot_semver__pb2
+from buildstream2._protos.google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
+from buildstream2._protos.google.longrunning import operations_pb2 as google_dot_longrunning_dot_operations__pb2
 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
-from buildstream._protos.google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2
+from buildstream2._protos.google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2
 
 
 DESCRIPTOR = _descriptor.FileDescriptor(
   name='build/bazel/remote/execution/v2/remote_execution.proto',
   package='build.bazel.remote.execution.v2',
   syntax='proto3',
+  serialized_options=_b('\n\037build.bazel.remote.execution.v2B\024RemoteExecutionProtoP\001Z\017remoteexecution\242\002\003REX\252\002\037Build.Bazel.Remote.Execution.V2'),
   serialized_pb=_b('\n6build/bazel/remote/execution/v2/remote_execution.proto\x12\x1f\x62uild.bazel.remote.execution.v2\x1a\x1f\x62uild/bazel/semver/semver.proto\x1a\x1cgoogle/api/annotations.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xd5\x01\n\x06\x41\x63tion\x12?\n\x0e\x63ommand_digest\x18\x01 \x01(\x0b\x32\'.build.bazel.remote.execution.v2.Digest\x12\x42\n\x11input_root_dig [...]
   ,
   dependencies=[build_dot_bazel_dot_semver_dot_semver__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_longrunning_dot_operations__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,])
@@ -38,23 +38,23 @@ _DIGESTFUNCTION = _descriptor.EnumDescriptor(
   values=[
     _descriptor.EnumValueDescriptor(
       name='UNKNOWN', index=0, number=0,
-      options=None,
+      serialized_options=None,
       type=None),
     _descriptor.EnumValueDescriptor(
       name='SHA256', index=1, number=1,
-      options=None,
+      serialized_options=None,
       type=None),
     _descriptor.EnumValueDescriptor(
       name='SHA1', index=2, number=2,
-      options=None,
+      serialized_options=None,
       type=None),
     _descriptor.EnumValueDescriptor(
       name='MD5', index=3, number=3,
-      options=None,
+      serialized_options=None,
       type=None),
   ],
   containing_type=None,
-  options=None,
+  serialized_options=None,
   serialized_start=7213,
   serialized_end=7273,
 )
@@ -75,27 +75,27 @@ _EXECUTEOPERATIONMETADATA_STAGE = _descriptor.EnumDescriptor(
   values=[
     _descriptor.EnumValueDescriptor(
       name='UNKNOWN', index=0, number=0,
-      options=None,
+      serialized_options=None,
       type=None),
     _descriptor.EnumValueDescriptor(
       name='CACHE_CHECK', index=1, number=1,
-      options=None,
+      serialized_options=None,
       type=None),
     _descriptor.EnumValueDescriptor(
       name='QUEUED', index=2, number=2,
-      options=None,
+      serialized_options=None,
       type=None),
     _descriptor.EnumValueDescriptor(
       name='EXECUTING', index=3, number=3,
-      options=None,
+      serialized_options=None,
       type=None),
     _descriptor.EnumValueDescriptor(
       name='COMPLETED', index=4, number=4,
-      options=None,
+      serialized_options=None,
       type=None),
   ],
   containing_type=None,
-  options=None,
+  serialized_options=None,
   serialized_start=3866,
   serialized_end=3945,
 )
@@ -109,19 +109,19 @@ _CACHECAPABILITIES_SYMLINKABSOLUTEPATHSTRATEGY = _descriptor.EnumDescriptor(
   values=[
     _descriptor.EnumValueDescriptor(
       name='UNKNOWN', index=0, number=0,
-      options=None,
+      serialized_options=None,
       type=None),
     _descriptor.EnumValueDescriptor(
       name='DISALLOWED', index=1, number=1,
-      options=None,
+      serialized_options=None,
       type=None),
     _descriptor.EnumValueDescriptor(
       name='ALLOWED', index=2, number=2,
-      options=None,
+      serialized_options=None,
       type=None),
   ],
   containing_type=None,
-  options=None,
+  serialized_options=None,
   serialized_start=6696,
   serialized_end=6767,
 )
@@ -141,35 +141,35 @@ _ACTION = _descriptor.Descriptor(
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='input_root_digest', full_name='build.bazel.remote.execution.v2.Action.input_root_digest', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='timeout', full_name='build.bazel.remote.execution.v2.Action.timeout', index=2,
       number=6, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='do_not_cache', full_name='build.bazel.remote.execution.v2.Action.do_not_cache', index=3,
       number=7, type=8, cpp_type=7, label=1,
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -193,21 +193,21 @@ _COMMAND_ENVIRONMENTVARIABLE = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='value', full_name='build.bazel.remote.execution.v2.Command.EnvironmentVariable.value', index=1,
       number=2, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -230,49 +230,49 @@ _COMMAND = _descriptor.Descriptor(
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='environment_variables', full_name='build.bazel.remote.execution.v2.Command.environment_variables', index=1,
       number=2, type=11, cpp_type=10, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='output_files', full_name='build.bazel.remote.execution.v2.Command.output_files', index=2,
       number=3, type=9, cpp_type=9, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='output_directories', full_name='build.bazel.remote.execution.v2.Command.output_directories', index=3,
       number=4, type=9, cpp_type=9, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='platform', full_name='build.bazel.remote.execution.v2.Command.platform', index=4,
       number=5, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='working_directory', full_name='build.bazel.remote.execution.v2.Command.working_directory', index=5,
       number=6, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[_COMMAND_ENVIRONMENTVARIABLE, ],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -296,21 +296,21 @@ _PLATFORM_PROPERTY = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='value', full_name='build.bazel.remote.execution.v2.Platform.Property.value', index=1,
       number=2, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -333,14 +333,14 @@ _PLATFORM = _descriptor.Descriptor(
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[_PLATFORM_PROPERTY, ],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -364,28 +364,28 @@ _DIRECTORY = _descriptor.Descriptor(
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='directories', full_name='build.bazel.remote.execution.v2.Directory.directories', index=1,
       number=2, type=11, cpp_type=10, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='symlinks', full_name='build.bazel.remote.execution.v2.Directory.symlinks', index=2,
       number=3, type=11, cpp_type=10, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -409,28 +409,28 @@ _FILENODE = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='digest', full_name='build.bazel.remote.execution.v2.FileNode.digest', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='is_executable', full_name='build.bazel.remote.execution.v2.FileNode.is_executable', index=2,
       number=4, type=8, cpp_type=7, label=1,
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -454,21 +454,21 @@ _DIRECTORYNODE = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='digest', full_name='build.bazel.remote.execution.v2.DirectoryNode.digest', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -492,21 +492,21 @@ _SYMLINKNODE = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='target', full_name='build.bazel.remote.execution.v2.SymlinkNode.target', index=1,
       number=2, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -530,21 +530,21 @@ _DIGEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='size_bytes', full_name='build.bazel.remote.execution.v2.Digest.size_bytes', index=1,
       number=2, type=3, cpp_type=2, label=1,
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -568,77 +568,77 @@ _EXECUTEDACTIONMETADATA = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='queued_timestamp', full_name='build.bazel.remote.execution.v2.ExecutedActionMetadata.queued_timestamp', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='worker_start_timestamp', full_name='build.bazel.remote.execution.v2.ExecutedActionMetadata.worker_start_timestamp', index=2,
       number=3, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='worker_completed_timestamp', full_name='build.bazel.remote.execution.v2.ExecutedActionMetadata.worker_completed_timestamp', index=3,
       number=4, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='input_fetch_start_timestamp', full_name='build.bazel.remote.execution.v2.ExecutedActionMetadata.input_fetch_start_timestamp', index=4,
       number=5, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='input_fetch_completed_timestamp', full_name='build.bazel.remote.execution.v2.ExecutedActionMetadata.input_fetch_completed_timestamp', index=5,
       number=6, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='execution_start_timestamp', full_name='build.bazel.remote.execution.v2.ExecutedActionMetadata.execution_start_timestamp', index=6,
       number=7, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='execution_completed_timestamp', full_name='build.bazel.remote.execution.v2.ExecutedActionMetadata.execution_completed_timestamp', index=7,
       number=8, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='output_upload_start_timestamp', full_name='build.bazel.remote.execution.v2.ExecutedActionMetadata.output_upload_start_timestamp', index=8,
       number=9, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='output_upload_completed_timestamp', full_name='build.bazel.remote.execution.v2.ExecutedActionMetadata.output_upload_completed_timestamp', index=9,
       number=10, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -662,63 +662,63 @@ _ACTIONRESULT = _descriptor.Descriptor(
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='output_directories', full_name='build.bazel.remote.execution.v2.ActionResult.output_directories', index=1,
       number=3, type=11, cpp_type=10, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='exit_code', full_name='build.bazel.remote.execution.v2.ActionResult.exit_code', index=2,
       number=4, type=5, cpp_type=1, label=1,
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='stdout_raw', full_name='build.bazel.remote.execution.v2.ActionResult.stdout_raw', index=3,
       number=5, type=12, cpp_type=9, label=1,
       has_default_value=False, default_value=_b(""),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='stdout_digest', full_name='build.bazel.remote.execution.v2.ActionResult.stdout_digest', index=4,
       number=6, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='stderr_raw', full_name='build.bazel.remote.execution.v2.ActionResult.stderr_raw', index=5,
       number=7, type=12, cpp_type=9, label=1,
       has_default_value=False, default_value=_b(""),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='stderr_digest', full_name='build.bazel.remote.execution.v2.ActionResult.stderr_digest', index=6,
       number=8, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='execution_metadata', full_name='build.bazel.remote.execution.v2.ActionResult.execution_metadata', index=7,
       number=9, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -742,28 +742,28 @@ _OUTPUTFILE = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='digest', full_name='build.bazel.remote.execution.v2.OutputFile.digest', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='is_executable', full_name='build.bazel.remote.execution.v2.OutputFile.is_executable', index=2,
       number=4, type=8, cpp_type=7, label=1,
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -787,21 +787,21 @@ _TREE = _descriptor.Descriptor(
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='children', full_name='build.bazel.remote.execution.v2.Tree.children', index=1,
       number=2, type=11, cpp_type=10, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -825,21 +825,21 @@ _OUTPUTDIRECTORY = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='tree_digest', full_name='build.bazel.remote.execution.v2.OutputDirectory.tree_digest', index=1,
       number=3, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -863,14 +863,14 @@ _EXECUTIONPOLICY = _descriptor.Descriptor(
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -894,14 +894,14 @@ _RESULTSCACHEPOLICY = _descriptor.Descriptor(
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -925,42 +925,42 @@ _EXECUTEREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='skip_cache_lookup', full_name='build.bazel.remote.execution.v2.ExecuteRequest.skip_cache_lookup', index=1,
       number=3, type=8, cpp_type=7, label=1,
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='action_digest', full_name='build.bazel.remote.execution.v2.ExecuteRequest.action_digest', index=2,
       number=6, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='execution_policy', full_name='build.bazel.remote.execution.v2.ExecuteRequest.execution_policy', index=3,
       number=7, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='results_cache_policy', full_name='build.bazel.remote.execution.v2.ExecuteRequest.results_cache_policy', index=4,
       number=8, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -984,21 +984,21 @@ _LOGFILE = _descriptor.Descriptor(
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='human_readable', full_name='build.bazel.remote.execution.v2.LogFile.human_readable', index=1,
       number=2, type=8, cpp_type=7, label=1,
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1022,21 +1022,21 @@ _EXECUTERESPONSE_SERVERLOGSENTRY = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='value', full_name='build.bazel.remote.execution.v2.ExecuteResponse.ServerLogsEntry.value', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')),
+  serialized_options=_b('8\001'),
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1059,35 +1059,35 @@ _EXECUTERESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='cached_result', full_name='build.bazel.remote.execution.v2.ExecuteResponse.cached_result', index=1,
       number=2, type=8, cpp_type=7, label=1,
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='status', full_name='build.bazel.remote.execution.v2.ExecuteResponse.status', index=2,
       number=3, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='server_logs', full_name='build.bazel.remote.execution.v2.ExecuteResponse.server_logs', index=3,
       number=4, type=11, cpp_type=10, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[_EXECUTERESPONSE_SERVERLOGSENTRY, ],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1111,28 +1111,28 @@ _EXECUTEOPERATIONMETADATA = _descriptor.Descriptor(
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='action_digest', full_name='build.bazel.remote.execution.v2.ExecuteOperationMetadata.action_digest', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='stdout_stream_name', full_name='build.bazel.remote.execution.v2.ExecuteOperationMetadata.stdout_stream_name', index=2,
       number=3, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='stderr_stream_name', full_name='build.bazel.remote.execution.v2.ExecuteOperationMetadata.stderr_stream_name', index=3,
       number=4, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
@@ -1140,7 +1140,7 @@ _EXECUTEOPERATIONMETADATA = _descriptor.Descriptor(
   enum_types=[
     _EXECUTEOPERATIONMETADATA_STAGE,
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1164,14 +1164,14 @@ _WAITEXECUTIONREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1195,21 +1195,21 @@ _GETACTIONRESULTREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='action_digest', full_name='build.bazel.remote.execution.v2.GetActionResultRequest.action_digest', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1233,35 +1233,35 @@ _UPDATEACTIONRESULTREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='action_digest', full_name='build.bazel.remote.execution.v2.UpdateActionResultRequest.action_digest', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='action_result', full_name='build.bazel.remote.execution.v2.UpdateActionResultRequest.action_result', index=2,
       number=3, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='results_cache_policy', full_name='build.bazel.remote.execution.v2.UpdateActionResultRequest.results_cache_policy', index=3,
       number=4, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1285,21 +1285,21 @@ _FINDMISSINGBLOBSREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='blob_digests', full_name='build.bazel.remote.execution.v2.FindMissingBlobsRequest.blob_digests', index=1,
       number=2, type=11, cpp_type=10, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1323,14 +1323,14 @@ _FINDMISSINGBLOBSRESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1354,21 +1354,21 @@ _BATCHUPDATEBLOBSREQUEST_REQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='data', full_name='build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.data', index=1,
       number=2, type=12, cpp_type=9, label=1,
       has_default_value=False, default_value=_b(""),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1391,21 +1391,21 @@ _BATCHUPDATEBLOBSREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='requests', full_name='build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.requests', index=1,
       number=2, type=11, cpp_type=10, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[_BATCHUPDATEBLOBSREQUEST_REQUEST, ],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1429,21 +1429,21 @@ _BATCHUPDATEBLOBSRESPONSE_RESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='status', full_name='build.bazel.remote.execution.v2.BatchUpdateBlobsResponse.Response.status', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1466,14 +1466,14 @@ _BATCHUPDATEBLOBSRESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[_BATCHUPDATEBLOBSRESPONSE_RESPONSE, ],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1497,21 +1497,21 @@ _BATCHREADBLOBSREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='digests', full_name='build.bazel.remote.execution.v2.BatchReadBlobsRequest.digests', index=1,
       number=2, type=11, cpp_type=10, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1535,28 +1535,28 @@ _BATCHREADBLOBSRESPONSE_RESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='data', full_name='build.bazel.remote.execution.v2.BatchReadBlobsResponse.Response.data', index=1,
       number=2, type=12, cpp_type=9, label=1,
       has_default_value=False, default_value=_b(""),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='status', full_name='build.bazel.remote.execution.v2.BatchReadBlobsResponse.Response.status', index=2,
       number=3, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1579,14 +1579,14 @@ _BATCHREADBLOBSRESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[_BATCHREADBLOBSRESPONSE_RESPONSE, ],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1610,35 +1610,35 @@ _GETTREEREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='root_digest', full_name='build.bazel.remote.execution.v2.GetTreeRequest.root_digest', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='page_size', full_name='build.bazel.remote.execution.v2.GetTreeRequest.page_size', index=2,
       number=3, type=5, cpp_type=1, label=1,
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='page_token', full_name='build.bazel.remote.execution.v2.GetTreeRequest.page_token', index=3,
       number=4, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1662,21 +1662,21 @@ _GETTREERESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='next_page_token', full_name='build.bazel.remote.execution.v2.GetTreeResponse.next_page_token', index=1,
       number=2, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1700,14 +1700,14 @@ _GETCAPABILITIESREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1731,42 +1731,42 @@ _SERVERCAPABILITIES = _descriptor.Descriptor(
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='execution_capabilities', full_name='build.bazel.remote.execution.v2.ServerCapabilities.execution_capabilities', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='deprecated_api_version', full_name='build.bazel.remote.execution.v2.ServerCapabilities.deprecated_api_version', index=2,
       number=3, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='low_api_version', full_name='build.bazel.remote.execution.v2.ServerCapabilities.low_api_version', index=3,
       number=4, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='high_api_version', full_name='build.bazel.remote.execution.v2.ServerCapabilities.high_api_version', index=4,
       number=5, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1790,14 +1790,14 @@ _ACTIONCACHEUPDATECAPABILITIES = _descriptor.Descriptor(
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1821,21 +1821,21 @@ _PRIORITYCAPABILITIES_PRIORITYRANGE = _descriptor.Descriptor(
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='max_priority', full_name='build.bazel.remote.execution.v2.PriorityCapabilities.PriorityRange.max_priority', index=1,
       number=2, type=5, cpp_type=1, label=1,
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1858,14 +1858,14 @@ _PRIORITYCAPABILITIES = _descriptor.Descriptor(
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[_PRIORITYCAPABILITIES_PRIORITYRANGE, ],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1889,35 +1889,35 @@ _CACHECAPABILITIES = _descriptor.Descriptor(
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='action_cache_update_capabilities', full_name='build.bazel.remote.execution.v2.CacheCapabilities.action_cache_update_capabilities', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='cache_priority_capabilities', full_name='build.bazel.remote.execution.v2.CacheCapabilities.cache_priority_capabilities', index=2,
       number=3, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='max_batch_total_size_bytes', full_name='build.bazel.remote.execution.v2.CacheCapabilities.max_batch_total_size_bytes', index=3,
       number=4, type=3, cpp_type=2, label=1,
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='symlink_absolute_path_strategy', full_name='build.bazel.remote.execution.v2.CacheCapabilities.symlink_absolute_path_strategy', index=4,
       number=5, type=14, cpp_type=8, label=1,
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
@@ -1925,7 +1925,7 @@ _CACHECAPABILITIES = _descriptor.Descriptor(
   enum_types=[
     _CACHECAPABILITIES_SYMLINKABSOLUTEPATHSTRATEGY,
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1949,28 +1949,28 @@ _EXECUTIONCAPABILITIES = _descriptor.Descriptor(
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='exec_enabled', full_name='build.bazel.remote.execution.v2.ExecutionCapabilities.exec_enabled', index=1,
       number=2, type=8, cpp_type=7, label=1,
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='execution_priority_capabilities', full_name='build.bazel.remote.execution.v2.ExecutionCapabilities.execution_priority_capabilities', index=2,
       number=3, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -1994,21 +1994,21 @@ _TOOLDETAILS = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='tool_version', full_name='build.bazel.remote.execution.v2.ToolDetails.tool_version', index=1,
       number=2, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -2032,35 +2032,35 @@ _REQUESTMETADATA = _descriptor.Descriptor(
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='action_id', full_name='build.bazel.remote.execution.v2.RequestMetadata.action_id', index=1,
       number=2, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='tool_invocation_id', full_name='build.bazel.remote.execution.v2.RequestMetadata.tool_invocation_id', index=2,
       number=3, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='correlated_invocations_id', full_name='build.bazel.remote.execution.v2.RequestMetadata.correlated_invocations_id', index=3,
       number=4, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -2512,17 +2512,15 @@ RequestMetadata = _reflection.GeneratedProtocolMessageType('RequestMetadata', (_
 _sym_db.RegisterMessage(RequestMetadata)
 
 
-DESCRIPTOR.has_options = True
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\037build.bazel.remote.execution.v2B\024RemoteExecutionProtoP\001Z\017remoteexecution\242\002\003REX\252\002\037Build.Bazel.Remote.Execution.V2'))
-_EXECUTERESPONSE_SERVERLOGSENTRY.has_options = True
-_EXECUTERESPONSE_SERVERLOGSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001'))
+DESCRIPTOR._options = None
+_EXECUTERESPONSE_SERVERLOGSENTRY._options = None
 
 _EXECUTION = _descriptor.ServiceDescriptor(
   name='Execution',
   full_name='build.bazel.remote.execution.v2.Execution',
   file=DESCRIPTOR,
   index=0,
-  options=None,
+  serialized_options=None,
   serialized_start=7276,
   serialized_end=7589,
   methods=[
@@ -2533,7 +2531,7 @@ _EXECUTION = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_EXECUTEREQUEST,
     output_type=google_dot_longrunning_dot_operations__pb2._OPERATION,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002+\"&/v2/{instance_name=**}/actions:execute:\001*')),
+    serialized_options=_b('\202\323\344\223\002+\"&/v2/{instance_name=**}/actions:execute:\001*'),
   ),
   _descriptor.MethodDescriptor(
     name='WaitExecution',
@@ -2542,7 +2540,7 @@ _EXECUTION = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_WAITEXECUTIONREQUEST,
     output_type=google_dot_longrunning_dot_operations__pb2._OPERATION,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002+\"&/v2/{name=operations/**}:waitExecution:\001*')),
+    serialized_options=_b('\202\323\344\223\002+\"&/v2/{name=operations/**}:waitExecution:\001*'),
   ),
 ])
 _sym_db.RegisterServiceDescriptor(_EXECUTION)
@@ -2555,7 +2553,7 @@ _ACTIONCACHE = _descriptor.ServiceDescriptor(
   full_name='build.bazel.remote.execution.v2.ActionCache',
   file=DESCRIPTOR,
   index=1,
-  options=None,
+  serialized_options=None,
   serialized_start=7592,
   serialized_end=8062,
   methods=[
@@ -2566,7 +2564,7 @@ _ACTIONCACHE = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_GETACTIONRESULTREQUEST,
     output_type=_ACTIONRESULT,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002V\022T/v2/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}')),
+    serialized_options=_b('\202\323\344\223\002V\022T/v2/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}'),
   ),
   _descriptor.MethodDescriptor(
     name='UpdateActionResult',
@@ -2575,7 +2573,7 @@ _ACTIONCACHE = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_UPDATEACTIONRESULTREQUEST,
     output_type=_ACTIONRESULT,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002e\032T/v2/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}:\raction_result')),
+    serialized_options=_b('\202\323\344\223\002e\032T/v2/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}:\raction_result'),
   ),
 ])
 _sym_db.RegisterServiceDescriptor(_ACTIONCACHE)
@@ -2588,7 +2586,7 @@ _CONTENTADDRESSABLESTORAGE = _descriptor.ServiceDescriptor(
   full_name='build.bazel.remote.execution.v2.ContentAddressableStorage',
   file=DESCRIPTOR,
   index=2,
-  options=None,
+  serialized_options=None,
   serialized_start=8065,
   serialized_end=8860,
   methods=[
@@ -2599,7 +2597,7 @@ _CONTENTADDRESSABLESTORAGE = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_FINDMISSINGBLOBSREQUEST,
     output_type=_FINDMISSINGBLOBSRESPONSE,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002-\"(/v2/{instance_name=**}/blobs:findMissing:\001*')),
+    serialized_options=_b('\202\323\344\223\002-\"(/v2/{instance_name=**}/blobs:findMissing:\001*'),
   ),
   _descriptor.MethodDescriptor(
     name='BatchUpdateBlobs',
@@ -2608,7 +2606,7 @@ _CONTENTADDRESSABLESTORAGE = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_BATCHUPDATEBLOBSREQUEST,
     output_type=_BATCHUPDATEBLOBSRESPONSE,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002-\"(/v2/{instance_name=**}/blobs:batchUpdate:\001*')),
+    serialized_options=_b('\202\323\344\223\002-\"(/v2/{instance_name=**}/blobs:batchUpdate:\001*'),
   ),
   _descriptor.MethodDescriptor(
     name='BatchReadBlobs',
@@ -2617,7 +2615,7 @@ _CONTENTADDRESSABLESTORAGE = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_BATCHREADBLOBSREQUEST,
     output_type=_BATCHREADBLOBSRESPONSE,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002+\"&/v2/{instance_name=**}/blobs:batchRead:\001*')),
+    serialized_options=_b('\202\323\344\223\002+\"&/v2/{instance_name=**}/blobs:batchRead:\001*'),
   ),
   _descriptor.MethodDescriptor(
     name='GetTree',
@@ -2626,7 +2624,7 @@ _CONTENTADDRESSABLESTORAGE = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_GETTREEREQUEST,
     output_type=_GETTREERESPONSE,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002R\022P/v2/{instance_name=**}/blobs/{root_digest.hash}/{root_digest.size_bytes}:getTree')),
+    serialized_options=_b('\202\323\344\223\002R\022P/v2/{instance_name=**}/blobs/{root_digest.hash}/{root_digest.size_bytes}:getTree'),
   ),
 ])
 _sym_db.RegisterServiceDescriptor(_CONTENTADDRESSABLESTORAGE)
@@ -2639,7 +2637,7 @@ _CAPABILITIES = _descriptor.ServiceDescriptor(
   full_name='build.bazel.remote.execution.v2.Capabilities',
   file=DESCRIPTOR,
   index=3,
-  options=None,
+  serialized_options=None,
   serialized_start=8863,
   serialized_end=9052,
   methods=[
@@ -2650,7 +2648,7 @@ _CAPABILITIES = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_GETCAPABILITIESREQUEST,
     output_type=_SERVERCAPABILITIES,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002%\022#/v2/{instance_name=**}/capabilities')),
+    serialized_options=_b('\202\323\344\223\002%\022#/v2/{instance_name=**}/capabilities'),
   ),
 ])
 _sym_db.RegisterServiceDescriptor(_CAPABILITIES)
diff --git a/buildstream/_protos/build/bazel/remote/execution/v2/remote_execution_pb2_grpc.py b/buildstream2/_protos/build/bazel/remote/execution/v2/remote_execution_pb2_grpc.py
similarity index 99%
rename from buildstream/_protos/build/bazel/remote/execution/v2/remote_execution_pb2_grpc.py
rename to buildstream2/_protos/build/bazel/remote/execution/v2/remote_execution_pb2_grpc.py
index 3769a68..8c2a1f8 100644
--- a/buildstream/_protos/build/bazel/remote/execution/v2/remote_execution_pb2_grpc.py
+++ b/buildstream2/_protos/build/bazel/remote/execution/v2/remote_execution_pb2_grpc.py
@@ -1,8 +1,8 @@
 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
 import grpc
 
-from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2 as build_dot_bazel_dot_remote_dot_execution_dot_v2_dot_remote__execution__pb2
-from buildstream._protos.google.longrunning import operations_pb2 as google_dot_longrunning_dot_operations__pb2
+from buildstream2._protos.build.bazel.remote.execution.v2 import remote_execution_pb2 as build_dot_bazel_dot_remote_dot_execution_dot_v2_dot_remote__execution__pb2
+from buildstream2._protos.google.longrunning import operations_pb2 as google_dot_longrunning_dot_operations__pb2
 
 
 class ExecutionStub(object):
diff --git a/buildstream/_protos/google/api/__init__.py b/buildstream2/_protos/build/bazel/semver/__init__.py
similarity index 100%
rename from buildstream/_protos/google/api/__init__.py
rename to buildstream2/_protos/build/bazel/semver/__init__.py
diff --git a/buildstream/_protos/build/bazel/semver/semver.proto b/buildstream2/_protos/build/bazel/semver/semver.proto
similarity index 100%
rename from buildstream/_protos/build/bazel/semver/semver.proto
rename to buildstream2/_protos/build/bazel/semver/semver.proto
diff --git a/buildstream/_protos/build/bazel/semver/semver_pb2.py b/buildstream2/_protos/build/bazel/semver/semver_pb2.py
similarity index 92%
rename from buildstream/_protos/build/bazel/semver/semver_pb2.py
rename to buildstream2/_protos/build/bazel/semver/semver_pb2.py
index a36cf72..62b06ac 100644
--- a/buildstream/_protos/build/bazel/semver/semver_pb2.py
+++ b/buildstream2/_protos/build/bazel/semver/semver_pb2.py
@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
 from google.protobuf import message as _message
 from google.protobuf import reflection as _reflection
 from google.protobuf import symbol_database as _symbol_database
-from google.protobuf import descriptor_pb2
 # @@protoc_insertion_point(imports)
 
 _sym_db = _symbol_database.Default()
@@ -19,6 +18,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
   name='build/bazel/semver/semver.proto',
   package='build.bazel.semver',
   syntax='proto3',
+  serialized_options=None,
   serialized_pb=_b('\n\x1f\x62uild/bazel/semver/semver.proto\x12\x12\x62uild.bazel.semver\"I\n\x06SemVer\x12\r\n\x05major\x18\x01 \x01(\x05\x12\r\n\x05minor\x18\x02 \x01(\x05\x12\r\n\x05patch\x18\x03 \x01(\x05\x12\x12\n\nprerelease\x18\x04 \x01(\tb\x06proto3')
 )
 
@@ -38,35 +38,35 @@ _SEMVER = _descriptor.Descriptor(
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='minor', full_name='build.bazel.semver.SemVer.minor', index=1,
       number=2, type=5, cpp_type=1, label=1,
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='patch', full_name='build.bazel.semver.SemVer.patch', index=2,
       number=3, type=5, cpp_type=1, label=1,
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='prerelease', full_name='build.bazel.semver.SemVer.prerelease', index=3,
       number=4, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
diff --git a/buildstream/_protos/build/bazel/semver/semver_pb2_grpc.py b/buildstream2/_protos/build/bazel/semver/semver_pb2_grpc.py
similarity index 100%
rename from buildstream/_protos/build/bazel/semver/semver_pb2_grpc.py
rename to buildstream2/_protos/build/bazel/semver/semver_pb2_grpc.py
diff --git a/buildstream/_protos/google/__init__.py b/buildstream2/_protos/buildstream/__init__.py
similarity index 100%
rename from buildstream/_protos/google/__init__.py
rename to buildstream2/_protos/buildstream/__init__.py
diff --git a/buildstream/_protos/buildstream/v2/__init__.py b/buildstream2/_protos/buildstream/v2/__init__.py
similarity index 100%
rename from buildstream/_protos/buildstream/v2/__init__.py
rename to buildstream2/_protos/buildstream/v2/__init__.py
diff --git a/buildstream/_protos/buildstream/v2/artifact.proto b/buildstream2/_protos/buildstream/v2/artifact.proto
similarity index 100%
rename from buildstream/_protos/buildstream/v2/artifact.proto
rename to buildstream2/_protos/buildstream/v2/artifact.proto
diff --git a/buildstream/_protos/buildstream/v2/artifact_pb2.py b/buildstream2/_protos/buildstream/v2/artifact_pb2.py
similarity index 98%
rename from buildstream/_protos/buildstream/v2/artifact_pb2.py
rename to buildstream2/_protos/buildstream/v2/artifact_pb2.py
index c56d1ae..15be198 100644
--- a/buildstream/_protos/buildstream/v2/artifact_pb2.py
+++ b/buildstream2/_protos/buildstream/v2/artifact_pb2.py
@@ -12,8 +12,8 @@ from google.protobuf import symbol_database as _symbol_database
 _sym_db = _symbol_database.Default()
 
 
-from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2 as build_dot_bazel_dot_remote_dot_execution_dot_v2_dot_remote__execution__pb2
-from buildstream._protos.google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
+from buildstream2._protos.build.bazel.remote.execution.v2 import remote_execution_pb2 as build_dot_bazel_dot_remote_dot_execution_dot_v2_dot_remote__execution__pb2
+from buildstream2._protos.google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
 
 
 DESCRIPTOR = _descriptor.FileDescriptor(
diff --git a/buildstream/_protos/buildstream/v2/artifact_pb2_grpc.py b/buildstream2/_protos/buildstream/v2/artifact_pb2_grpc.py
similarity index 93%
rename from buildstream/_protos/buildstream/v2/artifact_pb2_grpc.py
rename to buildstream2/_protos/buildstream/v2/artifact_pb2_grpc.py
index d355146..22ba324 100644
--- a/buildstream/_protos/buildstream/v2/artifact_pb2_grpc.py
+++ b/buildstream2/_protos/buildstream/v2/artifact_pb2_grpc.py
@@ -1,7 +1,7 @@
 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
 import grpc
 
-from buildstream._protos.buildstream.v2 import artifact_pb2 as buildstream_dot_v2_dot_artifact__pb2
+from buildstream2._protos.buildstream.v2 import artifact_pb2 as buildstream_dot_v2_dot_artifact__pb2
 
 
 class ArtifactServiceStub(object):
@@ -44,6 +44,7 @@ class ArtifactServiceServicer(object):
     """Sets an Artifact message
 
     Errors:
+    * `FAILED_PRECONDITION`: Files specified in upload aren't present in CAS
     """
     context.set_code(grpc.StatusCode.UNIMPLEMENTED)
     context.set_details('Method not implemented!')
diff --git a/buildstream/_protos/buildstream/v2/buildstream.proto b/buildstream2/_protos/buildstream/v2/buildstream.proto
similarity index 100%
rename from buildstream/_protos/buildstream/v2/buildstream.proto
rename to buildstream2/_protos/buildstream/v2/buildstream.proto
diff --git a/buildstream/_protos/buildstream/v2/buildstream_pb2.py b/buildstream2/_protos/buildstream/v2/buildstream_pb2.py
similarity index 90%
rename from buildstream/_protos/buildstream/v2/buildstream_pb2.py
rename to buildstream2/_protos/buildstream/v2/buildstream_pb2.py
index 57fdae4..c4953e8 100644
--- a/buildstream/_protos/buildstream/v2/buildstream_pb2.py
+++ b/buildstream2/_protos/buildstream/v2/buildstream_pb2.py
@@ -7,20 +7,20 @@ from google.protobuf import descriptor as _descriptor
 from google.protobuf import message as _message
 from google.protobuf import reflection as _reflection
 from google.protobuf import symbol_database as _symbol_database
-from google.protobuf import descriptor_pb2
 # @@protoc_insertion_point(imports)
 
 _sym_db = _symbol_database.Default()
 
 
-from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2 as build_dot_bazel_dot_remote_dot_execution_dot_v2_dot_remote__execution__pb2
-from buildstream._protos.google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
+from buildstream2._protos.build.bazel.remote.execution.v2 import remote_execution_pb2 as build_dot_bazel_dot_remote_dot_execution_dot_v2_dot_remote__execution__pb2
+from buildstream2._protos.google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
 
 
 DESCRIPTOR = _descriptor.FileDescriptor(
   name='buildstream/v2/buildstream.proto',
   package='buildstream.v2',
   syntax='proto3',
+  serialized_options=None,
   serialized_pb=_b('\n buildstream/v2/buildstream.proto\x12\x0e\x62uildstream.v2\x1a\x36\x62uild/bazel/remote/execution/v2/remote_execution.proto\x1a\x1cgoogle/api/annotations.proto\"9\n\x13GetReferenceRequest\x12\x15\n\rinstance_name\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\"O\n\x14GetReferenceResponse\x12\x37\n\x06\x64igest\x18\x01 \x01(\x0b\x32\'.build.bazel.remote.execution.v2.Digest\"v\n\x16UpdateReferenceRequest\x12\x15\n\rinstance_name\x18\x01 \x01(\t\x12\x0c\n\x04keys\x18 [...]
   ,
   dependencies=[build_dot_bazel_dot_remote_dot_execution_dot_v2_dot_remote__execution__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,])
@@ -41,21 +41,21 @@ _GETREFERENCEREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='key', full_name='buildstream.v2.GetReferenceRequest.key', index=1,
       number=2, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -79,14 +79,14 @@ _GETREFERENCERESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -110,28 +110,28 @@ _UPDATEREFERENCEREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='keys', full_name='buildstream.v2.UpdateReferenceRequest.keys', index=1,
       number=2, type=9, cpp_type=9, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='digest', full_name='buildstream.v2.UpdateReferenceRequest.digest', index=2,
       number=3, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -155,7 +155,7 @@ _UPDATEREFERENCERESPONSE = _descriptor.Descriptor(
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -179,14 +179,14 @@ _STATUSREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -210,14 +210,14 @@ _STATUSRESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -286,7 +286,7 @@ _REFERENCESTORAGE = _descriptor.ServiceDescriptor(
   full_name='buildstream.v2.ReferenceStorage',
   file=DESCRIPTOR,
   index=0,
-  options=None,
+  serialized_options=None,
   serialized_start=507,
   serialized_end=965,
   methods=[
@@ -297,7 +297,7 @@ _REFERENCESTORAGE = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_GETREFERENCEREQUEST,
     output_type=_GETREFERENCERESPONSE,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002/\022-/v2/{instance_name=**}/buildstream/refs/{key}')),
+    serialized_options=_b('\202\323\344\223\002/\022-/v2/{instance_name=**}/buildstream/refs/{key}'),
   ),
   _descriptor.MethodDescriptor(
     name='UpdateReference',
@@ -306,7 +306,7 @@ _REFERENCESTORAGE = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_UPDATEREFERENCEREQUEST,
     output_type=_UPDATEREFERENCERESPONSE,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\0027\032-/v2/{instance_name=**}/buildstream/refs/{key}:\006digest')),
+    serialized_options=_b('\202\323\344\223\0027\032-/v2/{instance_name=**}/buildstream/refs/{key}:\006digest'),
   ),
   _descriptor.MethodDescriptor(
     name='Status',
@@ -315,7 +315,7 @@ _REFERENCESTORAGE = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_STATUSREQUEST,
     output_type=_STATUSRESPONSE,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\0020\032./v2/{instance_name=**}/buildstream/refs:status')),
+    serialized_options=_b('\202\323\344\223\0020\032./v2/{instance_name=**}/buildstream/refs:status'),
   ),
 ])
 _sym_db.RegisterServiceDescriptor(_REFERENCESTORAGE)
diff --git a/buildstream/_protos/buildstream/v2/buildstream_pb2_grpc.py b/buildstream2/_protos/buildstream/v2/buildstream_pb2_grpc.py
similarity index 97%
rename from buildstream/_protos/buildstream/v2/buildstream_pb2_grpc.py
rename to buildstream2/_protos/buildstream/v2/buildstream_pb2_grpc.py
index b3e6534..eddca88 100644
--- a/buildstream/_protos/buildstream/v2/buildstream_pb2_grpc.py
+++ b/buildstream2/_protos/buildstream/v2/buildstream_pb2_grpc.py
@@ -1,7 +1,7 @@
 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
 import grpc
 
-from buildstream._protos.buildstream.v2 import buildstream_pb2 as buildstream_dot_v2_dot_buildstream__pb2
+from buildstream2._protos.buildstream.v2 import buildstream_pb2 as buildstream_dot_v2_dot_buildstream__pb2
 
 
 class ReferenceStorageStub(object):
diff --git a/buildstream/_protos/buildstream/__init__.py b/buildstream2/_protos/google/__init__.py
similarity index 100%
rename from buildstream/_protos/buildstream/__init__.py
rename to buildstream2/_protos/google/__init__.py
diff --git a/buildstream/_protos/build/bazel/semver/__init__.py b/buildstream2/_protos/google/api/__init__.py
similarity index 100%
rename from buildstream/_protos/build/bazel/semver/__init__.py
rename to buildstream2/_protos/google/api/__init__.py
diff --git a/buildstream/_protos/google/api/annotations.proto b/buildstream2/_protos/google/api/annotations.proto
similarity index 100%
rename from buildstream/_protos/google/api/annotations.proto
rename to buildstream2/_protos/google/api/annotations.proto
diff --git a/buildstream/_protos/google/api/annotations_pb2.py b/buildstream2/_protos/google/api/annotations_pb2.py
similarity index 81%
rename from buildstream/_protos/google/api/annotations_pb2.py
rename to buildstream2/_protos/google/api/annotations_pb2.py
index 092c46d..9e4a04d 100644
--- a/buildstream/_protos/google/api/annotations_pb2.py
+++ b/buildstream2/_protos/google/api/annotations_pb2.py
@@ -7,13 +7,12 @@ from google.protobuf import descriptor as _descriptor
 from google.protobuf import message as _message
 from google.protobuf import reflection as _reflection
 from google.protobuf import symbol_database as _symbol_database
-from google.protobuf import descriptor_pb2
 # @@protoc_insertion_point(imports)
 
 _sym_db = _symbol_database.Default()
 
 
-from buildstream._protos.google.api import http_pb2 as google_dot_api_dot_http__pb2
+from buildstream2._protos.google.api import http_pb2 as google_dot_api_dot_http__pb2
 from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
 
 
@@ -21,6 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
   name='google/api/annotations.proto',
   package='google.api',
   syntax='proto3',
+  serialized_options=_b('\n\016com.google.apiB\020AnnotationsProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\242\002\004GAPI'),
   serialized_pb=_b('\n\x1cgoogle/api/annotations.proto\x12\ngoogle.api\x1a\x15google/api/http.proto\x1a google/protobuf/descriptor.proto:E\n\x04http\x12\x1e.google.protobuf.MethodOptions\x18\xb0\xca\xbc\" \x01(\x0b\x32\x14.google.api.HttpRuleBn\n\x0e\x63om.google.apiB\x10\x41nnotationsProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3')
   ,
   dependencies=[google_dot_api_dot_http__pb2.DESCRIPTOR,google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,])
@@ -33,7 +33,7 @@ http = _descriptor.FieldDescriptor(
   has_default_value=False, default_value=None,
   message_type=None, enum_type=None, containing_type=None,
   is_extension=True, extension_scope=None,
-  options=None, file=DESCRIPTOR)
+  serialized_options=None, file=DESCRIPTOR)
 
 DESCRIPTOR.extensions_by_name['http'] = http
 _sym_db.RegisterFileDescriptor(DESCRIPTOR)
@@ -41,6 +41,5 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR)
 http.message_type = google_dot_api_dot_http__pb2._HTTPRULE
 google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension(http)
 
-DESCRIPTOR.has_options = True
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\016com.google.apiB\020AnnotationsProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\242\002\004GAPI'))
+DESCRIPTOR._options = None
 # @@protoc_insertion_point(module_scope)
diff --git a/buildstream/_protos/google/api/annotations_pb2_grpc.py b/buildstream2/_protos/google/api/annotations_pb2_grpc.py
similarity index 100%
rename from buildstream/_protos/google/api/annotations_pb2_grpc.py
rename to buildstream2/_protos/google/api/annotations_pb2_grpc.py
diff --git a/buildstream/_protos/google/api/http.proto b/buildstream2/_protos/google/api/http.proto
similarity index 100%
rename from buildstream/_protos/google/api/http.proto
rename to buildstream2/_protos/google/api/http.proto
diff --git a/buildstream/_protos/google/api/http_pb2.py b/buildstream2/_protos/google/api/http_pb2.py
similarity index 91%
rename from buildstream/_protos/google/api/http_pb2.py
rename to buildstream2/_protos/google/api/http_pb2.py
index aad9ddb..5ef3912 100644
--- a/buildstream/_protos/google/api/http_pb2.py
+++ b/buildstream2/_protos/google/api/http_pb2.py
@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
 from google.protobuf import message as _message
 from google.protobuf import reflection as _reflection
 from google.protobuf import symbol_database as _symbol_database
-from google.protobuf import descriptor_pb2
 # @@protoc_insertion_point(imports)
 
 _sym_db = _symbol_database.Default()
@@ -19,6 +18,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
   name='google/api/http.proto',
   package='google.api',
   syntax='proto3',
+  serialized_options=_b('\n\016com.google.apiB\tHttpProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\370\001\001\242\002\004GAPI'),
   serialized_pb=_b('\n\x15google/api/http.proto\x12\ngoogle.api\"T\n\x04Http\x12#\n\x05rules\x18\x01 \x03(\x0b\x32\x14.google.api.HttpRule\x12\'\n\x1f\x66ully_decode_reserved_expansion\x18\x02 \x01(\x08\"\xea\x01\n\x08HttpRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\r\n\x03get\x18\x02 \x01(\tH\x00\x12\r\n\x03put\x18\x03 \x01(\tH\x00\x12\x0e\n\x04post\x18\x04 \x01(\tH\x00\x12\x10\n\x06\x64\x65lete\x18\x05 \x01(\tH\x00\x12\x0f\n\x05patch\x18\x06 \x01(\tH\x00\x12/\n\x06\x63ustom\x18\x08 \ [...]
 )
 
@@ -38,21 +38,21 @@ _HTTP = _descriptor.Descriptor(
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='fully_decode_reserved_expansion', full_name='google.api.Http.fully_decode_reserved_expansion', index=1,
       number=2, type=8, cpp_type=7, label=1,
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -76,70 +76,70 @@ _HTTPRULE = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='get', full_name='google.api.HttpRule.get', index=1,
       number=2, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='put', full_name='google.api.HttpRule.put', index=2,
       number=3, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='post', full_name='google.api.HttpRule.post', index=3,
       number=4, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='delete', full_name='google.api.HttpRule.delete', index=4,
       number=5, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='patch', full_name='google.api.HttpRule.patch', index=5,
       number=6, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='custom', full_name='google.api.HttpRule.custom', index=6,
       number=8, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='body', full_name='google.api.HttpRule.body', index=7,
       number=7, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='additional_bindings', full_name='google.api.HttpRule.additional_bindings', index=8,
       number=11, type=11, cpp_type=10, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -166,21 +166,21 @@ _CUSTOMHTTPPATTERN = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='path', full_name='google.api.CustomHttpPattern.path', index=1,
       number=2, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -238,6 +238,5 @@ CustomHttpPattern = _reflection.GeneratedProtocolMessageType('CustomHttpPattern'
 _sym_db.RegisterMessage(CustomHttpPattern)
 
 
-DESCRIPTOR.has_options = True
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\016com.google.apiB\tHttpProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\370\001\001\242\002\004GAPI'))
+DESCRIPTOR._options = None
 # @@protoc_insertion_point(module_scope)
diff --git a/buildstream/_protos/google/api/http_pb2_grpc.py b/buildstream2/_protos/google/api/http_pb2_grpc.py
similarity index 100%
rename from buildstream/_protos/google/api/http_pb2_grpc.py
rename to buildstream2/_protos/google/api/http_pb2_grpc.py
diff --git a/buildstream/_protos/build/bazel/remote/execution/v2/__init__.py b/buildstream2/_protos/google/bytestream/__init__.py
similarity index 100%
rename from buildstream/_protos/build/bazel/remote/execution/v2/__init__.py
rename to buildstream2/_protos/google/bytestream/__init__.py
diff --git a/buildstream/_protos/google/bytestream/bytestream.proto b/buildstream2/_protos/google/bytestream/bytestream.proto
similarity index 100%
rename from buildstream/_protos/google/bytestream/bytestream.proto
rename to buildstream2/_protos/google/bytestream/bytestream.proto
diff --git a/buildstream/_protos/google/bytestream/bytestream_pb2.py b/buildstream2/_protos/google/bytestream/bytestream_pb2.py
similarity index 91%
rename from buildstream/_protos/google/bytestream/bytestream_pb2.py
rename to buildstream2/_protos/google/bytestream/bytestream_pb2.py
index c8487d6..08e1a10 100644
--- a/buildstream/_protos/google/bytestream/bytestream_pb2.py
+++ b/buildstream2/_protos/google/bytestream/bytestream_pb2.py
@@ -7,13 +7,12 @@ from google.protobuf import descriptor as _descriptor
 from google.protobuf import message as _message
 from google.protobuf import reflection as _reflection
 from google.protobuf import symbol_database as _symbol_database
-from google.protobuf import descriptor_pb2
 # @@protoc_insertion_point(imports)
 
 _sym_db = _symbol_database.Default()
 
 
-from buildstream._protos.google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
+from buildstream2._protos.google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
 from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2
 
 
@@ -21,6 +20,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
   name='google/bytestream/bytestream.proto',
   package='google.bytestream',
   syntax='proto3',
+  serialized_options=_b('\n\025com.google.bytestreamB\017ByteStreamProtoZ;google.golang.org/genproto/googleapis/bytestream;bytestream'),
   serialized_pb=_b('\n\"google/bytestream/bytestream.proto\x12\x11google.bytestream\x1a\x1cgoogle/api/annotations.proto\x1a\x1egoogle/protobuf/wrappers.proto\"M\n\x0bReadRequest\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x13\n\x0bread_offset\x18\x02 \x01(\x03\x12\x12\n\nread_limit\x18\x03 \x01(\x03\"\x1c\n\x0cReadResponse\x12\x0c\n\x04\x64\x61ta\x18\n \x01(\x0c\"_\n\x0cWriteRequest\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x14\n\x0cwrite_offset\x18\x02 \x01(\x03\x12\x14\n\x0c\x66ini [...]
   ,
   dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR,])
@@ -41,28 +41,28 @@ _READREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='read_offset', full_name='google.bytestream.ReadRequest.read_offset', index=1,
       number=2, type=3, cpp_type=2, label=1,
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='read_limit', full_name='google.bytestream.ReadRequest.read_limit', index=2,
       number=3, type=3, cpp_type=2, label=1,
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -86,14 +86,14 @@ _READRESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=_b(""),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -117,35 +117,35 @@ _WRITEREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='write_offset', full_name='google.bytestream.WriteRequest.write_offset', index=1,
       number=2, type=3, cpp_type=2, label=1,
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='finish_write', full_name='google.bytestream.WriteRequest.finish_write', index=2,
       number=3, type=8, cpp_type=7, label=1,
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='data', full_name='google.bytestream.WriteRequest.data', index=3,
       number=10, type=12, cpp_type=9, label=1,
       has_default_value=False, default_value=_b(""),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -169,14 +169,14 @@ _WRITERESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -200,14 +200,14 @@ _QUERYWRITESTATUSREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -231,21 +231,21 @@ _QUERYWRITESTATUSRESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='complete', full_name='google.bytestream.QueryWriteStatusResponse.complete', index=1,
       number=2, type=8, cpp_type=7, label=1,
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -306,15 +306,14 @@ QueryWriteStatusResponse = _reflection.GeneratedProtocolMessageType('QueryWriteS
 _sym_db.RegisterMessage(QueryWriteStatusResponse)
 
 
-DESCRIPTOR.has_options = True
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\025com.google.bytestreamB\017ByteStreamProtoZ;google.golang.org/genproto/googleapis/bytestream;bytestream'))
+DESCRIPTOR._options = None
 
 _BYTESTREAM = _descriptor.ServiceDescriptor(
   name='ByteStream',
   full_name='google.bytestream.ByteStream',
   file=DESCRIPTOR,
   index=0,
-  options=None,
+  serialized_options=None,
   serialized_start=487,
   serialized_end=761,
   methods=[
@@ -325,7 +324,7 @@ _BYTESTREAM = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_READREQUEST,
     output_type=_READRESPONSE,
-    options=None,
+    serialized_options=None,
   ),
   _descriptor.MethodDescriptor(
     name='Write',
@@ -334,7 +333,7 @@ _BYTESTREAM = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_WRITEREQUEST,
     output_type=_WRITERESPONSE,
-    options=None,
+    serialized_options=None,
   ),
   _descriptor.MethodDescriptor(
     name='QueryWriteStatus',
@@ -343,7 +342,7 @@ _BYTESTREAM = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_QUERYWRITESTATUSREQUEST,
     output_type=_QUERYWRITESTATUSRESPONSE,
-    options=None,
+    serialized_options=None,
   ),
 ])
 _sym_db.RegisterServiceDescriptor(_BYTESTREAM)
diff --git a/buildstream/_protos/google/bytestream/bytestream_pb2_grpc.py b/buildstream2/_protos/google/bytestream/bytestream_pb2_grpc.py
similarity index 98%
rename from buildstream/_protos/google/bytestream/bytestream_pb2_grpc.py
rename to buildstream2/_protos/google/bytestream/bytestream_pb2_grpc.py
index ef993e0..f605e41 100644
--- a/buildstream/_protos/google/bytestream/bytestream_pb2_grpc.py
+++ b/buildstream2/_protos/google/bytestream/bytestream_pb2_grpc.py
@@ -1,7 +1,7 @@
 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
 import grpc
 
-from buildstream._protos.google.bytestream import bytestream_pb2 as google_dot_bytestream_dot_bytestream__pb2
+from buildstream2._protos.google.bytestream import bytestream_pb2 as google_dot_bytestream_dot_bytestream__pb2
 
 
 class ByteStreamStub(object):
diff --git a/buildstream/_protos/build/bazel/remote/execution/__init__.py b/buildstream2/_protos/google/longrunning/__init__.py
similarity index 100%
rename from buildstream/_protos/build/bazel/remote/execution/__init__.py
rename to buildstream2/_protos/google/longrunning/__init__.py
diff --git a/buildstream/_protos/google/longrunning/operations.proto b/buildstream2/_protos/google/longrunning/operations.proto
similarity index 100%
rename from buildstream/_protos/google/longrunning/operations.proto
rename to buildstream2/_protos/google/longrunning/operations.proto
diff --git a/buildstream/_protos/google/longrunning/operations_pb2.py b/buildstream2/_protos/google/longrunning/operations_pb2.py
similarity index 89%
rename from buildstream/_protos/google/longrunning/operations_pb2.py
rename to buildstream2/_protos/google/longrunning/operations_pb2.py
index 9fd8993..8d408e5 100644
--- a/buildstream/_protos/google/longrunning/operations_pb2.py
+++ b/buildstream2/_protos/google/longrunning/operations_pb2.py
@@ -7,22 +7,22 @@ from google.protobuf import descriptor as _descriptor
 from google.protobuf import message as _message
 from google.protobuf import reflection as _reflection
 from google.protobuf import symbol_database as _symbol_database
-from google.protobuf import descriptor_pb2
 # @@protoc_insertion_point(imports)
 
 _sym_db = _symbol_database.Default()
 
 
-from buildstream._protos.google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
+from buildstream2._protos.google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
 from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
-from buildstream._protos.google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2
+from buildstream2._protos.google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2
 
 
 DESCRIPTOR = _descriptor.FileDescriptor(
   name='google/longrunning/operations.proto',
   package='google.longrunning',
   syntax='proto3',
+  serialized_options=_b('\n\026com.google.longrunningB\017OperationsProtoP\001Z=google.golang.org/genproto/googleapis/longrunning;longrunning\252\002\022Google.LongRunning\312\002\022Google\\LongRunning'),
   serialized_pb=_b('\n#google/longrunning/operations.proto\x12\x12google.longrunning\x1a\x1cgoogle/api/annotations.proto\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x17google/rpc/status.proto\"\xa8\x01\n\tOperation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x08metadata\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x0c\n\x04\x64one\x18\x03 \x01(\x08\x12#\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12(\n\x08response\x18\x05 \x01(\x0b\x32\x1 [...]
   ,
   dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_protobuf_dot_any__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,])
@@ -43,42 +43,42 @@ _OPERATION = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='metadata', full_name='google.longrunning.Operation.metadata', index=1,
       number=2, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='done', full_name='google.longrunning.Operation.done', index=2,
       number=3, type=8, cpp_type=7, label=1,
       has_default_value=False, default_value=False,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='error', full_name='google.longrunning.Operation.error', index=3,
       number=4, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='response', full_name='google.longrunning.Operation.response', index=4,
       number=5, type=11, cpp_type=10, label=1,
       has_default_value=False, default_value=None,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -105,14 +105,14 @@ _GETOPERATIONREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -136,35 +136,35 @@ _LISTOPERATIONSREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='filter', full_name='google.longrunning.ListOperationsRequest.filter', index=1,
       number=1, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='page_size', full_name='google.longrunning.ListOperationsRequest.page_size', index=2,
       number=2, type=5, cpp_type=1, label=1,
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='page_token', full_name='google.longrunning.ListOperationsRequest.page_token', index=3,
       number=3, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -188,21 +188,21 @@ _LISTOPERATIONSRESPONSE = _descriptor.Descriptor(
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='next_page_token', full_name='google.longrunning.ListOperationsResponse.next_page_token', index=1,
       number=2, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -226,14 +226,14 @@ _CANCELOPERATIONREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -257,14 +257,14 @@ _DELETEOPERATIONREQUEST = _descriptor.Descriptor(
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -335,15 +335,14 @@ DeleteOperationRequest = _reflection.GeneratedProtocolMessageType('DeleteOperati
 _sym_db.RegisterMessage(DeleteOperationRequest)
 
 
-DESCRIPTOR.has_options = True
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\026com.google.longrunningB\017OperationsProtoP\001Z=google.golang.org/genproto/googleapis/longrunning;longrunning\252\002\022Google.LongRunning\312\002\022Google\\LongRunning'))
+DESCRIPTOR._options = None
 
 _OPERATIONS = _descriptor.ServiceDescriptor(
   name='Operations',
   full_name='google.longrunning.Operations',
   file=DESCRIPTOR,
   index=0,
-  options=None,
+  serialized_options=None,
   serialized_start=655,
   serialized_end=1179,
   methods=[
@@ -354,7 +353,7 @@ _OPERATIONS = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_LISTOPERATIONSREQUEST,
     output_type=_LISTOPERATIONSRESPONSE,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002\027\022\025/v1/{name=operations}')),
+    serialized_options=_b('\202\323\344\223\002\027\022\025/v1/{name=operations}'),
   ),
   _descriptor.MethodDescriptor(
     name='GetOperation',
@@ -363,7 +362,7 @@ _OPERATIONS = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_GETOPERATIONREQUEST,
     output_type=_OPERATION,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002\032\022\030/v1/{name=operations/**}')),
+    serialized_options=_b('\202\323\344\223\002\032\022\030/v1/{name=operations/**}'),
   ),
   _descriptor.MethodDescriptor(
     name='DeleteOperation',
@@ -372,7 +371,7 @@ _OPERATIONS = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_DELETEOPERATIONREQUEST,
     output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002\032*\030/v1/{name=operations/**}')),
+    serialized_options=_b('\202\323\344\223\002\032*\030/v1/{name=operations/**}'),
   ),
   _descriptor.MethodDescriptor(
     name='CancelOperation',
@@ -381,7 +380,7 @@ _OPERATIONS = _descriptor.ServiceDescriptor(
     containing_service=None,
     input_type=_CANCELOPERATIONREQUEST,
     output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
-    options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002$\"\037/v1/{name=operations/**}:cancel:\001*')),
+    serialized_options=_b('\202\323\344\223\002$\"\037/v1/{name=operations/**}:cancel:\001*'),
   ),
 ])
 _sym_db.RegisterServiceDescriptor(_OPERATIONS)
diff --git a/buildstream/_protos/google/longrunning/operations_pb2_grpc.py b/buildstream2/_protos/google/longrunning/operations_pb2_grpc.py
similarity index 98%
rename from buildstream/_protos/google/longrunning/operations_pb2_grpc.py
rename to buildstream2/_protos/google/longrunning/operations_pb2_grpc.py
index 8f89862..00fc11e 100644
--- a/buildstream/_protos/google/longrunning/operations_pb2_grpc.py
+++ b/buildstream2/_protos/google/longrunning/operations_pb2_grpc.py
@@ -1,7 +1,7 @@
 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
 import grpc
 
-from buildstream._protos.google.longrunning import operations_pb2 as google_dot_longrunning_dot_operations__pb2
+from buildstream2._protos.google.longrunning import operations_pb2 as google_dot_longrunning_dot_operations__pb2
 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
 
 
diff --git a/buildstream/_protos/build/bazel/remote/__init__.py b/buildstream2/_protos/google/rpc/__init__.py
similarity index 100%
rename from buildstream/_protos/build/bazel/remote/__init__.py
rename to buildstream2/_protos/google/rpc/__init__.py
diff --git a/buildstream/_protos/google/rpc/code.proto b/buildstream2/_protos/google/rpc/code.proto
similarity index 100%
rename from buildstream/_protos/google/rpc/code.proto
rename to buildstream2/_protos/google/rpc/code.proto
diff --git a/buildstream/_protos/google/rpc/code_pb2.py b/buildstream2/_protos/google/rpc/code_pb2.py
similarity index 100%
rename from buildstream/_protos/google/rpc/code_pb2.py
rename to buildstream2/_protos/google/rpc/code_pb2.py
diff --git a/buildstream/_protos/google/rpc/code_pb2_grpc.py b/buildstream2/_protos/google/rpc/code_pb2_grpc.py
similarity index 100%
rename from buildstream/_protos/google/rpc/code_pb2_grpc.py
rename to buildstream2/_protos/google/rpc/code_pb2_grpc.py
diff --git a/buildstream/_protos/google/rpc/status.proto b/buildstream2/_protos/google/rpc/status.proto
similarity index 100%
rename from buildstream/_protos/google/rpc/status.proto
rename to buildstream2/_protos/google/rpc/status.proto
diff --git a/buildstream/_protos/google/rpc/status_pb2.py b/buildstream2/_protos/google/rpc/status_pb2.py
similarity index 87%
rename from buildstream/_protos/google/rpc/status_pb2.py
rename to buildstream2/_protos/google/rpc/status_pb2.py
index 6c47723..80c572d 100644
--- a/buildstream/_protos/google/rpc/status_pb2.py
+++ b/buildstream2/_protos/google/rpc/status_pb2.py
@@ -7,7 +7,6 @@ from google.protobuf import descriptor as _descriptor
 from google.protobuf import message as _message
 from google.protobuf import reflection as _reflection
 from google.protobuf import symbol_database as _symbol_database
-from google.protobuf import descriptor_pb2
 # @@protoc_insertion_point(imports)
 
 _sym_db = _symbol_database.Default()
@@ -20,6 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
   name='google/rpc/status.proto',
   package='google.rpc',
   syntax='proto3',
+  serialized_options=_b('\n\016com.google.rpcB\013StatusProtoP\001Z7google.golang.org/genproto/googleapis/rpc/status;status\242\002\003RPC'),
   serialized_pb=_b('\n\x17google/rpc/status.proto\x12\ngoogle.rpc\x1a\x19google/protobuf/any.proto\"N\n\x06Status\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\x12%\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyB^\n\x0e\x63om.google.rpcB\x0bStatusProtoP\x01Z7google.golang.org/genproto/googleapis/rpc/status;status\xa2\x02\x03RPCb\x06proto3')
   ,
   dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR,])
@@ -40,28 +40,28 @@ _STATUS = _descriptor.Descriptor(
       has_default_value=False, default_value=0,
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='message', full_name='google.rpc.Status.message', index=1,
       number=2, type=9, cpp_type=9, label=1,
       has_default_value=False, default_value=_b("").decode('utf-8'),
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
     _descriptor.FieldDescriptor(
       name='details', full_name='google.rpc.Status.details', index=2,
       number=3, type=11, cpp_type=10, label=3,
       has_default_value=False, default_value=[],
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
-      options=None, file=DESCRIPTOR),
+      serialized_options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
   nested_types=[],
   enum_types=[
   ],
-  options=None,
+  serialized_options=None,
   is_extendable=False,
   syntax='proto3',
   extension_ranges=[],
@@ -83,6 +83,5 @@ Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,),
 _sym_db.RegisterMessage(Status)
 
 
-DESCRIPTOR.has_options = True
-DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\016com.google.rpcB\013StatusProtoP\001Z7google.golang.org/genproto/googleapis/rpc/status;status\242\002\003RPC'))
+DESCRIPTOR._options = None
 # @@protoc_insertion_point(module_scope)
diff --git a/buildstream/_protos/google/rpc/status_pb2_grpc.py b/buildstream2/_protos/google/rpc/status_pb2_grpc.py
similarity index 100%
rename from buildstream/_protos/google/rpc/status_pb2_grpc.py
rename to buildstream2/_protos/google/rpc/status_pb2_grpc.py
diff --git a/buildstream/_scheduler/__init__.py b/buildstream2/_scheduler/__init__.py
similarity index 100%
rename from buildstream/_scheduler/__init__.py
rename to buildstream2/_scheduler/__init__.py
diff --git a/buildstream/_scheduler/jobs/__init__.py b/buildstream2/_scheduler/jobs/__init__.py
similarity index 100%
rename from buildstream/_scheduler/jobs/__init__.py
rename to buildstream2/_scheduler/jobs/__init__.py
diff --git a/buildstream/_scheduler/jobs/cachesizejob.py b/buildstream2/_scheduler/jobs/cachesizejob.py
similarity index 100%
rename from buildstream/_scheduler/jobs/cachesizejob.py
rename to buildstream2/_scheduler/jobs/cachesizejob.py
diff --git a/buildstream/_scheduler/jobs/cleanupjob.py b/buildstream2/_scheduler/jobs/cleanupjob.py
similarity index 100%
rename from buildstream/_scheduler/jobs/cleanupjob.py
rename to buildstream2/_scheduler/jobs/cleanupjob.py
diff --git a/buildstream/_scheduler/jobs/elementjob.py b/buildstream2/_scheduler/jobs/elementjob.py
similarity index 100%
rename from buildstream/_scheduler/jobs/elementjob.py
rename to buildstream2/_scheduler/jobs/elementjob.py
diff --git a/buildstream/_scheduler/jobs/job.py b/buildstream2/_scheduler/jobs/job.py
similarity index 100%
rename from buildstream/_scheduler/jobs/job.py
rename to buildstream2/_scheduler/jobs/job.py
diff --git a/buildstream/_scheduler/queues/__init__.py b/buildstream2/_scheduler/queues/__init__.py
similarity index 100%
rename from buildstream/_scheduler/queues/__init__.py
rename to buildstream2/_scheduler/queues/__init__.py
diff --git a/buildstream/_scheduler/queues/artifactpushqueue.py b/buildstream2/_scheduler/queues/artifactpushqueue.py
similarity index 100%
rename from buildstream/_scheduler/queues/artifactpushqueue.py
rename to buildstream2/_scheduler/queues/artifactpushqueue.py
diff --git a/buildstream/_scheduler/queues/buildqueue.py b/buildstream2/_scheduler/queues/buildqueue.py
similarity index 100%
rename from buildstream/_scheduler/queues/buildqueue.py
rename to buildstream2/_scheduler/queues/buildqueue.py
diff --git a/buildstream/_scheduler/queues/fetchqueue.py b/buildstream2/_scheduler/queues/fetchqueue.py
similarity index 100%
rename from buildstream/_scheduler/queues/fetchqueue.py
rename to buildstream2/_scheduler/queues/fetchqueue.py
diff --git a/buildstream/_scheduler/queues/pullqueue.py b/buildstream2/_scheduler/queues/pullqueue.py
similarity index 100%
rename from buildstream/_scheduler/queues/pullqueue.py
rename to buildstream2/_scheduler/queues/pullqueue.py
diff --git a/buildstream/_scheduler/queues/queue.py b/buildstream2/_scheduler/queues/queue.py
similarity index 100%
rename from buildstream/_scheduler/queues/queue.py
rename to buildstream2/_scheduler/queues/queue.py
diff --git a/buildstream/_scheduler/queues/sourcepushqueue.py b/buildstream2/_scheduler/queues/sourcepushqueue.py
similarity index 100%
rename from buildstream/_scheduler/queues/sourcepushqueue.py
rename to buildstream2/_scheduler/queues/sourcepushqueue.py
diff --git a/buildstream/_scheduler/queues/trackqueue.py b/buildstream2/_scheduler/queues/trackqueue.py
similarity index 100%
rename from buildstream/_scheduler/queues/trackqueue.py
rename to buildstream2/_scheduler/queues/trackqueue.py
diff --git a/buildstream/_scheduler/resources.py b/buildstream2/_scheduler/resources.py
similarity index 100%
rename from buildstream/_scheduler/resources.py
rename to buildstream2/_scheduler/resources.py
diff --git a/buildstream/_scheduler/scheduler.py b/buildstream2/_scheduler/scheduler.py
similarity index 100%
rename from buildstream/_scheduler/scheduler.py
rename to buildstream2/_scheduler/scheduler.py
diff --git a/buildstream/_signals.py b/buildstream2/_signals.py
similarity index 100%
rename from buildstream/_signals.py
rename to buildstream2/_signals.py
diff --git a/buildstream/_site.py b/buildstream2/_site.py
similarity index 100%
rename from buildstream/_site.py
rename to buildstream2/_site.py
diff --git a/buildstream/_sourcecache.py b/buildstream2/_sourcecache.py
similarity index 100%
rename from buildstream/_sourcecache.py
rename to buildstream2/_sourcecache.py
diff --git a/buildstream/_sourcefactory.py b/buildstream2/_sourcefactory.py
similarity index 100%
rename from buildstream/_sourcefactory.py
rename to buildstream2/_sourcefactory.py
diff --git a/buildstream/_stream.py b/buildstream2/_stream.py
similarity index 100%
rename from buildstream/_stream.py
rename to buildstream2/_stream.py
diff --git a/buildstream/_variables.py b/buildstream2/_variables.py
similarity index 100%
rename from buildstream/_variables.py
rename to buildstream2/_variables.py
diff --git a/buildstream/_version.py b/buildstream2/_version.py
similarity index 100%
rename from buildstream/_version.py
rename to buildstream2/_version.py
diff --git a/buildstream/_versions.py b/buildstream2/_versions.py
similarity index 100%
rename from buildstream/_versions.py
rename to buildstream2/_versions.py
diff --git a/buildstream/_workspaces.py b/buildstream2/_workspaces.py
similarity index 100%
rename from buildstream/_workspaces.py
rename to buildstream2/_workspaces.py
diff --git a/buildstream/_yaml.py b/buildstream2/_yaml.py
similarity index 100%
rename from buildstream/_yaml.py
rename to buildstream2/_yaml.py
diff --git a/buildstream/buildelement.py b/buildstream2/buildelement.py
similarity index 100%
rename from buildstream/buildelement.py
rename to buildstream2/buildelement.py
diff --git a/buildstream/data/bst b/buildstream2/data/bst
similarity index 100%
rename from buildstream/data/bst
rename to buildstream2/data/bst
diff --git a/buildstream/data/build-all.sh.in b/buildstream2/data/build-all.sh.in
similarity index 100%
rename from buildstream/data/build-all.sh.in
rename to buildstream2/data/build-all.sh.in
diff --git a/buildstream/data/build-module.sh.in b/buildstream2/data/build-module.sh.in
similarity index 100%
rename from buildstream/data/build-module.sh.in
rename to buildstream2/data/build-module.sh.in
diff --git a/buildstream/data/projectconfig.yaml b/buildstream2/data/projectconfig.yaml
similarity index 100%
rename from buildstream/data/projectconfig.yaml
rename to buildstream2/data/projectconfig.yaml
diff --git a/buildstream/data/userconfig.yaml b/buildstream2/data/userconfig.yaml
similarity index 100%
rename from buildstream/data/userconfig.yaml
rename to buildstream2/data/userconfig.yaml
diff --git a/buildstream/element.py b/buildstream2/element.py
similarity index 99%
rename from buildstream/element.py
rename to buildstream2/element.py
index bc8f25c..2e9dc68 100644
--- a/buildstream/element.py
+++ b/buildstream2/element.py
@@ -38,23 +38,23 @@ The following methods are the foundation of the element's *build
 phase*, they must be implemented by all Element classes, unless
 explicitly stated otherwise.
 
-* :func:`Element.configure_sandbox() <buildstream.element.Element.configure_sandbox>`
+* :func:`Element.configure_sandbox() <buildstream2.element.Element.configure_sandbox>`
 
   Configures the :class:`.Sandbox`. This is called before anything else
 
-* :func:`Element.stage() <buildstream.element.Element.stage>`
+* :func:`Element.stage() <buildstream2.element.Element.stage>`
 
-  Stage dependencies and :class:`Sources <buildstream.source.Source>` into
+  Stage dependencies and :class:`Sources <buildstream2.source.Source>` into
   the sandbox.
 
-* :func:`Element.prepare() <buildstream.element.Element.prepare>`
+* :func:`Element.prepare() <buildstream2.element.Element.prepare>`
 
   Call preparation methods that should only be performed once in the
   lifetime of a build directory (e.g. autotools' ./configure).
 
   **Optional**: If left unimplemented, this step will be skipped.
 
-* :func:`Element.assemble() <buildstream.element.Element.assemble>`
+* :func:`Element.assemble() <buildstream2.element.Element.assemble>`
 
   Perform the actual assembly of the element
 
@@ -63,7 +63,7 @@ Miscellaneous
 ~~~~~~~~~~~~~
 Miscellaneous abstract methods also exist:
 
-* :func:`Element.generate_script() <buildstream.element.Element.generate_script>`
+* :func:`Element.generate_script() <buildstream2.element.Element.generate_script>`
 
   For the purpose of ``bst source checkout --include-build-scripts``, an Element may optionally implement this.
 
@@ -491,7 +491,7 @@ class Element(Plugin):
         Raises:
            :class:`.LoadError`: When *member_name* is not found and no *default* was provided
 
-        This is essentially the same as :func:`~buildstream.plugin.Plugin.node_get_member`
+        This is essentially the same as :func:`~buildstream2.plugin.Plugin.node_get_member`
         except that it assumes the expected type is a string and will also perform variable
         substitutions.
 
@@ -523,7 +523,7 @@ class Element(Plugin):
         Raises:
           :class:`.LoadError`
 
-        This is essentially the same as :func:`~buildstream.plugin.Plugin.node_get_member`
+        This is essentially the same as :func:`~buildstream2.plugin.Plugin.node_get_member`
         except that it assumes the expected type is a list of strings and will also
         perform variable substitutions.
         """
@@ -552,7 +552,7 @@ class Element(Plugin):
         Raises:
            :class:`.LoadError`
 
-        This is essentially the same as :func:`~buildstream.plugin.Plugin.node_get_list_element`
+        This is essentially the same as :func:`~buildstream2.plugin.Plugin.node_get_list_element`
         except that it assumes the expected type is a string and will also perform variable
         substitutions.
 
@@ -718,7 +718,7 @@ class Element(Plugin):
         """Stage element dependencies in scope
 
         This is primarily a convenience wrapper around
-        :func:`Element.stage_artifact() <buildstream.element.Element.stage_artifact>`
+        :func:`Element.stage_artifact() <buildstream2.element.Element.stage_artifact>`
         which takes care of staging all the dependencies in `scope` and issueing the
         appropriate warnings.
 
@@ -892,7 +892,7 @@ class Element(Plugin):
 
         This allows an element to dynamically mutate public data of
         elements or add new domains as the result of success completion
-        of the :func:`Element.assemble() <buildstream.element.Element.assemble>`
+        of the :func:`Element.assemble() <buildstream2.element.Element.assemble>`
         method.
         """
         if self.__dynamic_public is None:
@@ -908,7 +908,7 @@ class Element(Plugin):
 
         Returns:
            (dict): A dictionary of string key/values suitable for passing
-           to :func:`Sandbox.run() <buildstream.sandbox.Sandbox.run>`
+           to :func:`Sandbox.run() <buildstream2.sandbox.Sandbox.run>`
         """
         return _yaml.node_sanitize(self.__environment)
 
@@ -932,7 +932,7 @@ class Element(Plugin):
            collect (str): An optional directory containing partial install contents
                           on command failure.
 
-        This may be called in :func:`Element.configure_sandbox() <buildstream.element.Element.configure_sandbox>`
+        This may be called in :func:`Element.configure_sandbox() <buildstream2.element.Element.configure_sandbox>`
         to enable batching of all sandbox commands issued in prepare() and assemble().
         """
         if self.__batch_prepare_assemble:
diff --git a/buildstream/plugin.py b/buildstream2/plugin.py
similarity index 95%
rename from buildstream/plugin.py
rename to buildstream2/plugin.py
index 5fdcdae..8dc4619 100644
--- a/buildstream/plugin.py
+++ b/buildstream2/plugin.py
@@ -20,7 +20,7 @@
 Plugin - Base plugin class
 ==========================
 BuildStream supports third party plugins to define additional kinds of
-:mod:`Elements <buildstream.element>` and :mod:`Sources <buildstream.source>`.
+:mod:`Elements <buildstream2.element>` and :mod:`Sources <buildstream2.source>`.
 
 The common API is documented here, along with some information on how
 external plugin packages are structured.
@@ -30,30 +30,30 @@ external plugin packages are structured.
 
 Abstract Methods
 ----------------
-For both :mod:`Elements <buildstream.element>` and :mod:`Sources <buildstream.source>`,
+For both :mod:`Elements <buildstream2.element>` and :mod:`Sources <buildstream2.source>`,
 it is mandatory to implement the following abstract methods:
 
-* :func:`Plugin.configure() <buildstream.plugin.Plugin.configure>`
+* :func:`Plugin.configure() <buildstream2.plugin.Plugin.configure>`
 
   Loads the user provided configuration YAML for the given source or element
 
-* :func:`Plugin.preflight() <buildstream.plugin.Plugin.preflight>`
+* :func:`Plugin.preflight() <buildstream2.plugin.Plugin.preflight>`
 
   Early preflight checks allow plugins to bail out early with an error
   in the case that it can predict that failure is inevitable.
 
-* :func:`Plugin.get_unique_key() <buildstream.plugin.Plugin.get_unique_key>`
+* :func:`Plugin.get_unique_key() <buildstream2.plugin.Plugin.get_unique_key>`
 
   Once all configuration has been loaded and preflight checks have passed,
   this method is used to inform the core of a plugin's unique configuration.
 
 Configurable Warnings
 ---------------------
-Warnings raised through calling :func:`Plugin.warn() <buildstream.plugin.Plugin.warn>` can provide an optional
+Warnings raised through calling :func:`Plugin.warn() <buildstream2.plugin.Plugin.warn>` can provide an optional
 parameter ``warning_token``, this will raise a :class:`PluginError` if the warning is configured as fatal within
 the project configuration.
 
-Configurable warnings will be prefixed with :func:`Plugin.get_kind() <buildstream.plugin.Plugin.get_kind>`
+Configurable warnings will be prefixed with :func:`Plugin.get_kind() <buildstream2.plugin.Plugin.get_kind>`
 within buildstream and must be prefixed as such in project configurations. For more detail on project configuration
 see :ref:`Configurable Warnings <configurable_warnings>`.
 
@@ -62,7 +62,7 @@ while configuring their projects.
 
 Example
 ~~~~~~~
-If the :class:`git <buildstream.plugins.sources.git.GitSource>` plugin uses the warning ``"inconsistent-submodule"``
+If the :class:`git <buildstream2.plugins.sources.git.GitSource>` plugin uses the warning ``"inconsistent-submodule"``
 then it could be referenced in project configuration as ``"git:inconsistent-submodule"``.
 
 Plugin Structure
@@ -134,9 +134,9 @@ class Plugin():
     .. note::
 
         Derivation of plugins is not supported. Plugins may only
-        derive from the base :mod:`Source <buildstream.source>` and
-        :mod:`Element <buildstream.element>` types, and any convenience
-        subclasses (like :mod:`BuildElement <buildstream.buildelement>`)
+        derive from the base :mod:`Source <buildstream2.source>` and
+        :mod:`Element <buildstream2.element>` types, and any convenience
+        subclasses (like :mod:`BuildElement <buildstream2.buildelement>`)
         which are included in the buildstream namespace.
     """
 
@@ -150,7 +150,7 @@ class Plugin():
     """The plugin's YAML format version
 
     This should be set to ``1`` the first time any new configuration
-    is understood by your :func:`Plugin.configure() <buildstream.plugin.Plugin.configure>`
+    is understood by your :func:`Plugin.configure() <buildstream2.plugin.Plugin.configure>`
     implementation and subsequently bumped every time your
     configuration is enhanced.
 
@@ -218,7 +218,7 @@ class Plugin():
         # This id allows to uniquely identify a plugin.
         #
         # /!\ the unique id must be an increasing value /!\
-        # This is because we are depending on it in buildstream.element.Element
+        # This is because we are depending on it in buildstream2.element.Element
         # to give us a topological sort over all elements.
         # Modifying how we handle ids here will modify the behavior of the
         # Element's state handling.
@@ -272,21 +272,21 @@ class Plugin():
         Plugin implementors should implement this method to read configuration
         data and store it.
 
-        Plugins should use the :func:`Plugin.node_get_member() <buildstream.plugin.Plugin.node_get_member>`
-        and :func:`Plugin.node_get_list_element() <buildstream.plugin.Plugin.node_get_list_element>`
+        Plugins should use the :func:`Plugin.node_get_member() <buildstream2.plugin.Plugin.node_get_member>`
+        and :func:`Plugin.node_get_list_element() <buildstream2.plugin.Plugin.node_get_list_element>`
         methods to fetch values from the passed `node`. This will ensure that a nice human readable error
         message will be raised if the expected configuration is not found, indicating the filename,
         line and column numbers.
 
-        Further the :func:`Plugin.node_validate() <buildstream.plugin.Plugin.node_validate>` method
+        Further the :func:`Plugin.node_validate() <buildstream2.plugin.Plugin.node_validate>` method
         should be used to ensure that the user has not specified keys in `node` which are unsupported
         by the plugin.
 
         .. note::
 
            For Elements, when variable substitution is desirable, the
-           :func:`Element.node_subst_member() <buildstream.element.Element.node_subst_member>`
-           and :func:`Element.node_subst_list_element() <buildstream.element.Element.node_subst_list_element>`
+           :func:`Element.node_subst_member() <buildstream2.element.Element.node_subst_member>`
+           and :func:`Element.node_subst_list_element() <buildstream2.element.Element.node_subst_list_element>`
            methods can be used.
         """
         raise ImplError("{tag} plugin '{kind}' does not implement configure()".format(
@@ -299,7 +299,7 @@ class Plugin():
            :class:`.SourceError`: If it's a :class:`.Source` implementation
            :class:`.ElementError`: If it's an :class:`.Element` implementation
 
-        This method is run after :func:`Plugin.configure() <buildstream.plugin.Plugin.configure>`
+        This method is run after :func:`Plugin.configure() <buildstream2.plugin.Plugin.configure>`
         and after the pipeline is fully constructed.
 
         Implementors should simply raise :class:`.SourceError` or :class:`.ElementError`
@@ -307,7 +307,7 @@ class Plugin():
         unsuitable for operation.
 
         Plugins which require host tools (only sources usually) should obtain
-        them with :func:`utils.get_host_tool() <buildstream.utils.get_host_tool>` which
+        them with :func:`utils.get_host_tool() <buildstream2.utils.get_host_tool>` which
         will raise an error automatically informing the user that a host tool is needed.
         """
         raise ImplError("{tag} plugin '{kind}' does not implement preflight()".format(
@@ -327,8 +327,8 @@ class Plugin():
         which could possibly affect the output and return a dictionary of these settings.
 
         For Sources, this is guaranteed to only be called if
-        :func:`Source.get_consistency() <buildstream.source.Source.get_consistency>`
-        has not returned :func:`Consistency.INCONSISTENT <buildstream.source.Consistency.INCONSISTENT>`
+        :func:`Source.get_consistency() <buildstream2.source.Source.get_consistency>`
+        has not returned :func:`Consistency.INCONSISTENT <buildstream2.source.Consistency.INCONSISTENT>`
         which is to say that the Source is expected to have an exact *ref* indicating
         exactly what source is going to be staged.
         """
@@ -498,7 +498,7 @@ class Plugin():
                                                  check_is_dir=check_is_dir)
 
     def node_validate(self, node, valid_keys):
-        """This should be used in :func:`~buildstream.plugin.Plugin.configure`
+        """This should be used in :func:`~buildstream2.plugin.Plugin.configure`
         implementations to assert that users have only entered
         valid configuration keys.
 
diff --git a/buildstream/_protos/build/bazel/__init__.py b/buildstream2/plugins/elements/__init__.py
similarity index 100%
rename from buildstream/_protos/build/bazel/__init__.py
rename to buildstream2/plugins/elements/__init__.py
diff --git a/buildstream/plugins/elements/autotools.py b/buildstream2/plugins/elements/autotools.py
similarity index 94%
rename from buildstream/plugins/elements/autotools.py
rename to buildstream2/plugins/elements/autotools.py
index 2243a73..3ee7250 100644
--- a/buildstream/plugins/elements/autotools.py
+++ b/buildstream2/plugins/elements/autotools.py
@@ -48,14 +48,14 @@ an example of that:
 
 Here is the default configuration for the ``autotools`` element in full:
 
-  .. literalinclude:: ../../../buildstream/plugins/elements/autotools.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/autotools.yaml
      :language: yaml
 
 See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
 details on common configuration options for build elements.
 """
 
-from buildstream import BuildElement, SandboxFlags
+from buildstream2 import BuildElement, SandboxFlags
 
 
 # Element implementation for the 'autotools' kind.
diff --git a/buildstream/plugins/elements/autotools.yaml b/buildstream2/plugins/elements/autotools.yaml
similarity index 100%
rename from buildstream/plugins/elements/autotools.yaml
rename to buildstream2/plugins/elements/autotools.yaml
diff --git a/buildstream/plugins/elements/cmake.py b/buildstream2/plugins/elements/cmake.py
similarity index 94%
rename from buildstream/plugins/elements/cmake.py
rename to buildstream2/plugins/elements/cmake.py
index a1bea0c..0b9794e 100644
--- a/buildstream/plugins/elements/cmake.py
+++ b/buildstream2/plugins/elements/cmake.py
@@ -47,14 +47,14 @@ an example of that:
 
 Here is the default configuration for the ``cmake`` element in full:
 
-  .. literalinclude:: ../../../buildstream/plugins/elements/cmake.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/cmake.yaml
      :language: yaml
 
 See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
 details on common configuration options for build elements.
 """
 
-from buildstream import BuildElement, SandboxFlags
+from buildstream2 import BuildElement, SandboxFlags
 
 
 # Element implementation for the 'cmake' kind.
diff --git a/buildstream/plugins/elements/cmake.yaml b/buildstream2/plugins/elements/cmake.yaml
similarity index 100%
rename from buildstream/plugins/elements/cmake.yaml
rename to buildstream2/plugins/elements/cmake.yaml
diff --git a/buildstream/plugins/elements/compose.py b/buildstream2/plugins/elements/compose.py
similarity index 98%
rename from buildstream/plugins/elements/compose.py
rename to buildstream2/plugins/elements/compose.py
index f45ffd7..8111ed9 100644
--- a/buildstream/plugins/elements/compose.py
+++ b/buildstream2/plugins/elements/compose.py
@@ -29,12 +29,12 @@ Since this element's output includes its dependencies, it may only
 depend on elements as `build` type dependencies.
 
 The default configuration and possible options are as such:
-  .. literalinclude:: ../../../buildstream/plugins/elements/compose.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/compose.yaml
      :language: yaml
 """
 
 import os
-from buildstream import Element, Scope
+from buildstream2 import Element, Scope
 
 
 # Element implementation for the 'compose' kind.
diff --git a/buildstream/plugins/elements/compose.yaml b/buildstream2/plugins/elements/compose.yaml
similarity index 100%
rename from buildstream/plugins/elements/compose.yaml
rename to buildstream2/plugins/elements/compose.yaml
diff --git a/buildstream/plugins/elements/distutils.py b/buildstream2/plugins/elements/distutils.py
similarity index 93%
rename from buildstream/plugins/elements/distutils.py
rename to buildstream2/plugins/elements/distutils.py
index 94d7a97..29eab19 100644
--- a/buildstream/plugins/elements/distutils.py
+++ b/buildstream2/plugins/elements/distutils.py
@@ -24,14 +24,14 @@ A :mod:`BuildElement <buildstream.buildelement>` implementation for using
 python distutils
 
 The distutils default configuration:
-  .. literalinclude:: ../../../buildstream/plugins/elements/distutils.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/distutils.yaml
      :language: yaml
 
 See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
 details on common configuration options for build elements.
 """
 
-from buildstream import BuildElement, SandboxFlags
+from buildstream2 import BuildElement, SandboxFlags
 
 
 # Element implementation for the python 'distutils' kind.
diff --git a/buildstream/plugins/elements/distutils.yaml b/buildstream2/plugins/elements/distutils.yaml
similarity index 100%
rename from buildstream/plugins/elements/distutils.yaml
rename to buildstream2/plugins/elements/distutils.yaml
diff --git a/buildstream/plugins/elements/filter.py b/buildstream2/plugins/elements/filter.py
similarity index 98%
rename from buildstream/plugins/elements/filter.py
rename to buildstream2/plugins/elements/filter.py
index 940e820..2e6aad8 100644
--- a/buildstream/plugins/elements/filter.py
+++ b/buildstream2/plugins/elements/filter.py
@@ -139,11 +139,11 @@ The artifact of ``filter-misc.bst`` will only contain the file 'baz'.
 Below is more information regarding the the default configurations and possible options
 of the filter element:
 
-.. literalinclude:: ../../../buildstream/plugins/elements/filter.yaml
+.. literalinclude:: ../../../buildstream2/plugins/elements/filter.yaml
    :language: yaml
 """
 
-from buildstream import Element, ElementError, Scope
+from buildstream2 import Element, ElementError, Scope
 
 
 class FilterElement(Element):
diff --git a/buildstream/plugins/elements/filter.yaml b/buildstream2/plugins/elements/filter.yaml
similarity index 100%
rename from buildstream/plugins/elements/filter.yaml
rename to buildstream2/plugins/elements/filter.yaml
diff --git a/buildstream/plugins/elements/import.py b/buildstream2/plugins/elements/import.py
similarity index 97%
rename from buildstream/plugins/elements/import.py
rename to buildstream2/plugins/elements/import.py
index 7388421..3d48cd8 100644
--- a/buildstream/plugins/elements/import.py
+++ b/buildstream2/plugins/elements/import.py
@@ -26,12 +26,12 @@ import an SDK to build on top of or to overlay your build with
 some configuration data.
 
 The empty configuration is as such:
-  .. literalinclude:: ../../../buildstream/plugins/elements/import.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/import.yaml
      :language: yaml
 """
 
 import os
-from buildstream import Element, ElementError
+from buildstream2 import Element, ElementError
 
 
 # Element implementation for the 'import' kind.
diff --git a/buildstream/plugins/elements/import.yaml b/buildstream2/plugins/elements/import.yaml
similarity index 100%
rename from buildstream/plugins/elements/import.yaml
rename to buildstream2/plugins/elements/import.yaml
diff --git a/buildstream/plugins/elements/junction.py b/buildstream2/plugins/elements/junction.py
similarity index 98%
rename from buildstream/plugins/elements/junction.py
rename to buildstream2/plugins/elements/junction.py
index ec7832b..1d484ff 100644
--- a/buildstream/plugins/elements/junction.py
+++ b/buildstream2/plugins/elements/junction.py
@@ -127,8 +127,8 @@ with the same name in the top-level project, which then takes precedence.
 """
 
 from collections.abc import Mapping
-from buildstream import Element
-from buildstream._pipeline import PipelineError
+from buildstream2 import Element
+from buildstream2._pipeline import PipelineError
 
 
 # Element implementation for the 'junction' kind.
diff --git a/buildstream/plugins/elements/make.py b/buildstream2/plugins/elements/make.py
similarity index 93%
rename from buildstream/plugins/elements/make.py
rename to buildstream2/plugins/elements/make.py
index 262dc2b..609a90e 100644
--- a/buildstream/plugins/elements/make.py
+++ b/buildstream2/plugins/elements/make.py
@@ -29,14 +29,14 @@ using GNU make based build.
 
 Here is the default configuration for the ``make`` element in full:
 
-  .. literalinclude:: ../../../buildstream/plugins/elements/make.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/make.yaml
      :language: yaml
 
 See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
 details on common configuration options for build elements.
 """
 
-from buildstream import BuildElement, SandboxFlags
+from buildstream2 import BuildElement, SandboxFlags
 
 
 # Element implementation for the 'make' kind.
diff --git a/buildstream/plugins/elements/make.yaml b/buildstream2/plugins/elements/make.yaml
similarity index 100%
rename from buildstream/plugins/elements/make.yaml
rename to buildstream2/plugins/elements/make.yaml
diff --git a/buildstream/plugins/elements/makemaker.py b/buildstream2/plugins/elements/makemaker.py
similarity index 93%
rename from buildstream/plugins/elements/makemaker.py
rename to buildstream2/plugins/elements/makemaker.py
index c316158..2125f53 100644
--- a/buildstream/plugins/elements/makemaker.py
+++ b/buildstream2/plugins/elements/makemaker.py
@@ -24,14 +24,14 @@ A :mod:`BuildElement <buildstream.buildelement>` implementation for using
 the Perl ExtUtil::MakeMaker build system
 
 The MakeMaker default configuration:
-  .. literalinclude:: ../../../buildstream/plugins/elements/makemaker.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/makemaker.yaml
      :language: yaml
 
 See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
 details on common configuration options for build elements.
 """
 
-from buildstream import BuildElement, SandboxFlags
+from buildstream2 import BuildElement, SandboxFlags
 
 
 # Element implementation for the 'makemaker' kind.
diff --git a/buildstream/plugins/elements/makemaker.yaml b/buildstream2/plugins/elements/makemaker.yaml
similarity index 100%
rename from buildstream/plugins/elements/makemaker.yaml
rename to buildstream2/plugins/elements/makemaker.yaml
diff --git a/buildstream/plugins/elements/manual.py b/buildstream2/plugins/elements/manual.py
similarity index 93%
rename from buildstream/plugins/elements/manual.py
rename to buildstream2/plugins/elements/manual.py
index 7ca7614..6df933a 100644
--- a/buildstream/plugins/elements/manual.py
+++ b/buildstream2/plugins/elements/manual.py
@@ -24,14 +24,14 @@ The most basic build element does nothing but allows users to
 add custom build commands to the array understood by the :mod:`BuildElement <buildstream.buildelement>`
 
 The empty configuration is as such:
-  .. literalinclude:: ../../../buildstream/plugins/elements/manual.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/manual.yaml
      :language: yaml
 
 See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
 details on common configuration options for build elements.
 """
 
-from buildstream import BuildElement, SandboxFlags
+from buildstream2 import BuildElement, SandboxFlags
 
 
 # Element implementation for the 'manual' kind.
diff --git a/buildstream/plugins/elements/manual.yaml b/buildstream2/plugins/elements/manual.yaml
similarity index 100%
rename from buildstream/plugins/elements/manual.yaml
rename to buildstream2/plugins/elements/manual.yaml
diff --git a/buildstream/plugins/elements/meson.py b/buildstream2/plugins/elements/meson.py
similarity index 94%
rename from buildstream/plugins/elements/meson.py
rename to buildstream2/plugins/elements/meson.py
index b16f025..ef7c627 100644
--- a/buildstream/plugins/elements/meson.py
+++ b/buildstream2/plugins/elements/meson.py
@@ -44,14 +44,14 @@ an example of that:
 
 Here is the default configuration for the ``meson`` element in full:
 
-  .. literalinclude:: ../../../buildstream/plugins/elements/meson.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/meson.yaml
      :language: yaml
 
 See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
 details on common configuration options for build elements.
 """
 
-from buildstream import BuildElement, SandboxFlags
+from buildstream2 import BuildElement, SandboxFlags
 
 
 # Element implementation for the 'meson' kind.
diff --git a/buildstream/plugins/elements/meson.yaml b/buildstream2/plugins/elements/meson.yaml
similarity index 100%
rename from buildstream/plugins/elements/meson.yaml
rename to buildstream2/plugins/elements/meson.yaml
diff --git a/buildstream/plugins/elements/modulebuild.py b/buildstream2/plugins/elements/modulebuild.py
similarity index 93%
rename from buildstream/plugins/elements/modulebuild.py
rename to buildstream2/plugins/elements/modulebuild.py
index a83d270..a01f1d8 100644
--- a/buildstream/plugins/elements/modulebuild.py
+++ b/buildstream2/plugins/elements/modulebuild.py
@@ -24,14 +24,14 @@ A :mod:`BuildElement <buildstream.buildelement>` implementation for using
 the Perl Module::Build build system
 
 The modulebuild default configuration:
-  .. literalinclude:: ../../../buildstream/plugins/elements/modulebuild.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/modulebuild.yaml
      :language: yaml
 
 See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
 details on common configuration options for build elements.
 """
 
-from buildstream import BuildElement, SandboxFlags
+from buildstream2 import BuildElement, SandboxFlags
 
 
 # Element implementation for the 'modulebuild' kind.
diff --git a/buildstream/plugins/elements/modulebuild.yaml b/buildstream2/plugins/elements/modulebuild.yaml
similarity index 100%
rename from buildstream/plugins/elements/modulebuild.yaml
rename to buildstream2/plugins/elements/modulebuild.yaml
diff --git a/buildstream/plugins/elements/pip.py b/buildstream2/plugins/elements/pip.py
similarity index 93%
rename from buildstream/plugins/elements/pip.py
rename to buildstream2/plugins/elements/pip.py
index 31e1071..671035d 100644
--- a/buildstream/plugins/elements/pip.py
+++ b/buildstream2/plugins/elements/pip.py
@@ -24,14 +24,14 @@ A :mod:`BuildElement <buildstream.buildelement>` implementation for installing
 Python modules with pip
 
 The pip default configuration:
-  .. literalinclude:: ../../../buildstream/plugins/elements/pip.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/pip.yaml
      :language: yaml
 
 See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
 details on common configuration options for build elements.
 """
 
-from buildstream import BuildElement, SandboxFlags
+from buildstream2 import BuildElement, SandboxFlags
 
 
 # Element implementation for the 'pip' kind.
diff --git a/buildstream/plugins/elements/pip.yaml b/buildstream2/plugins/elements/pip.yaml
similarity index 100%
rename from buildstream/plugins/elements/pip.yaml
rename to buildstream2/plugins/elements/pip.yaml
diff --git a/buildstream/plugins/elements/qmake.py b/buildstream2/plugins/elements/qmake.py
similarity index 93%
rename from buildstream/plugins/elements/qmake.py
rename to buildstream2/plugins/elements/qmake.py
index 1bb5fd7..dec18fc 100644
--- a/buildstream/plugins/elements/qmake.py
+++ b/buildstream2/plugins/elements/qmake.py
@@ -24,14 +24,14 @@ A :mod:`BuildElement <buildstream.buildelement>` implementation for using
 the qmake build system
 
 The qmake default configuration:
-  .. literalinclude:: ../../../buildstream/plugins/elements/qmake.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/qmake.yaml
      :language: yaml
 
 See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
 details on common configuration options for build elements.
 """
 
-from buildstream import BuildElement, SandboxFlags
+from buildstream2 import BuildElement, SandboxFlags
 
 
 # Element implementation for the 'qmake' kind.
diff --git a/buildstream/plugins/elements/qmake.yaml b/buildstream2/plugins/elements/qmake.yaml
similarity index 100%
rename from buildstream/plugins/elements/qmake.yaml
rename to buildstream2/plugins/elements/qmake.yaml
diff --git a/buildstream/plugins/elements/script.py b/buildstream2/plugins/elements/script.py
similarity index 93%
rename from buildstream/plugins/elements/script.py
rename to buildstream2/plugins/elements/script.py
index 6c33ecf..5caa10f 100644
--- a/buildstream/plugins/elements/script.py
+++ b/buildstream2/plugins/elements/script.py
@@ -31,15 +31,15 @@ input and create some output.
    detail on specifying dependencies.
 
 The default configuration and possible options are as such:
-  .. literalinclude:: ../../../buildstream/plugins/elements/script.yaml
+  .. literalinclude:: ../../../buildstream2/plugins/elements/script.yaml
      :language: yaml
 """
 
-import buildstream
+import buildstream2
 
 
 # Element implementation for the 'script' kind.
-class ScriptElement(buildstream.ScriptElement):
+class ScriptElement(buildstream2.ScriptElement):
     # pylint: disable=attribute-defined-outside-init
 
     # This plugin has been modified to avoid the use of Sandbox.get_directory
diff --git a/buildstream/plugins/elements/script.yaml b/buildstream2/plugins/elements/script.yaml
similarity index 100%
rename from buildstream/plugins/elements/script.yaml
rename to buildstream2/plugins/elements/script.yaml
diff --git a/buildstream/plugins/elements/stack.py b/buildstream2/plugins/elements/stack.py
similarity index 98%
rename from buildstream/plugins/elements/stack.py
rename to buildstream2/plugins/elements/stack.py
index b26281f..842962f 100644
--- a/buildstream/plugins/elements/stack.py
+++ b/buildstream2/plugins/elements/stack.py
@@ -24,7 +24,7 @@ Stack elements are simply a symbolic element used for representing
 a logical group of elements.
 """
 
-from buildstream import Element
+from buildstream2 import Element
 
 
 # Element implementation for the 'stack' kind.
diff --git a/buildstream/_protos/build/__init__.py b/buildstream2/plugins/sources/__init__.py
similarity index 100%
rename from buildstream/_protos/build/__init__.py
rename to buildstream2/plugins/sources/__init__.py
diff --git a/buildstream/plugins/sources/_downloadablefilesource.py b/buildstream2/plugins/sources/_downloadablefilesource.py
similarity index 99%
rename from buildstream/plugins/sources/_downloadablefilesource.py
rename to buildstream2/plugins/sources/_downloadablefilesource.py
index b9b15e2..18980bc 100644
--- a/buildstream/plugins/sources/_downloadablefilesource.py
+++ b/buildstream2/plugins/sources/_downloadablefilesource.py
@@ -7,8 +7,8 @@ import contextlib
 import shutil
 import netrc
 
-from buildstream import Source, SourceError, Consistency
-from buildstream import utils
+from buildstream2 import Source, SourceError, Consistency
+from buildstream2 import utils
 
 
 class _NetrcFTPOpener(urllib.request.FTPHandler):
diff --git a/buildstream/plugins/sources/bzr.py b/buildstream2/plugins/sources/bzr.py
similarity index 98%
rename from buildstream/plugins/sources/bzr.py
rename to buildstream2/plugins/sources/bzr.py
index e59986d..e1cd691 100644
--- a/buildstream/plugins/sources/bzr.py
+++ b/buildstream2/plugins/sources/bzr.py
@@ -59,8 +59,8 @@ import shutil
 import fcntl
 from contextlib import contextmanager
 
-from buildstream import Source, SourceError, Consistency
-from buildstream import utils
+from buildstream2 import Source, SourceError, Consistency
+from buildstream2 import utils
 
 
 class BzrSource(Source):
diff --git a/buildstream/plugins/sources/deb.py b/buildstream2/plugins/sources/deb.py
similarity index 100%
rename from buildstream/plugins/sources/deb.py
rename to buildstream2/plugins/sources/deb.py
diff --git a/buildstream/plugins/sources/git.py b/buildstream2/plugins/sources/git.py
similarity index 99%
rename from buildstream/plugins/sources/git.py
rename to buildstream2/plugins/sources/git.py
index 5e68349..e808509 100644
--- a/buildstream/plugins/sources/git.py
+++ b/buildstream2/plugins/sources/git.py
@@ -156,7 +156,7 @@ This plugin also utilises the following configurable :class:`core warnings <buil
   found in the provided track in the element's git repository.
 """
 
-from buildstream import _GitSourceBase
+from buildstream2 import _GitSourceBase
 
 
 class GitSource(_GitSourceBase):
diff --git a/buildstream/plugins/sources/local.py b/buildstream2/plugins/sources/local.py
similarity index 98%
rename from buildstream/plugins/sources/local.py
rename to buildstream2/plugins/sources/local.py
index 50df854..427010c 100644
--- a/buildstream/plugins/sources/local.py
+++ b/buildstream2/plugins/sources/local.py
@@ -38,8 +38,8 @@ details on common configuration options for sources.
 
 import os
 import stat
-from buildstream import Source, Consistency
-from buildstream import utils
+from buildstream2 import Source, Consistency
+from buildstream2 import utils
 
 
 class LocalSource(Source):
diff --git a/buildstream/plugins/sources/ostree.py b/buildstream2/plugins/sources/ostree.py
similarity index 97%
rename from buildstream/plugins/sources/ostree.py
rename to buildstream2/plugins/sources/ostree.py
index 2311509..4c2391f 100644
--- a/buildstream/plugins/sources/ostree.py
+++ b/buildstream2/plugins/sources/ostree.py
@@ -53,10 +53,10 @@ details on common configuration options for sources.
 import os
 import shutil
 
-from buildstream import Source, SourceError, Consistency
-from buildstream import _ostree
-from buildstream import utils
-from buildstream._ostree import OSTreeError
+from buildstream2 import Source, SourceError, Consistency
+from buildstream2 import _ostree
+from buildstream2 import utils
+from buildstream2._ostree import OSTreeError
 
 
 class OSTreeSource(Source):
diff --git a/buildstream/plugins/sources/patch.py b/buildstream2/plugins/sources/patch.py
similarity index 97%
rename from buildstream/plugins/sources/patch.py
rename to buildstream2/plugins/sources/patch.py
index 8e833b4..66f5bf2 100644
--- a/buildstream/plugins/sources/patch.py
+++ b/buildstream2/plugins/sources/patch.py
@@ -45,8 +45,8 @@ details on common configuration options for sources.
 """
 
 import os
-from buildstream import Source, SourceError, Consistency
-from buildstream import utils
+from buildstream2 import Source, SourceError, Consistency
+from buildstream2 import utils
 
 
 class PatchSource(Source):
diff --git a/buildstream/plugins/sources/pip.py b/buildstream2/plugins/sources/pip.py
similarity index 99%
rename from buildstream/plugins/sources/pip.py
rename to buildstream2/plugins/sources/pip.py
index 9d6c40d..99e630e 100644
--- a/buildstream/plugins/sources/pip.py
+++ b/buildstream2/plugins/sources/pip.py
@@ -72,7 +72,7 @@ import hashlib
 import os
 import re
 
-from buildstream import Consistency, Source, SourceError, utils
+from buildstream2 import Consistency, Source, SourceError, utils
 
 _OUTPUT_DIRNAME = '.bst_pip_downloads'
 _PYPI_INDEX_URL = 'https://pypi.org/simple/'
diff --git a/buildstream/plugins/sources/remote.py b/buildstream2/plugins/sources/remote.py
similarity index 98%
rename from buildstream/plugins/sources/remote.py
rename to buildstream2/plugins/sources/remote.py
index 562a8f2..5ba57af 100644
--- a/buildstream/plugins/sources/remote.py
+++ b/buildstream2/plugins/sources/remote.py
@@ -52,7 +52,7 @@ details on common configuration options for sources.
    The ``remote`` plugin is available since :ref:`format version 10 <project_format_version>`
 """
 import os
-from buildstream import SourceError, utils
+from buildstream2 import SourceError, utils
 from ._downloadablefilesource import DownloadableFileSource
 
 
diff --git a/buildstream/plugins/sources/tar.py b/buildstream2/plugins/sources/tar.py
similarity index 99%
rename from buildstream/plugins/sources/tar.py
rename to buildstream2/plugins/sources/tar.py
index 31dc174..be4222f 100644
--- a/buildstream/plugins/sources/tar.py
+++ b/buildstream2/plugins/sources/tar.py
@@ -60,8 +60,8 @@ import tarfile
 from contextlib import contextmanager
 from tempfile import TemporaryFile
 
-from buildstream import SourceError
-from buildstream import utils
+from buildstream2 import SourceError
+from buildstream2 import utils
 
 from ._downloadablefilesource import DownloadableFileSource
 
diff --git a/buildstream/plugins/sources/zip.py b/buildstream2/plugins/sources/zip.py
similarity index 98%
rename from buildstream/plugins/sources/zip.py
rename to buildstream2/plugins/sources/zip.py
index 03efcef..fea9761 100644
--- a/buildstream/plugins/sources/zip.py
+++ b/buildstream2/plugins/sources/zip.py
@@ -60,8 +60,8 @@ import os
 import zipfile
 import stat
 
-from buildstream import SourceError
-from buildstream import utils
+from buildstream2 import SourceError
+from buildstream2 import utils
 
 from ._downloadablefilesource import DownloadableFileSource
 
diff --git a/buildstream/sandbox/__init__.py b/buildstream2/sandbox/__init__.py
similarity index 100%
rename from buildstream/sandbox/__init__.py
rename to buildstream2/sandbox/__init__.py
diff --git a/buildstream/sandbox/_config.py b/buildstream2/sandbox/_config.py
similarity index 100%
rename from buildstream/sandbox/_config.py
rename to buildstream2/sandbox/_config.py
diff --git a/buildstream/sandbox/_mount.py b/buildstream2/sandbox/_mount.py
similarity index 100%
rename from buildstream/sandbox/_mount.py
rename to buildstream2/sandbox/_mount.py
diff --git a/buildstream/sandbox/_mounter.py b/buildstream2/sandbox/_mounter.py
similarity index 100%
rename from buildstream/sandbox/_mounter.py
rename to buildstream2/sandbox/_mounter.py
diff --git a/buildstream/sandbox/_sandboxbwrap.py b/buildstream2/sandbox/_sandboxbwrap.py
similarity index 100%
rename from buildstream/sandbox/_sandboxbwrap.py
rename to buildstream2/sandbox/_sandboxbwrap.py
diff --git a/buildstream/sandbox/_sandboxchroot.py b/buildstream2/sandbox/_sandboxchroot.py
similarity index 100%
rename from buildstream/sandbox/_sandboxchroot.py
rename to buildstream2/sandbox/_sandboxchroot.py
diff --git a/buildstream/sandbox/_sandboxdummy.py b/buildstream2/sandbox/_sandboxdummy.py
similarity index 100%
rename from buildstream/sandbox/_sandboxdummy.py
rename to buildstream2/sandbox/_sandboxdummy.py
diff --git a/buildstream/sandbox/_sandboxremote.py b/buildstream2/sandbox/_sandboxremote.py
similarity index 100%
rename from buildstream/sandbox/_sandboxremote.py
rename to buildstream2/sandbox/_sandboxremote.py
diff --git a/buildstream/sandbox/sandbox.py b/buildstream2/sandbox/sandbox.py
similarity index 99%
rename from buildstream/sandbox/sandbox.py
rename to buildstream2/sandbox/sandbox.py
index c96ccb5..7c688e4 100644
--- a/buildstream/sandbox/sandbox.py
+++ b/buildstream2/sandbox/sandbox.py
@@ -277,7 +277,7 @@ class Sandbox():
         .. note::
 
            The optional *cwd* argument will default to the value set with
-           :func:`~buildstream.sandbox.Sandbox.set_work_directory` and this
+           :func:`~buildstream2.sandbox.Sandbox.set_work_directory` and this
            function must make sure the directory will be created if it does
            not exist yet, even if a workspace is being used.
         """
diff --git a/buildstream/scriptelement.py b/buildstream2/scriptelement.py
similarity index 100%
rename from buildstream/scriptelement.py
rename to buildstream2/scriptelement.py
diff --git a/buildstream/source.py b/buildstream2/source.py
similarity index 94%
rename from buildstream/source.py
rename to buildstream2/source.py
index 6f4ff57..c164166 100644
--- a/buildstream/source.py
+++ b/buildstream2/source.py
@@ -47,53 +47,53 @@ For loading and configuration purposes, Sources must implement the
 
    In order to ensure that all configuration data is processed at
    load time, it is important that all URLs have been processed during
-   :func:`Plugin.configure() <buildstream.plugin.Plugin.configure>`.
+   :func:`Plugin.configure() <buildstream2.plugin.Plugin.configure>`.
 
    Source implementations *must* either call
-   :func:`Source.translate_url() <buildstream.source.Source.translate_url>` or
-   :func:`Source.mark_download_url() <buildstream.source.Source.mark_download_url>`
+   :func:`Source.translate_url() <buildstream2.source.Source.translate_url>` or
+   :func:`Source.mark_download_url() <buildstream2.source.Source.mark_download_url>`
    for every URL that has been specified in the configuration during
-   :func:`Plugin.configure() <buildstream.plugin.Plugin.configure>`
+   :func:`Plugin.configure() <buildstream2.plugin.Plugin.configure>`
 
 Sources expose the following abstract methods. Unless explicitly mentioned,
 these methods are mandatory to implement.
 
-* :func:`Source.get_consistency() <buildstream.source.Source.get_consistency>`
+* :func:`Source.get_consistency() <buildstream2.source.Source.get_consistency>`
 
   Report the sources consistency state.
 
-* :func:`Source.load_ref() <buildstream.source.Source.load_ref>`
+* :func:`Source.load_ref() <buildstream2.source.Source.load_ref>`
 
   Load the ref from a specific YAML node
 
-* :func:`Source.get_ref() <buildstream.source.Source.get_ref>`
+* :func:`Source.get_ref() <buildstream2.source.Source.get_ref>`
 
   Fetch the source ref
 
-* :func:`Source.set_ref() <buildstream.source.Source.set_ref>`
+* :func:`Source.set_ref() <buildstream2.source.Source.set_ref>`
 
   Set a new ref explicitly
 
-* :func:`Source.track() <buildstream.source.Source.track>`
+* :func:`Source.track() <buildstream2.source.Source.track>`
 
   Automatically derive a new ref from a symbolic tracking branch
 
-* :func:`Source.fetch() <buildstream.source.Source.fetch>`
+* :func:`Source.fetch() <buildstream2.source.Source.fetch>`
 
   Fetch the actual payload for the currently set ref
 
-* :func:`Source.stage() <buildstream.source.Source.stage>`
+* :func:`Source.stage() <buildstream2.source.Source.stage>`
 
   Stage the sources for a given ref at a specified location
 
-* :func:`Source.init_workspace() <buildstream.source.Source.init_workspace>`
+* :func:`Source.init_workspace() <buildstream2.source.Source.init_workspace>`
 
   Stage sources in a local directory for use as a workspace.
 
   **Optional**: If left unimplemented, this will default to calling
-  :func:`Source.stage() <buildstream.source.Source.stage>`
+  :func:`Source.stage() <buildstream2.source.Source.stage>`
 
-* :func:`Source.get_source_fetchers() <buildstream.source.Source.get_source_fetchers>`
+* :func:`Source.get_source_fetchers() <buildstream2.source.Source.get_source_fetchers>`
 
   Get the objects that are used for fetching.
 
@@ -102,7 +102,7 @@ these methods are mandatory to implement.
   submodules). For details on how to define a SourceFetcher, see
   :ref:`SourceFetcher <core_source_fetcher>`.
 
-* :func:`Source.validate_cache() <buildstream.source.Source.validate_cache>`
+* :func:`Source.validate_cache() <buildstream2.source.Source.validate_cache>`
 
   Perform any validations which require the sources to be cached.
 
@@ -117,11 +117,11 @@ another. In situations where a source needs to access previous source(s) in
 order to perform its own track and/or fetch, following attributes can be set to
 request access to previous sources:
 
-* :attr:`~buildstream.source.Source.BST_REQUIRES_PREVIOUS_SOURCES_TRACK`
+* :attr:`~buildstream2.source.Source.BST_REQUIRES_PREVIOUS_SOURCES_TRACK`
 
   Indicate that access to previous sources is required during track
 
-* :attr:`~buildstream.source.Source.BST_REQUIRES_PREVIOUS_SOURCES_FETCH`
+* :attr:`~buildstream2.source.Source.BST_REQUIRES_PREVIOUS_SOURCES_FETCH`
 
   Indicate that access to previous sources is required during fetch
 
@@ -152,7 +152,7 @@ Abstract Methods
 SourceFetchers expose the following abstract methods. Unless explicitly
 mentioned, these methods are mandatory to implement.
 
-* :func:`SourceFetcher.fetch() <buildstream.source.SourceFetcher.fetch>`
+* :func:`SourceFetcher.fetch() <buildstream2.source.SourceFetcher.fetch>`
 
   Fetches the URL associated with this SourceFetcher, optionally taking an
   alias override.
@@ -200,9 +200,9 @@ class SourceFetcher():
     .. attention::
 
        When implementing a SourceFetcher, remember to call
-       :func:`Source.mark_download_url() <buildstream.source.Source.mark_download_url>`
+       :func:`Source.mark_download_url() <buildstream2.source.Source.mark_download_url>`
        for every URL found in the configuration data at
-       :func:`Plugin.configure() <buildstream.plugin.Plugin.configure>` time.
+       :func:`Plugin.configure() <buildstream2.plugin.Plugin.configure>` time.
     """
     def __init__(self):
         self.__alias = None
@@ -341,7 +341,7 @@ class Source(Plugin):
         .. note::
 
            The *ref* for the Source is expected to be read at
-           :func:`Plugin.configure() <buildstream.plugin.Plugin.configure>` time,
+           :func:`Plugin.configure() <buildstream2.plugin.Plugin.configure>` time,
            this will only be used for loading refs from alternative locations
            than in the `element.bst` file where the given Source object has
            been declared.
@@ -374,9 +374,9 @@ class Source(Plugin):
         Args:
            ref (simple object): The internal source reference to set, or ``None``
            node (dict): The same dictionary which was previously passed
-                        to :func:`Plugin.configure() <buildstream.plugin.Plugin.configure>`
+                        to :func:`Plugin.configure() <buildstream2.plugin.Plugin.configure>`
 
-        See :func:`Source.get_ref() <buildstream.source.Source.get_ref>`
+        See :func:`Source.get_ref() <buildstream2.source.Source.get_ref>`
         for a discussion on the *ref* parameter.
 
         .. note::
@@ -392,7 +392,7 @@ class Source(Plugin):
         Args:
            previous_sources_dir (str): directory where previous sources are staged.
                                        Note that this keyword argument is available only when
-                                       :attr:`~buildstream.source.Source.BST_REQUIRES_PREVIOUS_SOURCES_TRACK`
+                                       :attr:`~buildstream2.source.Source.BST_REQUIRES_PREVIOUS_SOURCES_TRACK`
                                        is set to True.
 
         Returns:
@@ -408,7 +408,7 @@ class Source(Plugin):
         backend store allows one to query for a new ref from a symbolic
         tracking data without downloading then that is desirable.
 
-        See :func:`Source.get_ref() <buildstream.source.Source.get_ref>`
+        See :func:`Source.get_ref() <buildstream2.source.Source.get_ref>`
         for a discussion on the *ref* parameter.
         """
         # Allow a non implementation
@@ -421,7 +421,7 @@ class Source(Plugin):
         Args:
            previous_sources_dir (str): directory where previous sources are staged.
                                        Note that this keyword argument is available only when
-                                       :attr:`~buildstream.source.Source.BST_REQUIRES_PREVIOUS_SOURCES_FETCH`
+                                       :attr:`~buildstream2.source.Source.BST_REQUIRES_PREVIOUS_SOURCES_FETCH`
                                        is set to True.
 
         Raises:
@@ -459,7 +459,7 @@ class Source(Plugin):
            :class:`.SourceError`
 
         Default implementation is to call
-        :func:`Source.stage() <buildstream.source.Source.stage>`.
+        :func:`Source.stage() <buildstream2.source.Source.stage>`.
 
         Implementors overriding this method should assume that *directory*
         already exists.
@@ -483,7 +483,7 @@ class Source(Plugin):
 
            Implementors can implement this as a generator.
 
-           The :func:`SourceFetcher.fetch() <buildstream.source.SourceFetcher.fetch>`
+           The :func:`SourceFetcher.fetch() <buildstream2.source.SourceFetcher.fetch>`
            method will be called on the returned fetchers one by one,
            before consuming the next fetcher in the list.
 
@@ -496,7 +496,7 @@ class Source(Plugin):
 
         This is guaranteed to be called only once for a given session
         once the sources are known to be
-        :attr:`Consistency.CACHED <buildstream.types.Consistency.CACHED>`,
+        :attr:`Consistency.CACHED <buildstream2.types.Consistency.CACHED>`,
         if source tracking is enabled in the session for this source,
         then this will only be called if the sources become cached after
         tracking completes.
@@ -534,8 +534,8 @@ class Source(Plugin):
         .. note::
 
            This must be called for every URL in the configuration during
-           :func:`Plugin.configure() <buildstream.plugin.Plugin.configure>` if
-           :func:`Source.mark_download_url() <buildstream.source.Source.mark_download_url>`
+           :func:`Plugin.configure() <buildstream2.plugin.Plugin.configure>` if
+           :func:`Source.mark_download_url() <buildstream2.source.Source.mark_download_url>`
            is not called.
         """
         # Ensure that the download URL is also marked
@@ -572,8 +572,8 @@ class Source(Plugin):
         .. note::
 
            This must be called for every URL in the configuration during
-           :func:`Plugin.configure() <buildstream.plugin.Plugin.configure>` if
-           :func:`Source.translate_url() <buildstream.source.Source.translate_url>`
+           :func:`Plugin.configure() <buildstream2.plugin.Plugin.configure>` if
+           :func:`Source.translate_url() <buildstream2.source.Source.translate_url>`
            is not called.
 
         *Since: 1.2*
diff --git a/buildstream/storage/__init__.py b/buildstream2/storage/__init__.py
similarity index 100%
rename from buildstream/storage/__init__.py
rename to buildstream2/storage/__init__.py
diff --git a/buildstream/storage/_casbaseddirectory.py b/buildstream2/storage/_casbaseddirectory.py
similarity index 100%
rename from buildstream/storage/_casbaseddirectory.py
rename to buildstream2/storage/_casbaseddirectory.py
diff --git a/buildstream/storage/_filebaseddirectory.py b/buildstream2/storage/_filebaseddirectory.py
similarity index 100%
rename from buildstream/storage/_filebaseddirectory.py
rename to buildstream2/storage/_filebaseddirectory.py
diff --git a/buildstream/storage/directory.py b/buildstream2/storage/directory.py
similarity index 100%
rename from buildstream/storage/directory.py
rename to buildstream2/storage/directory.py
diff --git a/buildstream/testing/__init__.py b/buildstream2/testing/__init__.py
similarity index 100%
rename from buildstream/testing/__init__.py
rename to buildstream2/testing/__init__.py
diff --git a/buildstream/_protos/__init__.py b/buildstream2/testing/_sourcetests/__init__.py
similarity index 100%
rename from buildstream/_protos/__init__.py
rename to buildstream2/testing/_sourcetests/__init__.py
diff --git a/buildstream/testing/_sourcetests/build_checkout.py b/buildstream2/testing/_sourcetests/build_checkout.py
similarity index 94%
rename from buildstream/testing/_sourcetests/build_checkout.py
rename to buildstream2/testing/_sourcetests/build_checkout.py
index 3619d2b..538f3f7 100644
--- a/buildstream/testing/_sourcetests/build_checkout.py
+++ b/buildstream2/testing/_sourcetests/build_checkout.py
@@ -22,9 +22,9 @@
 import os
 import pytest
 
-from buildstream.testing import create_repo, ALL_REPO_KINDS
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream import _yaml
+from buildstream2.testing import create_repo, ALL_REPO_KINDS
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
 
 # Project directory
 TOP_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/buildstream/testing/_sourcetests/fetch.py b/buildstream2/testing/_sourcetests/fetch.py
similarity index 99%
rename from buildstream/testing/_sourcetests/fetch.py
rename to buildstream2/testing/_sourcetests/fetch.py
index aaf92a1..c58ff90 100644
--- a/buildstream/testing/_sourcetests/fetch.py
+++ b/buildstream2/testing/_sourcetests/fetch.py
@@ -22,7 +22,7 @@
 import os
 import pytest
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 from .._utils import generate_junction, configure_project
 from .. import create_repo, ALL_REPO_KINDS
 from .. import cli  # pylint: disable=unused-import
diff --git a/buildstream/testing/_sourcetests/mirror.py b/buildstream2/testing/_sourcetests/mirror.py
similarity index 99%
rename from buildstream/testing/_sourcetests/mirror.py
rename to buildstream2/testing/_sourcetests/mirror.py
index d682bb2..7c4694e 100644
--- a/buildstream/testing/_sourcetests/mirror.py
+++ b/buildstream2/testing/_sourcetests/mirror.py
@@ -22,8 +22,8 @@
 import os
 import pytest
 
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain
 from .._utils import generate_junction
 from .. import create_repo, ALL_REPO_KINDS
 from .. import cli  # pylint: disable=unused-import
diff --git a/buildstream/testing/_sourcetests/project/elements/base.bst b/buildstream2/testing/_sourcetests/project/elements/base.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/base.bst
rename to buildstream2/testing/_sourcetests/project/elements/base.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/base/base-alpine.bst b/buildstream2/testing/_sourcetests/project/elements/base/base-alpine.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/base/base-alpine.bst
rename to buildstream2/testing/_sourcetests/project/elements/base/base-alpine.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/import-bin.bst b/buildstream2/testing/_sourcetests/project/elements/import-bin.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/import-bin.bst
rename to buildstream2/testing/_sourcetests/project/elements/import-bin.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/import-dev.bst b/buildstream2/testing/_sourcetests/project/elements/import-dev.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/import-dev.bst
rename to buildstream2/testing/_sourcetests/project/elements/import-dev.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/dependency/horsey.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/dependency/horsey.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/dependency/horsey.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/dependency/horsey.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/dependency/pony.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/dependency/pony.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/dependency/pony.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/dependency/pony.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/dependency/zebry.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/dependency/zebry.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/dependency/zebry.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/dependency/zebry.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/0.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/0.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/order/0.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/0.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/1.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/1.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/order/1.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/1.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/2.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/2.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/order/2.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/2.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/3.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/3.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/order/3.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/3.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/4.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/4.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/order/4.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/4.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/5.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/5.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/order/5.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/5.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/6.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/6.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/order/6.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/6.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/7.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/7.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/order/7.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/7.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/8.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/8.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/order/8.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/8.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/9.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/9.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/order/9.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/9.bst
diff --git a/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/run.bst b/buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/run.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/elements/multiple_targets/order/run.bst
rename to buildstream2/testing/_sourcetests/project/elements/multiple_targets/order/run.bst
diff --git a/buildstream/testing/_sourcetests/project/files/bar b/buildstream2/testing/_sourcetests/project/files/bar
similarity index 100%
rename from buildstream/testing/_sourcetests/project/files/bar
rename to buildstream2/testing/_sourcetests/project/files/bar
diff --git a/buildstream/testing/_sourcetests/project/files/bin-files/usr/bin/hello b/buildstream2/testing/_sourcetests/project/files/bin-files/usr/bin/hello
similarity index 100%
rename from buildstream/testing/_sourcetests/project/files/bin-files/usr/bin/hello
rename to buildstream2/testing/_sourcetests/project/files/bin-files/usr/bin/hello
diff --git a/buildstream/testing/_sourcetests/project/files/dev-files/usr/include/pony.h b/buildstream2/testing/_sourcetests/project/files/dev-files/usr/include/pony.h
similarity index 100%
rename from buildstream/testing/_sourcetests/project/files/dev-files/usr/include/pony.h
rename to buildstream2/testing/_sourcetests/project/files/dev-files/usr/include/pony.h
diff --git a/buildstream/testing/_sourcetests/project/files/etc-files/etc/buildstream/config b/buildstream2/testing/_sourcetests/project/files/etc-files/etc/buildstream/config
similarity index 100%
rename from buildstream/testing/_sourcetests/project/files/etc-files/etc/buildstream/config
rename to buildstream2/testing/_sourcetests/project/files/etc-files/etc/buildstream/config
diff --git a/buildstream/testing/_sourcetests/project/files/foo b/buildstream2/testing/_sourcetests/project/files/foo
similarity index 100%
rename from buildstream/testing/_sourcetests/project/files/foo
rename to buildstream2/testing/_sourcetests/project/files/foo
diff --git a/buildstream/testing/_sourcetests/project/files/source-bundle/llamas.txt b/buildstream2/testing/_sourcetests/project/files/source-bundle/llamas.txt
similarity index 100%
rename from buildstream/testing/_sourcetests/project/files/source-bundle/llamas.txt
rename to buildstream2/testing/_sourcetests/project/files/source-bundle/llamas.txt
diff --git a/buildstream/testing/_sourcetests/project/files/sub-project/elements/import-etc.bst b/buildstream2/testing/_sourcetests/project/files/sub-project/elements/import-etc.bst
similarity index 100%
rename from buildstream/testing/_sourcetests/project/files/sub-project/elements/import-etc.bst
rename to buildstream2/testing/_sourcetests/project/files/sub-project/elements/import-etc.bst
diff --git a/buildstream/testing/_sourcetests/project/files/sub-project/files/etc-files/etc/animal.conf b/buildstream2/testing/_sourcetests/project/files/sub-project/files/etc-files/etc/animal.conf
similarity index 100%
rename from buildstream/testing/_sourcetests/project/files/sub-project/files/etc-files/etc/animal.conf
rename to buildstream2/testing/_sourcetests/project/files/sub-project/files/etc-files/etc/animal.conf
diff --git a/buildstream/testing/_sourcetests/project/files/sub-project/project.conf b/buildstream2/testing/_sourcetests/project/files/sub-project/project.conf
similarity index 100%
rename from buildstream/testing/_sourcetests/project/files/sub-project/project.conf
rename to buildstream2/testing/_sourcetests/project/files/sub-project/project.conf
diff --git a/buildstream/testing/_sourcetests/project/project.conf b/buildstream2/testing/_sourcetests/project/project.conf
similarity index 100%
rename from buildstream/testing/_sourcetests/project/project.conf
rename to buildstream2/testing/_sourcetests/project/project.conf
diff --git a/buildstream/testing/_sourcetests/source_determinism.py b/buildstream2/testing/_sourcetests/source_determinism.py
similarity index 99%
rename from buildstream/testing/_sourcetests/source_determinism.py
rename to buildstream2/testing/_sourcetests/source_determinism.py
index 8597a70..9e2a40d 100644
--- a/buildstream/testing/_sourcetests/source_determinism.py
+++ b/buildstream2/testing/_sourcetests/source_determinism.py
@@ -22,7 +22,7 @@
 import os
 import pytest
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 from .._utils.site import HAVE_SANDBOX
 from .. import create_repo, ALL_REPO_KINDS
 from .. import cli  # pylint: disable=unused-import
diff --git a/buildstream/testing/_sourcetests/track.py b/buildstream2/testing/_sourcetests/track.py
similarity index 99%
rename from buildstream/testing/_sourcetests/track.py
rename to buildstream2/testing/_sourcetests/track.py
index 668ea29..c106da4 100644
--- a/buildstream/testing/_sourcetests/track.py
+++ b/buildstream2/testing/_sourcetests/track.py
@@ -22,8 +22,8 @@
 import os
 import pytest
 
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain
 from .._utils import generate_junction, configure_project
 from .. import create_repo, ALL_REPO_KINDS
 from .. import cli  # pylint: disable=unused-import
diff --git a/buildstream/testing/_sourcetests/track_cross_junction.py b/buildstream2/testing/_sourcetests/track_cross_junction.py
similarity index 99%
rename from buildstream/testing/_sourcetests/track_cross_junction.py
rename to buildstream2/testing/_sourcetests/track_cross_junction.py
index ece3e0b..96f02e3 100644
--- a/buildstream/testing/_sourcetests/track_cross_junction.py
+++ b/buildstream2/testing/_sourcetests/track_cross_junction.py
@@ -22,7 +22,7 @@
 import os
 import pytest
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 from .._utils import generate_junction
 from .. import create_repo, ALL_REPO_KINDS
 from .. import cli  # pylint: disable=unused-import
diff --git a/buildstream/testing/_sourcetests/workspace.py b/buildstream2/testing/_sourcetests/workspace.py
similarity index 99%
rename from buildstream/testing/_sourcetests/workspace.py
rename to buildstream2/testing/_sourcetests/workspace.py
index 5218f8f..b240c7e 100644
--- a/buildstream/testing/_sourcetests/workspace.py
+++ b/buildstream2/testing/_sourcetests/workspace.py
@@ -23,7 +23,7 @@ import os
 import shutil
 import pytest
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 from .. import create_repo, ALL_REPO_KINDS
 from .. import cli  # pylint: disable=unused-import
 
diff --git a/buildstream/testing/_utils/__init__.py b/buildstream2/testing/_utils/__init__.py
similarity index 87%
rename from buildstream/testing/_utils/__init__.py
rename to buildstream2/testing/_utils/__init__.py
index b419d72..0d1484a 100644
--- a/buildstream/testing/_utils/__init__.py
+++ b/buildstream2/testing/_utils/__init__.py
@@ -1,6 +1,6 @@
 import os
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 from .junction import generate_junction
 
 
diff --git a/buildstream/testing/_utils/junction.py b/buildstream2/testing/_utils/junction.py
similarity index 98%
rename from buildstream/testing/_utils/junction.py
rename to buildstream2/testing/_utils/junction.py
index ca059eb..adc86af 100644
--- a/buildstream/testing/_utils/junction.py
+++ b/buildstream2/testing/_utils/junction.py
@@ -1,7 +1,7 @@
 import subprocess
 import pytest
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 from .. import Repo
 from .site import HAVE_GIT, GIT, GIT_ENV
 
diff --git a/buildstream/testing/_utils/site.py b/buildstream2/testing/_utils/site.py
similarity index 95%
rename from buildstream/testing/_utils/site.py
rename to buildstream2/testing/_utils/site.py
index 54c5b46..1eaa781 100644
--- a/buildstream/testing/_utils/site.py
+++ b/buildstream2/testing/_utils/site.py
@@ -5,7 +5,7 @@ import os
 import sys
 import platform
 
-from buildstream import _site, utils, ProgramNotFoundError
+from buildstream2 import _site, utils, ProgramNotFoundError
 
 
 try:
diff --git a/buildstream/testing/integration.py b/buildstream2/testing/integration.py
similarity index 100%
rename from buildstream/testing/integration.py
rename to buildstream2/testing/integration.py
diff --git a/buildstream/testing/repo.py b/buildstream2/testing/repo.py
similarity index 99%
rename from buildstream/testing/repo.py
rename to buildstream2/testing/repo.py
index c153868..80f83f8 100644
--- a/buildstream/testing/repo.py
+++ b/buildstream2/testing/repo.py
@@ -31,7 +31,7 @@ class Repo():
     Abstract class providing scaffolding for generating data to be
     used with various sources. Subclasses of Repo may be registered to
     run through the suite of generic source plugin tests provided in
-    buildstream.testing.
+    buildstream2.testing.
 
     Args:
     directory (str): The base temp directory for the test
diff --git a/buildstream/testing/runcli.py b/buildstream2/testing/runcli.py
similarity index 99%
rename from buildstream/testing/runcli.py
rename to buildstream2/testing/runcli.py
index 72bdce0..6934a46 100644
--- a/buildstream/testing/runcli.py
+++ b/buildstream2/testing/runcli.py
@@ -50,12 +50,12 @@ import pytest
 from _pytest.capture import MultiCapture, FDCapture, FDCaptureBinary
 
 # Import the main cli entrypoint
-from buildstream._frontend import cli as bst_cli
-from buildstream import _yaml
-from buildstream._cas import CASCache
+from .._frontend import cli as bst_cli
+from .. import _yaml
+from .._cas import CASCache
 
 # Special private exception accessor, for test case purposes
-from buildstream._exceptions import BstError, get_last_exception, get_last_task_error
+from .._exceptions import BstError, get_last_exception, get_last_task_error
 
 
 # Wrapper for the click.testing result
diff --git a/buildstream/types.py b/buildstream2/types.py
similarity index 98%
rename from buildstream/types.py
rename to buildstream2/types.py
index d54bf0b..7549d0c 100644
--- a/buildstream/types.py
+++ b/buildstream2/types.py
@@ -32,7 +32,7 @@ import heapq
 class Scope(Enum):
     """Defines the scope of dependencies to include for a given element
     when iterating over the dependency graph in APIs like
-    :func:`Element.dependencies() <buildstream.element.Element.dependencies>`
+    :func:`Element.dependencies() <buildstream2.element.Element.dependencies>`
     """
 
     ALL = 1
diff --git a/buildstream/utils.py b/buildstream2/utils.py
similarity index 100%
rename from buildstream/utils.py
rename to buildstream2/utils.py
diff --git a/doc/Makefile b/doc/Makefile
index 7bc3cb3..e9e0d16 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -32,7 +32,7 @@ BST2HTMLOPTS = --force
 endif
 
 # Help Python find buildstream and its plugins
-PYTHONPATH=$(CURDIR)/..:$(CURDIR)/../buildstream/plugins
+PYTHONPATH=$(CURDIR)/..:$(CURDIR)/../buildstream2/plugins
 
 
 .PHONY: all clean templates templates-clean sessions sessions-prep sessions-clean badges badges-clean html devhelp
@@ -82,9 +82,9 @@ clean: templates-clean sessions-clean badges-clean
 templates:
 	mkdir -p source/elements
 	mkdir -p source/sources
-	$(SPHINXAPIDOC) --force --separate --module-first --no-headings --no-toc -o source $(CURDIR)/../buildstream *_pb2*.py
-	$(call plugin-doc-skeleton,$(CURDIR)/../buildstream/plugins/elements,elements)
-	$(call plugin-doc-skeleton,$(CURDIR)/../buildstream/plugins/sources,sources)
+	$(SPHINXAPIDOC) --force --separate --module-first --no-headings --no-toc -o source $(CURDIR)/../buildstream2 *_pb2*.py
+	$(call plugin-doc-skeleton,$(CURDIR)/../buildstream2/plugins/elements,elements)
+	$(call plugin-doc-skeleton,$(CURDIR)/../buildstream2/plugins/sources,sources)
 
 templates-clean:
 	rm -rf source/elements
diff --git a/doc/bst2html.py b/doc/bst2html.py
index 2f40126..e06a3a3 100755
--- a/doc/bst2html.py
+++ b/doc/bst2html.py
@@ -35,9 +35,9 @@ from tempfile import TemporaryDirectory
 
 import click
 
-from buildstream import _yaml
-from buildstream import utils
-from buildstream._exceptions import BstError
+from buildstream2 import _yaml
+from buildstream2 import utils
+from buildstream2._exceptions import BstError
 
 
 _ANSI2HTML_STYLES = {}
@@ -218,7 +218,7 @@ def workdir(source_cache=None):
 def run_bst_command(config_file, directory, command):
     click.echo("Running bst command in directory '{}': bst {}".format(directory, command), err=True)
 
-    argv = ['python3', '-m', 'buildstream', '--colors', '--config', config_file] + shlex.split(command)
+    argv = ['python3', '-m', 'buildstream2', '--colors', '--config', config_file] + shlex.split(command)
     p = subprocess.Popen(argv, cwd=directory, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
     out, _ = p.communicate()
     return out.decode('utf-8').strip()
diff --git a/doc/source/arch_data_model.rst b/doc/source/arch_data_model.rst
index 6e78d3a..6c9fe6e 100644
--- a/doc/source/arch_data_model.rst
+++ b/doc/source/arch_data_model.rst
@@ -13,14 +13,14 @@ The ``Project`` object is the main component of a given BuildStream *project*, a
 is responsible for loading and validating the :ref:`project.conf <projectconf>`, and
 providing this loaded *project data* in a convenient way to the BuildStream core.
 
-Conceptually, the *project* is a container for the :mod:`Elements <buildstream.element>`,
+Conceptually, the *project* is a container for the :mod:`Elements <buildstream2.element>`,
 which are declared within a user's project, and as such acts as a factory for instantiating
 elements at load time.
 
 
 Element
 -------
-:mod:`Elements <buildstream.element>` are the main processing unit in a pipeline. These
+:mod:`Elements <buildstream2.element>` are the main processing unit in a pipeline. These
 are the loaded representation of the ``.bst`` files loaded from the :ref:`project's element path
 <project_element_path>`.
 
@@ -80,7 +80,7 @@ on top.
 
 Source
 ------
-:mod:`Sources <buildstream.element>` are the abstract objects which are responsible
+:mod:`Sources <buildstream2.source>` are the abstract objects which are responsible
 for obtaining remote source code or data to import into the build environment, and
 ensuring that it is done in a bit-for-bit reproducible way without any contamination
 of the host or build environment.
diff --git a/doc/source/arch_dependency_model.rst b/doc/source/arch_dependency_model.rst
index 2b80564..8f6d489 100644
--- a/doc/source/arch_dependency_model.rst
+++ b/doc/source/arch_dependency_model.rst
@@ -21,7 +21,7 @@ output *artifact*. Instead we can employ :mod:`compose <elements.compose>` and
 to achieve sub artifact granularity at build and deploy time.
 
 When developing BuildStream, it is important to understand the distinction
-between dependency types and element :class:`Scope <buildstream.types.Scope>`,
+between dependency types and element :class:`Scope <buildstream2.types.Scope>`,
 which acts as a selector of which elements to consider in the dependency
 graph of a given element when performing recursive activities.
 
@@ -31,7 +31,7 @@ Scope
 
 * **Scope.ALL**
 
-  In the :func:`Scope.ALL <buildstream.types.Scope.ALL>` scope, all elements
+  In the :func:`Scope.ALL <buildstream2.types.Scope.ALL>` scope, all elements
   are considered.
 
   This is used in some cases to forcefully fetch, pull or build all dependencies
@@ -41,7 +41,7 @@ Scope
 
 * **Scope.RUN**
 
-  In the :func:`Scope.RUN <buildstream.types.Scope.RUN>` scope, only elements
+  In the :func:`Scope.RUN <buildstream2.types.Scope.RUN>` scope, only elements
   which are required to run are considered, including the element itself. Note
   that these are transitive - the service also requires the base runtime.
 
@@ -54,7 +54,7 @@ Scope
 
 * **Scope.BUILD**
 
-  In the :func:`Scope.BUILD <buildstream.types.Scope.BUILD>` scope, only
+  In the :func:`Scope.BUILD <buildstream2.types.Scope.BUILD>` scope, only
   elements which are required to build are considered, *excluding* the
   element we intend to build.
 
diff --git a/doc/source/arch_sandboxing.rst b/doc/source/arch_sandboxing.rst
index 52679de..d66c722 100644
--- a/doc/source/arch_sandboxing.rst
+++ b/doc/source/arch_sandboxing.rst
@@ -38,7 +38,7 @@ running with extra privileges. The exact priviliges that are required depend on
 your platform and backend.
 
 Element plugins can run arbitary commands within the sandbox using the
-:mod:`sandbox API <buildstream.sandbox.sandbox>`.
+:mod:`sandbox API <buildstream2.sandbox.sandbox>`.
 
 What elements can and can't do in the sandbox
 ---------------------------------------------
@@ -54,7 +54,7 @@ Filesystem access
 The filesystem inside sandboxes should be read-only during element assembly,
 except for certain directories which element plugins can mark as being
 read/write. Most elements plugins derive from :mod:`BuildElement
-<buildstream.buildelement>`, which marks ``%{build-root}`` and
+<buildstream2.buildelement>`, which marks ``%{build-root}`` and
 ``%{install-root}`` as read/write.
 
 When running integration commands or `bst shell`, the sandbox should have a
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 2690536..279b319 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -19,7 +19,7 @@
 #
 import os
 import sys
-from buildstream import __version__
+from buildstream2 import __version__
 
 sys.path.insert(0, os.path.abspath('..'))
 
@@ -112,7 +112,7 @@ add_module_names = False
 pygments_style = 'sphinx'
 
 # A list of ignored prefixes for module index sorting.
-modindex_common_prefix = ['buildstream.']
+modindex_common_prefix = ['buildstream2.']
 
 # If true, keep warnings as "system message" paragraphs in the built documents.
 # keep_warnings = False
@@ -308,7 +308,7 @@ latex_documents = [
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
 man_pages = [
-    (master_doc, 'buildstream', 'BuildStream Documentation',
+    (master_doc, 'buildstream2', 'BuildStream Documentation',
      [author], 1)
 ]
 
diff --git a/doc/source/core_framework.rst b/doc/source/core_framework.rst
index fe2a59c..2502775 100644
--- a/doc/source/core_framework.rst
+++ b/doc/source/core_framework.rst
@@ -5,19 +5,19 @@
 Plugin API reference
 ====================
 The core public APIs are of interest to anyone who wishes to
-implement custom :mod:`Element <buildstream.element>` or
-:mod:`Source <buildstream.source>` plugins, and can also be
+implement custom :mod:`Element <buildstream2.element>` or
+:mod:`Source <buildstream2.source>` plugins, and can also be
 useful for working on BuildStream itself.
 
 .. toctree::
    :maxdepth: 1
 
-   buildstream.types
-   buildstream.plugin
-   buildstream.source
-   buildstream.element
-   buildstream.buildelement
-   buildstream.scriptelement
-   buildstream.sandbox.sandbox
-   buildstream.utils
-   buildstream.testing
+   buildstream2.types
+   buildstream2.plugin
+   buildstream2.source
+   buildstream2.element
+   buildstream2.buildelement
+   buildstream2.scriptelement
+   buildstream2.sandbox.sandbox
+   buildstream2.utils
+   buildstream2.testing
diff --git a/doc/source/format_declaring.rst b/doc/source/format_declaring.rst
index 6a59557..5422609 100644
--- a/doc/source/format_declaring.rst
+++ b/doc/source/format_declaring.rst
@@ -233,7 +233,7 @@ Environment
      LD_LIBRARY_PATH: /some/custom/path
 
 Environment variables can be set to literal values here, these environment
-variables will be effective in the :mod:`Sandbox <buildstream.sandbox>` where
+variables will be effective in the :mod:`Sandbox <buildstream2.sandbox>` where
 build instructions are run for this element.
 
 
diff --git a/doc/source/format_intro.rst b/doc/source/format_intro.rst
index 86a3d33..e866625 100644
--- a/doc/source/format_intro.rst
+++ b/doc/source/format_intro.rst
@@ -2,7 +2,7 @@
 
 Introduction
 ============
-At the core of BuildStream is a data model of :mod:`Elements <buildstream.element>` which
+At the core of BuildStream is a data model of :mod:`Elements <buildstream2.element>` which
 are parsed from ``.bst`` files in a project directory and configured from a few different
 sources.
 
diff --git a/doc/source/format_project.rst b/doc/source/format_project.rst
index f9d999a..cdefddb 100644
--- a/doc/source/format_project.rst
+++ b/doc/source/format_project.rst
@@ -63,12 +63,12 @@ to support a new feature.
 
 .. note::
 
-   External :mod:`Element <buildstream.element>` and :mod:`Source <buildstream.source>`
+   External :mod:`Element <buildstream2.element>` and :mod:`Source <buildstream2.source>`
    plugins also implement their own YAML configuration fragments and as
    such are revisioned separately from the core format. See :ref:`project_plugins`
    for details on specifying a minimum version of a specific plugin.
 
-   Core :mod:`Elements <buildstream.element>` and :mod:`Sources <buildstream.source>`
+   Core :mod:`Elements <buildstream2.element>` and :mod:`Sources <buildstream2.source>`
    which are maintained and distributed as a part of BuildStream are revisioned
    under the same global ``format-version`` described here.
 
@@ -143,7 +143,7 @@ Individual warnings can be configured as fatal by setting ``fatal-warnings`` to
   - ref-not-in-track
   - <plugin>:<warning>
 
-BuildStream provides a collection of :class:`Core Warnings <buildstream.types.CoreWarnings>` which may be raised
+BuildStream provides a collection of :class:`Core Warnings <buildstream2.types.CoreWarnings>` which may be raised
 by a variety of plugins. Other configurable warnings are plugin specific and should be noted within their individual documentation.
 
 .. note::
@@ -337,8 +337,8 @@ A default mirror to consult first can be defined via
 
 External plugins
 ----------------
-If your project makes use of any custom :mod:`Element <buildstream.element>` or
-:mod:`Source <buildstream.source>` plugins, then the project must inform BuildStream
+If your project makes use of any custom :mod:`Element <buildstream2.element>` or
+:mod:`Source <buildstream2.source>` plugins, then the project must inform BuildStream
 of the plugins it means to make use of and the origin from which they can be loaded.
 
 Note that plugins with the same name from different origins are not permitted.
@@ -347,8 +347,8 @@ Note that plugins with the same name from different origins are not permitted.
 Local plugins
 ~~~~~~~~~~~~~
 Local plugins are expected to be found in a subdirectory of the actual
-BuildStream project. :mod:`Element <buildstream.element>` and
-:mod:`Source <buildstream.source>` plugins should be stored in separate
+BuildStream project. :mod:`Element <buildstream2.element>` and
+:mod:`Source <buildstream2.source>` plugins should be stored in separate
 directories to avoid namespace collisions.
 
 The versions of local plugins are largely immaterial since they are
@@ -1017,5 +1017,5 @@ Builtin defaults
 BuildStream defines some default values for convenience, the default
 values overridden by your project's ``project.conf`` are presented here:
 
-  .. literalinclude:: ../../buildstream/data/projectconfig.yaml
+  .. literalinclude:: ../../buildstream2/data/projectconfig.yaml
      :language: yaml
diff --git a/doc/source/format_public.rst b/doc/source/format_public.rst
index d596ea7..bb38189 100644
--- a/doc/source/format_public.rst
+++ b/doc/source/format_public.rst
@@ -36,10 +36,10 @@ Typical cases for this include running ``ldconfig`` at the base of a pipeline,
 or running commands to update various system caches.
 
 Integration commands of a given element are automatically run by the
-:func:`Element.integrate() <buildstream.element.Element.integrate>` method
+:func:`Element.integrate() <buildstream2.element.Element.integrate>` method
 and are used by various plugins.
 
-Notably the :mod:`BuildElement <buildstream.buildelement>` derived classes
+Notably the :mod:`BuildElement <buildstream2.buildelement>` derived classes
 will always integrate the build dependencies after staging and before running
 any build commands.
 
@@ -69,13 +69,13 @@ Split rules indicate how the output of an element can be categorized
 into *domains*.
 
 The ``split-rules`` domains are used by the
-:func:`Element.stage_artifact() <buildstream.element.Element.stage_artifact>`
+:func:`Element.stage_artifact() <buildstream2.element.Element.stage_artifact>`
 method when deciding what domains of an artifact should be staged.
 
 The strings listed in each domain are first substituted with the
 :ref:`variables <format_variables>` in context of the given element, and
 then applied as a glob style match, as understood by
-:func:`utils.glob() <buildstream.utils.glob>`
+:func:`utils.glob() <buildstream2.utils.glob>`
 
 This is used for creating compositions with the :mod:`compose <elements.compose>`
 element and can be used by other deployment related elements for the purpose of
@@ -92,7 +92,7 @@ over other elements when staged together with other elements.
 
 Each item in the overlap whitelist has substitutions applied from
 :ref:`variables <format_variables>`, and is then applied as a glob-style match
-(i.e. :func:`utils.glob() <buildstream.utils.glob>`).
+(i.e. :func:`utils.glob() <buildstream2.utils.glob>`).
 
 .. code:: yaml
 
diff --git a/doc/source/main_core.rst b/doc/source/main_core.rst
index c0757b7..a543c07 100644
--- a/doc/source/main_core.rst
+++ b/doc/source/main_core.rst
@@ -23,4 +23,4 @@ other more elaborate details about BuildStream internals.
 .. toctree::
    :hidden:
 
-   buildstream
+   buildstream2
diff --git a/doc/source/sample_plugin/setup.py b/doc/source/sample_plugin/setup.py
index 7ea0e1e..6253ba0 100644
--- a/doc/source/sample_plugin/setup.py
+++ b/doc/source/sample_plugin/setup.py
@@ -9,7 +9,7 @@ setup(name='BuildStream Autotools',
       ],
       include_package_data=True,
       entry_points={
-          'buildstream.plugins': [
+          'buildstream2.plugins': [
               'autotools = elements.autotools'
           ]
       })
diff --git a/doc/source/tutorial/autotools.rst b/doc/source/tutorial/autotools.rst
index ea28358..77496fa 100644
--- a/doc/source/tutorial/autotools.rst
+++ b/doc/source/tutorial/autotools.rst
@@ -86,8 +86,8 @@ As :ref:`the documentation <format_composition>` mentions:
   are resolved after all composition has taken place.
 
 The variable we needed to override was ``command-subdir``, which is an
-automatic variable provided by the :mod:`BuildElement <buildstream.buildelement>`
-abstract class. This variable simply instructs the :mod:`BuildElement <buildstream.buildelement>`
+automatic variable provided by the :mod:`BuildElement <buildstream2.buildelement>`
+abstract class. This variable simply instructs the :mod:`BuildElement <buildstream2.buildelement>`
 in which subdirectory of the ``%{build-root}`` to run its commands in.
 
 One can always display the resolved set of variables for a given
diff --git a/doc/source/tutorial/running-commands.rst b/doc/source/tutorial/running-commands.rst
index 1708145..687cf25 100644
--- a/doc/source/tutorial/running-commands.rst
+++ b/doc/source/tutorial/running-commands.rst
@@ -232,5 +232,5 @@ which :ref:`depend <format_dependencies>` on that element.
 
    The way that elements consume their dependency input can vary across the
    different *kinds* of elements. This chapter describes how it works for
-   :mod:`build elements <buildstream.buildelement>` implementations, which
+   :mod:`build elements <buildstream2.buildelement>` implementations, which
    are the most commonly used element type.
diff --git a/doc/source/using_commands.rst b/doc/source/using_commands.rst
index 53c3619..9fd57be 100644
--- a/doc/source/using_commands.rst
+++ b/doc/source/using_commands.rst
@@ -15,7 +15,7 @@ Top-level commands
 .. The bst options e.g. bst --version, or bst --verbose etc.
 .. _invoking_bst:
 
-.. click:: buildstream._frontend:cli
+.. click:: buildstream2._frontend:cli
    :prog: bst
 
 .. Further description of the command goes here
@@ -24,7 +24,7 @@ Top-level commands
 
 .. _invoking_artifact:
 
-.. click:: buildstream._frontend.cli:artifact
+.. click:: buildstream2._frontend.cli:artifact
    :prog: bst artifact
 
 ----
@@ -32,7 +32,7 @@ Top-level commands
 .. the `bst init` command
 .. _invoking_init:
 
-.. click:: buildstream._frontend.cli:init
+.. click:: buildstream2._frontend.cli:init
    :prog: bst init
 
 ----
@@ -40,35 +40,35 @@ Top-level commands
 .. the `bst build` command
 .. _invoking_build:
 
-.. click:: buildstream._frontend.cli:build
+.. click:: buildstream2._frontend.cli:build
    :prog: bst build
 
 ----
 
 .. _invoking_show:
 
-.. click:: buildstream._frontend.cli:show
+.. click:: buildstream2._frontend.cli:show
    :prog: bst show
 
 ----
 
 .. _invoking_shell:
 
-.. click:: buildstream._frontend.cli:shell
+.. click:: buildstream2._frontend.cli:shell
    :prog: bst shell
 
 ----
 
 .. _invoking_source:
 
-.. click:: buildstream._frontend.cli:source
+.. click:: buildstream2._frontend.cli:source
    :prog: bst source
 
 ----
 
 .. _invoking_workspace:
 
-.. click:: buildstream._frontend.cli:workspace
+.. click:: buildstream2._frontend.cli:workspace
    :prog: bst workspace
 
 
@@ -77,35 +77,35 @@ Artifact subcommands
 
 .. _invoking_artifact_checkout:
 
-.. click:: buildstream._frontend.cli:artifact_checkout
+.. click:: buildstream2._frontend.cli:artifact_checkout
    :prog: bst artifact checkout
 
 ----
 
 .. _invoking_artifact_log:
 
-.. click:: buildstream._frontend.cli:artifact_log
+.. click:: buildstream2._frontend.cli:artifact_log
    :prog: bst artifact log
 
 ----
 
 .. _invoking_artifact_pull:
 
-.. click:: buildstream._frontend.cli:artifact_pull
+.. click:: buildstream2._frontend.cli:artifact_pull
    :prog: bst artifact pull
 
 ----
 
 .. _invoking_artifact_push:
 
-.. click:: buildstream._frontend.cli:artifact_push
+.. click:: buildstream2._frontend.cli:artifact_push
    :prog: bst artifact push
 
 ----
 
 .. _invoking_artifact_delete:
 
-.. click:: buildstream._frontend.cli:artifact_delete
+.. click:: buildstream2._frontend.cli:artifact_delete
    :prog: bst artifact delete
 
 
@@ -114,21 +114,21 @@ Source subcommands
 
 .. _invoking_source_fetch:
 
-.. click:: buildstream._frontend.cli:source_fetch
+.. click:: buildstream2._frontend.cli:source_fetch
    :prog: bst source fetch
 
 ----
 
 .. _invoking_source_track:
 
-.. click:: buildstream._frontend.cli:source_track
+.. click:: buildstream2._frontend.cli:source_track
    :prog: bst source track
 
 ----
 
 .. _invoking_source_checkout:
 
-.. click:: buildstream._frontend.cli:source_checkout
+.. click:: buildstream2._frontend.cli:source_checkout
    :prog: bst source checkout
 
 
@@ -137,26 +137,26 @@ Workspace subcommands
 
 .. _invoking_workspace_open:
 
-.. click:: buildstream._frontend.cli:workspace_open
+.. click:: buildstream2._frontend.cli:workspace_open
    :prog: bst workspace open
 
 ----
 
 .. _invoking_workspace_close:
 
-.. click:: buildstream._frontend.cli:workspace_close
+.. click:: buildstream2._frontend.cli:workspace_close
    :prog: bst workspace close
 
 ----
 
 .. _invoking_workspace_reset:
 
-.. click:: buildstream._frontend.cli:workspace_reset
+.. click:: buildstream2._frontend.cli:workspace_reset
    :prog: bst workspace reset
 
 ----
 
 .. _invoking_workspace_list:
 
-.. click:: buildstream._frontend.cli:workspace_list
+.. click:: buildstream2._frontend.cli:workspace_list
    :prog: bst workspace list
diff --git a/doc/source/using_config.rst b/doc/source/using_config.rst
index 58ef160..f8ef934 100644
--- a/doc/source/using_config.rst
+++ b/doc/source/using_config.rst
@@ -282,5 +282,5 @@ Default configuration
 ---------------------
 The default BuildStream configuration is specified here for reference:
 
-  .. literalinclude:: ../../buildstream/data/userconfig.yaml
+  .. literalinclude:: ../../buildstream2/data/userconfig.yaml
      :language: yaml
diff --git a/doc/source/using_configuring_artifact_server.rst b/doc/source/using_configuring_artifact_server.rst
index da61f0f..f1c8563 100644
--- a/doc/source/using_configuring_artifact_server.rst
+++ b/doc/source/using_configuring_artifact_server.rst
@@ -94,7 +94,7 @@ requiring BuildStream's more exigent dependencies by setting the
 Command reference
 ~~~~~~~~~~~~~~~~~
 
-.. click:: buildstream._cas.casserver:server_main
+.. click:: buildstream2._cas.casserver:server_main
    :prog: bst-artifact-server
 
 
diff --git a/setup.cfg b/setup.cfg
index efdca70..81b338f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,8 +1,8 @@
 [versioneer]
 VCS = git
 style = pep440
-versionfile_source = buildstream/_version.py
-versionfile_build = buildstream/_version.py
+versionfile_source = buildstream2/_version.py
+versionfile_build = buildstream2/_version.py
 tag_prefix =
 tag_regex = *.*.*
 parentdir_prefix = BuildStream-
@@ -23,4 +23,4 @@ env =
 [pycodestyle]
 max-line-length = 119
 ignore = E129,E125,W504,W605
-exclude = .git/**,.tox/**,.eggs/**,build/**,doc/source/conf.py,buildstream/_fuse/fuse.py,buildstream/_protos/**/*py,tmp/**
+exclude = .git/**,.tox/**,.eggs/**,build/**,doc/source/conf.py,buildstream2/_fuse/fuse.py,buildstream2/_protos/**/*py,tmp/**
diff --git a/setup.py b/setup.py
index 0154b4e..02cc29e 100755
--- a/setup.py
+++ b/setup.py
@@ -127,14 +127,14 @@ def list_man_pages():
 # So screw it, lets just use an env var.
 bst_install_entry_points = {
     'console_scripts': [
-        'bst-artifact-server = buildstream._cas.casserver:server_main'
+        'bst-artifact-server = buildstream2._cas.casserver:server_main'
     ],
 }
 
 if not os.environ.get('BST_ARTIFACTS_ONLY', ''):
     check_for_bwrap()
     bst_install_entry_points['console_scripts'] += [
-        'bst = buildstream._frontend:cli'
+        'bst = buildstream2._frontend:cli'
     ]
 
 #####################################################
@@ -200,7 +200,7 @@ class BuildGRPC(Command):
                   "Install it via pip (pip3 install grpcio-tools).")
             exit(1)
 
-        protos_root = 'buildstream/_protos'
+        protos_root = 'buildstream2/_protos'
 
         grpc_tools.command.build_package_protos(protos_root)
 
@@ -213,10 +213,10 @@ class BuildGRPC(Command):
                         code = f.read()
 
                     # All protos are in buildstream._protos
-                    code = re.sub(r'^from ', r'from buildstream._protos.',
+                    code = re.sub(r'^from ', r'from buildstream2._protos.',
                                   code, flags=re.MULTILINE)
                     # Except for the core google.protobuf protos
-                    code = re.sub(r'^from buildstream._protos.google.protobuf', r'from google.protobuf',
+                    code = re.sub(r'^from buildstream2._protos.google.protobuf', r'from google.protobuf',
                                   code, flags=re.MULTILINE)
 
                     with open(path, 'w') as f:
@@ -290,7 +290,7 @@ with open(os.path.join(os.path.dirname(os.path.realpath(__file__)),
 #####################################################
 #             Main setup() Invocation               #
 #####################################################
-setup(name='BuildStream',
+setup(name='BuildStream2',
       # Use versioneer
       version=versioneer.get_version(),
       cmdclass=get_cmdclass(),
@@ -321,8 +321,8 @@ setup(name='BuildStream',
       },
       python_requires='~={}.{}'.format(REQUIRED_PYTHON_MAJOR, REQUIRED_PYTHON_MINOR),
       packages=find_packages(exclude=('tests', 'tests.*')),
-      package_data={'buildstream': ['plugins/*/*.py', 'plugins/*/*.yaml',
-                                    'data/*.yaml', 'data/*.sh.in']},
+      package_data={'buildstream2': ['plugins/*/*.py', 'plugins/*/*.yaml',
+                                     'data/*.yaml', 'data/*.sh.in']},
       include_package_data=True,
       data_files=[
           # This is a weak attempt to integrate with the user nicely,
@@ -338,7 +338,7 @@ setup(name='BuildStream',
           #
           ('share/man/man1', list_man_pages()),
           ('share/bash-completion/completions', [
-              os.path.join('buildstream', 'data', 'bst')
+              os.path.join('buildstream2', 'data', 'bst')
           ])
       ],
       install_requires=install_requires,
diff --git a/tests/artifactcache/artifactservice.py b/tests/artifactcache/artifactservice.py
index 5a7a3cd..4f7146f 100644
--- a/tests/artifactcache/artifactservice.py
+++ b/tests/artifactcache/artifactservice.py
@@ -22,14 +22,14 @@ from urllib.parse import urlparse
 
 import grpc
 
-from buildstream._protos.buildstream.v2.artifact_pb2 \
+from buildstream2._protos.buildstream.v2.artifact_pb2 \
     import Artifact, GetArtifactRequest, UpdateArtifactRequest
-from buildstream._protos.buildstream.v2.artifact_pb2_grpc import ArtifactServiceStub
-from buildstream._protos.build.bazel.remote.execution.v2 \
+from buildstream2._protos.buildstream.v2.artifact_pb2_grpc import ArtifactServiceStub
+from buildstream2._protos.build.bazel.remote.execution.v2 \
     import remote_execution_pb2 as re_pb2
-from buildstream._protos.build.bazel.remote.execution.v2 \
+from buildstream2._protos.build.bazel.remote.execution.v2 \
     import remote_execution_pb2_grpc as re_pb2_grpc
-from buildstream import utils
+from buildstream2 import utils
 
 from tests.testutils.artifactshare import create_artifact_share
 
diff --git a/tests/artifactcache/cache_size.py b/tests/artifactcache/cache_size.py
index 09f0f25..1209802 100644
--- a/tests/artifactcache/cache_size.py
+++ b/tests/artifactcache/cache_size.py
@@ -1,10 +1,10 @@
 import os
 from unittest import mock
 
-from buildstream import _yaml
-from buildstream._cas.cascache import CACHE_SIZE_FILE
-from buildstream._exceptions import ErrorDomain
-from buildstream.testing import cli
+from buildstream2 import _yaml
+from buildstream2._cas.cascache import CACHE_SIZE_FILE
+from buildstream2._exceptions import ErrorDomain
+from buildstream2.testing import cli
 
 from tests.testutils import create_element_size
 
@@ -77,7 +77,7 @@ def test_quota_over_1024T(cli, tmpdir):
     _yaml.dump({'name': 'main'}, str(project.join("project.conf")))
 
     volume_space_patch = mock.patch(
-        "buildstream._cas.CASQuota._get_cache_volume_size",
+        "buildstream2._cas.CASQuota._get_cache_volume_size",
         autospec=True,
         return_value=(1025 * TiB, 1025 * TiB)
     )
diff --git a/tests/artifactcache/config.py b/tests/artifactcache/config.py
index 8adbb32..1eceef5 100644
--- a/tests/artifactcache/config.py
+++ b/tests/artifactcache/config.py
@@ -3,14 +3,14 @@ import pytest
 import itertools
 import os
 
-from buildstream._artifactcache import ArtifactCacheSpec, ArtifactCache
-from buildstream._context import Context
-from buildstream._project import Project
-from buildstream.utils import _deduplicate
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-
-from buildstream.testing.runcli import cli
+from buildstream2._artifactcache import ArtifactCacheSpec, ArtifactCache
+from buildstream2._context import Context
+from buildstream2._project import Project
+from buildstream2.utils import _deduplicate
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+
+from buildstream2.testing.runcli import cli
 
 
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/artifactcache/expiry.py b/tests/artifactcache/expiry.py
index 6aa518f..1c98128 100644
--- a/tests/artifactcache/expiry.py
+++ b/tests/artifactcache/expiry.py
@@ -23,8 +23,8 @@ from unittest import mock
 
 import pytest
 
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing import cli
 
 from tests.testutils import create_element_size, update_element_size, wait_for_cache_granularity
 
@@ -370,13 +370,13 @@ def test_invalid_cache_quota(cli, datafiles, quota, err_domain, err_reason):
         total_space = 10000
 
     volume_space_patch = mock.patch(
-        "buildstream.utils._get_volume_size",
+        "buildstream2.utils._get_volume_size",
         autospec=True,
         return_value=(total_space, free_space),
     )
 
     cache_size_patch = mock.patch(
-        "buildstream._cas.CASQuota.get_cache_size",
+        "buildstream2._cas.CASQuota.get_cache_size",
         autospec=True,
         return_value=0,
     )
diff --git a/tests/artifactcache/junctions.py b/tests/artifactcache/junctions.py
index 1eb67b6..61913b0 100644
--- a/tests/artifactcache/junctions.py
+++ b/tests/artifactcache/junctions.py
@@ -2,8 +2,8 @@ import os
 import shutil
 import pytest
 
-from buildstream import _yaml
-from buildstream.testing import cli
+from buildstream2 import _yaml
+from buildstream2.testing import cli
 
 from tests.testutils import create_artifact_share
 
diff --git a/tests/artifactcache/pull.py b/tests/artifactcache/pull.py
index 96fdef8..e5437fe 100644
--- a/tests/artifactcache/pull.py
+++ b/tests/artifactcache/pull.py
@@ -4,11 +4,11 @@ import signal
 
 import pytest
 
-from buildstream import _yaml, _signals, utils
-from buildstream._context import Context
-from buildstream._project import Project
-from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
-from buildstream.testing import cli
+from buildstream2 import _yaml, _signals, utils
+from buildstream2._context import Context
+from buildstream2._project import Project
+from buildstream2._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
+from buildstream2.testing import cli
 
 from tests.testutils import create_artifact_share
 
diff --git a/tests/artifactcache/push.py b/tests/artifactcache/push.py
index 7c117e3..295f4fe 100644
--- a/tests/artifactcache/push.py
+++ b/tests/artifactcache/push.py
@@ -4,12 +4,12 @@ import signal
 
 import pytest
 
-from buildstream import _yaml, _signals, utils
-from buildstream._context import Context
-from buildstream._project import Project
-from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
-from buildstream.storage._casbaseddirectory import CasBasedDirectory
-from buildstream.testing import cli
+from buildstream2 import _yaml, _signals, utils
+from buildstream2._context import Context
+from buildstream2._project import Project
+from buildstream2._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
+from buildstream2.storage._casbaseddirectory import CasBasedDirectory
+from buildstream2.testing import cli
 from tests.testutils import create_artifact_share
 
 
diff --git a/tests/cachekey/cachekey.py b/tests/cachekey/cachekey.py
index 671bbb3..f871f84 100644
--- a/tests/cachekey/cachekey.py
+++ b/tests/cachekey/cachekey.py
@@ -44,9 +44,9 @@ import os
 
 import pytest
 
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
-from buildstream.plugin import CoreWarnings
-from buildstream import _yaml
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2.plugin import CoreWarnings
+from buildstream2 import _yaml
 from tests.testutils.site import HAVE_BZR, HAVE_GIT, HAVE_OSTREE, IS_LINUX, MACHINE_ARCH
 
 
diff --git a/tests/cachekey/update.py b/tests/cachekey/update.py
index 68016ed..db9e707 100755
--- a/tests/cachekey/update.py
+++ b/tests/cachekey/update.py
@@ -13,7 +13,7 @@
 #
 import os
 import tempfile
-from buildstream.testing.runcli import Cli
+from buildstream2.testing.runcli import Cli
 
 # This weird try / except is needed, because this will be imported differently
 # when pytest runner imports them vs when you run the updater directly from
diff --git a/tests/conftest.py b/tests/conftest.py
index 9b8ff24..5b0b1b2 100755
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -23,8 +23,8 @@ import os
 import shutil
 import tempfile
 import pytest
-from buildstream._platform.platform import Platform
-from buildstream.testing import register_repo_kind, sourcetests_collection_hook
+from buildstream2._platform.platform import Platform
+from buildstream2.testing import register_repo_kind, sourcetests_collection_hook
 
 from tests.testutils.repo.git import Git
 from tests.testutils.repo.bzr import Bzr
@@ -32,7 +32,6 @@ from tests.testutils.repo.ostree import OSTree
 from tests.testutils.repo.tar import Tar
 from tests.testutils.repo.zip import Zip
 
-
 #
 # This file is loaded by pytest, we use it to add a custom
 # `--integration` option to our test suite, and to install
diff --git a/tests/elements/filter.py b/tests/elements/filter.py
index d89c834..8da5575 100644
--- a/tests/elements/filter.py
+++ b/tests/elements/filter.py
@@ -6,10 +6,10 @@ import shutil
 
 import pytest
 
-from buildstream.testing import create_repo
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream._exceptions import ErrorDomain
-from buildstream import _yaml
+from buildstream2.testing import create_repo
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain
+from buildstream2 import _yaml
 
 DATA_DIR = os.path.join(
     os.path.dirname(os.path.realpath(__file__)),
diff --git a/tests/elements/filter/basic/element_plugins/dynamic.py b/tests/elements/filter/basic/element_plugins/dynamic.py
index c6d128b..7db45f6 100644
--- a/tests/elements/filter/basic/element_plugins/dynamic.py
+++ b/tests/elements/filter/basic/element_plugins/dynamic.py
@@ -1,4 +1,4 @@
-from buildstream import Element, Scope
+from buildstream2 import Element, Scope
 
 
 # Copies files from the dependent element but inserts split-rules using dynamic data
diff --git a/tests/examples/autotools.py b/tests/examples/autotools.py
index 03b98a5..18ba77e 100644
--- a/tests/examples/autotools.py
+++ b/tests/examples/autotools.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
+from buildstream2.testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream2.testing.integration import assert_contains
 from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH
 
 pytestmark = pytest.mark.integration
diff --git a/tests/examples/developing.py b/tests/examples/developing.py
index 6e17a7b..abf9366 100644
--- a/tests/examples/developing.py
+++ b/tests/examples/developing.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
+from buildstream2.testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream2.testing.integration import assert_contains
 import tests.testutils.patch as patch
 from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH
 
diff --git a/tests/examples/first-project.py b/tests/examples/first-project.py
index d95c829..60d4cda 100644
--- a/tests/examples/first-project.py
+++ b/tests/examples/first-project.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
+from buildstream2.testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream2.testing.integration import assert_contains
 from tests.testutils.site import IS_LINUX
 
 
diff --git a/tests/examples/flatpak-autotools.py b/tests/examples/flatpak-autotools.py
index 8af564e..3ea2e8d 100644
--- a/tests/examples/flatpak-autotools.py
+++ b/tests/examples/flatpak-autotools.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
+from buildstream2.testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream2.testing.integration import assert_contains
 from tests.testutils.site import HAVE_OSTREE, IS_LINUX, MACHINE_ARCH
 
 
diff --git a/tests/examples/integration-commands.py b/tests/examples/integration-commands.py
index ad51196..b4eba06 100644
--- a/tests/examples/integration-commands.py
+++ b/tests/examples/integration-commands.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream2.testing import cli_integration as cli  # pylint: disable=unused-import
 from tests.testutils.site import HAVE_BWRAP, IS_LINUX, MACHINE_ARCH
 
 
diff --git a/tests/examples/junctions.py b/tests/examples/junctions.py
index 695bfe8..abc9126 100644
--- a/tests/examples/junctions.py
+++ b/tests/examples/junctions.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream2.testing import cli_integration as cli  # pylint: disable=unused-import
 from tests.testutils.site import IS_LINUX, HAVE_BWRAP, MACHINE_ARCH
 
 pytestmark = pytest.mark.integration
diff --git a/tests/examples/running-commands.py b/tests/examples/running-commands.py
index 7089f14..984fbb6 100644
--- a/tests/examples/running-commands.py
+++ b/tests/examples/running-commands.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream2.testing import cli_integration as cli  # pylint: disable=unused-import
 from tests.testutils.site import IS_LINUX, HAVE_BWRAP, MACHINE_ARCH
 
 
diff --git a/tests/format/assertion.py b/tests/format/assertion.py
index 7e87977..ca9945e 100644
--- a/tests/format/assertion.py
+++ b/tests/format/assertion.py
@@ -3,8 +3,8 @@
 
 import os
 import pytest
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(
diff --git a/tests/format/dependencies.py b/tests/format/dependencies.py
index 15b6e1f..7a9ca75 100644
--- a/tests/format/dependencies.py
+++ b/tests/format/dependencies.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing import cli  # pylint: disable=unused-import
 
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
 
diff --git a/tests/format/include.py b/tests/format/include.py
index bfadce7..4b1da92 100644
--- a/tests/format/include.py
+++ b/tests/format/include.py
@@ -4,10 +4,10 @@
 import os
 import textwrap
 import pytest
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import create_repo
 from tests.testutils import generate_junction
 
 
diff --git a/tests/format/include_composition.py b/tests/format/include_composition.py
index 4afde81..00097ea 100644
--- a/tests/format/include_composition.py
+++ b/tests/format/include_composition.py
@@ -1,8 +1,8 @@
 import os
-from buildstream._context import Context
-from buildstream._project import Project
-from buildstream._includes import Includes
-from buildstream import _yaml
+from buildstream2._context import Context
+from buildstream2._project import Project
+from buildstream2._includes import Includes
+from buildstream2 import _yaml
 
 
 def make_includes(basedir):
diff --git a/tests/format/junctions.py b/tests/format/junctions.py
index 3089143..9a7db8f 100644
--- a/tests/format/junctions.py
+++ b/tests/format/junctions.py
@@ -6,10 +6,10 @@ import shutil
 
 import pytest
 
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import create_repo
 from tests.testutils.site import HAVE_GIT
 
 
diff --git a/tests/format/listdirectiveerrors.py b/tests/format/listdirectiveerrors.py
index 269b521..8d7b779 100644
--- a/tests/format/listdirectiveerrors.py
+++ b/tests/format/listdirectiveerrors.py
@@ -3,8 +3,8 @@
 
 import os
 import pytest
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/optionarch.py b/tests/format/optionarch.py
index a35ac68..c6493d9 100644
--- a/tests/format/optionarch.py
+++ b/tests/format/optionarch.py
@@ -5,9 +5,9 @@ import os
 
 import pytest
 
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 from tests.testutils import override_platform_uname
 
diff --git a/tests/format/optionbool.py b/tests/format/optionbool.py
index 0d1ee60..027414a 100644
--- a/tests/format/optionbool.py
+++ b/tests/format/optionbool.py
@@ -3,9 +3,9 @@
 
 import os
 import pytest
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/optioneltmask.py b/tests/format/optioneltmask.py
index d33b577..26a4d96 100644
--- a/tests/format/optioneltmask.py
+++ b/tests/format/optioneltmask.py
@@ -3,9 +3,9 @@
 
 import os
 import pytest
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/optionenum.py b/tests/format/optionenum.py
index b8a96b0..2796489 100644
--- a/tests/format/optionenum.py
+++ b/tests/format/optionenum.py
@@ -3,9 +3,9 @@
 
 import os
 import pytest
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/optionexports.py b/tests/format/optionexports.py
index 5df7522..e894c9e 100644
--- a/tests/format/optionexports.py
+++ b/tests/format/optionexports.py
@@ -3,8 +3,8 @@
 
 import os
 import pytest
-from buildstream import _yaml
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/optionflags.py b/tests/format/optionflags.py
index e28c542..a50bba9 100644
--- a/tests/format/optionflags.py
+++ b/tests/format/optionflags.py
@@ -3,9 +3,9 @@
 
 import os
 import pytest
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/optionos.py b/tests/format/optionos.py
index 57277b1..d627530 100644
--- a/tests/format/optionos.py
+++ b/tests/format/optionos.py
@@ -5,9 +5,9 @@ import os
 
 import pytest
 
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 from tests.testutils import override_platform_uname
 
diff --git a/tests/format/optionoverrides.py b/tests/format/optionoverrides.py
index 60d02b3..e336be5 100644
--- a/tests/format/optionoverrides.py
+++ b/tests/format/optionoverrides.py
@@ -3,8 +3,8 @@
 
 import os
 import pytest
-from buildstream import _yaml
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/options.py b/tests/format/options.py
index 3a8210d..bf33ad4 100644
--- a/tests/format/options.py
+++ b/tests/format/options.py
@@ -3,9 +3,9 @@
 
 import os
 import pytest
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(
diff --git a/tests/format/project.py b/tests/format/project.py
index fbb742d..4ddd1d8 100644
--- a/tests/format/project.py
+++ b/tests/format/project.py
@@ -3,9 +3,9 @@
 
 import os
 import pytest
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing import cli  # pylint: disable=unused-import
 
 from tests.testutils import filetypegenerator
 
diff --git a/tests/format/project/duplicate-plugins/bar/foo.py b/tests/format/project/duplicate-plugins/bar/foo.py
index 260de8b..35e597a 100644
--- a/tests/format/project/duplicate-plugins/bar/foo.py
+++ b/tests/format/project/duplicate-plugins/bar/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 
 class FooElement(Element):
diff --git a/tests/format/project/duplicate-plugins/bar/frob.py b/tests/format/project/duplicate-plugins/bar/frob.py
index 3e2b5ec..a59a002 100644
--- a/tests/format/project/duplicate-plugins/bar/frob.py
+++ b/tests/format/project/duplicate-plugins/bar/frob.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 
 class FrobElement(Element):
diff --git a/tests/format/project/duplicate-plugins/baz/foo.py b/tests/format/project/duplicate-plugins/baz/foo.py
index 260de8b..35e597a 100644
--- a/tests/format/project/duplicate-plugins/baz/foo.py
+++ b/tests/format/project/duplicate-plugins/baz/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 
 class FooElement(Element):
diff --git a/tests/format/project/duplicate-plugins/baz/frob.py b/tests/format/project/duplicate-plugins/baz/frob.py
index 3e2b5ec..a59a002 100644
--- a/tests/format/project/duplicate-plugins/baz/frob.py
+++ b/tests/format/project/duplicate-plugins/baz/frob.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 
 class FrobElement(Element):
diff --git a/tests/format/project/plugin-allowed/plugins/foo.py b/tests/format/project/plugin-allowed/plugins/foo.py
index bf88423..ecb253a 100644
--- a/tests/format/project/plugin-allowed/plugins/foo.py
+++ b/tests/format/project/plugin-allowed/plugins/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 
 class FooElement(Element):
diff --git a/tests/format/project/plugin-forbidden/forbidden-plugins/forbidden-plugin.py b/tests/format/project/plugin-forbidden/forbidden-plugins/forbidden-plugin.py
index bf88423..ecb253a 100644
--- a/tests/format/project/plugin-forbidden/forbidden-plugins/forbidden-plugin.py
+++ b/tests/format/project/plugin-forbidden/forbidden-plugins/forbidden-plugin.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 
 class FooElement(Element):
diff --git a/tests/format/project/plugin-no-load-ref/plugins/noloadref.py b/tests/format/project/plugin-no-load-ref/plugins/noloadref.py
index 0cc457f..a7ce375 100644
--- a/tests/format/project/plugin-no-load-ref/plugins/noloadref.py
+++ b/tests/format/project/plugin-no-load-ref/plugins/noloadref.py
@@ -1,4 +1,4 @@
-from buildstream import Source, Consistency
+from buildstream2 import Source, Consistency
 
 
 # Just a dummy plugin which does not support the new load_ref() method.
diff --git a/tests/format/project/plugin-preflight-error/errorplugin/preflighterror.py b/tests/format/project/plugin-preflight-error/errorplugin/preflighterror.py
index 0eee463..38549bb 100644
--- a/tests/format/project/plugin-preflight-error/errorplugin/preflighterror.py
+++ b/tests/format/project/plugin-preflight-error/errorplugin/preflighterror.py
@@ -1,4 +1,4 @@
-from buildstream import Source, SourceError, Consistency
+from buildstream2 import Source, SourceError, Consistency
 
 
 class PreflightErrorSource(Source):
diff --git a/tests/format/projectoverrides.py b/tests/format/projectoverrides.py
index 4b0c3f4..1b71288 100644
--- a/tests/format/projectoverrides.py
+++ b/tests/format/projectoverrides.py
@@ -3,8 +3,8 @@
 
 import os
 import pytest
-from buildstream import _yaml
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(
diff --git a/tests/format/variables.py b/tests/format/variables.py
index 87e3b29..4a954eb 100644
--- a/tests/format/variables.py
+++ b/tests/format/variables.py
@@ -6,9 +6,9 @@ import sys
 
 import pytest
 
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 
 # Project directory
diff --git a/tests/frontend/__init__.py b/tests/frontend/__init__.py
index 8cf7625..45da670 100644
--- a/tests/frontend/__init__.py
+++ b/tests/frontend/__init__.py
@@ -1,5 +1,5 @@
 import os
-from buildstream import _yaml
+from buildstream2 import _yaml
 
 
 # Shared function to configure the project.conf inline
diff --git a/tests/frontend/artifact.py b/tests/frontend/artifact.py
index 10cb4f5..13d816c 100644
--- a/tests/frontend/artifact.py
+++ b/tests/frontend/artifact.py
@@ -24,7 +24,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import cli  # pylint: disable=unused-import
 from tests.testutils import create_artifact_share
 
 
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py
index b181e29..41b763d 100644
--- a/tests/frontend/buildcheckout.py
+++ b/tests/frontend/buildcheckout.py
@@ -11,9 +11,9 @@ import pytest
 from tests.testutils.site import IS_WINDOWS
 from tests.testutils import generate_junction, yaml_file_get_provenance
 
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
 
 from . import configure_project
 
diff --git a/tests/frontend/buildtrack.py b/tests/frontend/buildtrack.py
index 404882b..17f93e8 100644
--- a/tests/frontend/buildtrack.py
+++ b/tests/frontend/buildtrack.py
@@ -8,10 +8,10 @@ import itertools
 
 import pytest
 
-from buildstream import _yaml
-from buildstream.testing import create_repo
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2.testing import create_repo
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain
 
 from . import configure_project
 
diff --git a/tests/frontend/completions.py b/tests/frontend/completions.py
index 773eec0..4b5a9c6 100644
--- a/tests/frontend/completions.py
+++ b/tests/frontend/completions.py
@@ -3,7 +3,7 @@
 
 import os
 import pytest
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(
diff --git a/tests/frontend/compose_splits.py b/tests/frontend/compose_splits.py
index f1f9b73..8949af9 100644
--- a/tests/frontend/compose_splits.py
+++ b/tests/frontend/compose_splits.py
@@ -3,7 +3,7 @@
 
 import os
 import pytest
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(
diff --git a/tests/frontend/configurable_warnings.py b/tests/frontend/configurable_warnings.py
index c63a0b6..96accf0 100644
--- a/tests/frontend/configurable_warnings.py
+++ b/tests/frontend/configurable_warnings.py
@@ -5,10 +5,10 @@ import os
 
 import pytest
 
-from buildstream.plugin import CoreWarnings
-from buildstream._exceptions import ErrorDomain
-from buildstream import _yaml
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2.plugin import CoreWarnings
+from buildstream2._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 TOP_DIR = os.path.join(
     os.path.dirname(os.path.realpath(__file__)),
diff --git a/tests/frontend/configuredwarning/plugins/corewarn.py b/tests/frontend/configuredwarning/plugins/corewarn.py
index 1f263a0..06f2eac 100644
--- a/tests/frontend/configuredwarning/plugins/corewarn.py
+++ b/tests/frontend/configuredwarning/plugins/corewarn.py
@@ -1,5 +1,5 @@
-from buildstream import Element
-from buildstream.plugin import CoreWarnings
+from buildstream2 import Element
+from buildstream2.plugin import CoreWarnings
 
 
 class CoreWarn(Element):
diff --git a/tests/frontend/configuredwarning/plugins/warninga.py b/tests/frontend/configuredwarning/plugins/warninga.py
index 9fd8dc6..cef4466 100644
--- a/tests/frontend/configuredwarning/plugins/warninga.py
+++ b/tests/frontend/configuredwarning/plugins/warninga.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 WARNING_A = "warning-a"
 
diff --git a/tests/frontend/configuredwarning/plugins/warningb.py b/tests/frontend/configuredwarning/plugins/warningb.py
index 64d25ef..be8e3ff 100644
--- a/tests/frontend/configuredwarning/plugins/warningb.py
+++ b/tests/frontend/configuredwarning/plugins/warningb.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 WARNING_B = "warning-b"
 
diff --git a/tests/frontend/consistencyerror/plugins/consistencybug.py b/tests/frontend/consistencyerror/plugins/consistencybug.py
index 3c6fb46..de96222 100644
--- a/tests/frontend/consistencyerror/plugins/consistencybug.py
+++ b/tests/frontend/consistencyerror/plugins/consistencybug.py
@@ -1,4 +1,4 @@
-from buildstream import Source
+from buildstream2 import Source
 
 
 class ConsistencyBugSource(Source):
diff --git a/tests/frontend/consistencyerror/plugins/consistencyerror.py b/tests/frontend/consistencyerror/plugins/consistencyerror.py
index fe2037f..030e441 100644
--- a/tests/frontend/consistencyerror/plugins/consistencyerror.py
+++ b/tests/frontend/consistencyerror/plugins/consistencyerror.py
@@ -1,4 +1,4 @@
-from buildstream import Source, SourceError
+from buildstream2 import Source, SourceError
 
 
 class ConsistencyErrorSource(Source):
diff --git a/tests/frontend/cross_junction_workspace.py b/tests/frontend/cross_junction_workspace.py
index 81fd434..e302b32 100644
--- a/tests/frontend/cross_junction_workspace.py
+++ b/tests/frontend/cross_junction_workspace.py
@@ -2,9 +2,9 @@
 # pylint: disable=redefined-outer-name
 
 import os
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
-from buildstream import _yaml
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import create_repo
+from buildstream2 import _yaml
 
 
 def prepare_junction_project(cli, tmpdir):
diff --git a/tests/frontend/fetch.py b/tests/frontend/fetch.py
index e330cd4..18c176b 100644
--- a/tests/frontend/fetch.py
+++ b/tests/frontend/fetch.py
@@ -5,10 +5,10 @@ import os
 import pytest
 
 from tests.testutils import generate_junction, yaml_file_get_provenance
-from buildstream.testing import create_repo
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing import create_repo
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
 
 from . import configure_project
 
diff --git a/tests/frontend/help.py b/tests/frontend/help.py
index 3bc1849..6dee679 100644
--- a/tests/frontend/help.py
+++ b/tests/frontend/help.py
@@ -2,7 +2,7 @@
 # pylint: disable=redefined-outer-name
 
 import pytest
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 
 def assert_help(cli_output):
diff --git a/tests/frontend/init.py b/tests/frontend/init.py
index fa4623c..f77cbae 100644
--- a/tests/frontend/init.py
+++ b/tests/frontend/init.py
@@ -3,12 +3,12 @@
 
 import os
 import pytest
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import cli  # pylint: disable=unused-import
 
-from buildstream import _yaml
-from buildstream._frontend.app import App
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream._versions import BST_FORMAT_VERSION
+from buildstream2 import _yaml
+from buildstream2._frontend.app import App
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2._versions import BST_FORMAT_VERSION
 
 
 def test_defaults(cli, tmpdir):
diff --git a/tests/frontend/logging.py b/tests/frontend/logging.py
index e7279ac..63a151c 100644
--- a/tests/frontend/logging.py
+++ b/tests/frontend/logging.py
@@ -6,11 +6,11 @@ import re
 
 import pytest
 
-from buildstream.testing import create_repo
+from buildstream2.testing import create_repo
 
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain
+from buildstream2.testing import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(
diff --git a/tests/frontend/main.py b/tests/frontend/main.py
index 0df52e2..f06b66b 100644
--- a/tests/frontend/main.py
+++ b/tests/frontend/main.py
@@ -1,7 +1,7 @@
 import click
 import pytest
 
-from buildstream._frontend.app import _prefix_choice_value_proc
+from buildstream2._frontend.app import _prefix_choice_value_proc
 
 
 def test_prefix_choice_value_proc_full_match():
diff --git a/tests/frontend/mirror.py b/tests/frontend/mirror.py
index f7427cf..499375d 100644
--- a/tests/frontend/mirror.py
+++ b/tests/frontend/mirror.py
@@ -4,9 +4,9 @@
 import os
 import pytest
 
-from buildstream import _yaml
-from buildstream.testing import create_repo
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2.testing import create_repo
+from buildstream2.testing import cli  # pylint: disable=unused-import
 
 
 # Project directory
diff --git a/tests/frontend/order.py b/tests/frontend/order.py
index 7f354c8..9a93204 100644
--- a/tests/frontend/order.py
+++ b/tests/frontend/order.py
@@ -4,9 +4,9 @@
 import os
 
 import pytest
-from buildstream.testing import create_repo
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream import _yaml
+from buildstream2.testing import create_repo
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
 
 # Project directory
 DATA_DIR = os.path.join(
diff --git a/tests/frontend/overlaps.py b/tests/frontend/overlaps.py
index 6f6ab26..7cc4930 100644
--- a/tests/frontend/overlaps.py
+++ b/tests/frontend/overlaps.py
@@ -3,10 +3,10 @@
 
 import os
 import pytest
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
-from buildstream._exceptions import ErrorDomain
-from buildstream import _yaml
-from buildstream.plugin import CoreWarnings
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2.plugin import CoreWarnings
 from tests.testutils import generate_junction
 
 # Project directory
diff --git a/tests/frontend/project/sources/fetch_source.py b/tests/frontend/project/sources/fetch_source.py
index f17c140..d431446 100644
--- a/tests/frontend/project/sources/fetch_source.py
+++ b/tests/frontend/project/sources/fetch_source.py
@@ -1,6 +1,6 @@
 import os
 
-from buildstream import Source, Consistency, SourceError, SourceFetcher
+from buildstream2 import Source, Consistency, SourceError, SourceFetcher
 
 # Expected config
 # sources:
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py
index cc62afe..e3e6735 100644
--- a/tests/frontend/pull.py
+++ b/tests/frontend/pull.py
@@ -5,8 +5,8 @@ import os
 import shutil
 import stat
 import pytest
-from buildstream import utils
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2 import utils
+from buildstream2.testing import cli  # pylint: disable=unused-import
 from tests.testutils import create_artifact_share, generate_junction
 
 
diff --git a/tests/frontend/push.py b/tests/frontend/push.py
index 67c53f2..97c0533 100644
--- a/tests/frontend/push.py
+++ b/tests/frontend/push.py
@@ -26,8 +26,8 @@
 import os
 import pytest
 
-from buildstream._exceptions import ErrorDomain
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain
+from buildstream2.testing import cli  # pylint: disable=unused-import
 from tests.testutils import create_artifact_share, create_element_size, generate_junction, wait_for_cache_granularity
 
 
diff --git a/tests/frontend/rebuild.py b/tests/frontend/rebuild.py
index 1cdb45d..b8ffe9f 100644
--- a/tests/frontend/rebuild.py
+++ b/tests/frontend/rebuild.py
@@ -3,7 +3,7 @@
 
 import os
 import pytest
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(
diff --git a/tests/frontend/remote-caches.py b/tests/frontend/remote-caches.py
index e3f10e6..3c24773 100644
--- a/tests/frontend/remote-caches.py
+++ b/tests/frontend/remote-caches.py
@@ -23,8 +23,8 @@ import os
 import shutil
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream import _yaml
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
 
 from tests.testutils import create_artifact_share, create_element_size
 
diff --git a/tests/frontend/show.py b/tests/frontend/show.py
index 5acb993..1203e60 100644
--- a/tests/frontend/show.py
+++ b/tests/frontend/show.py
@@ -7,9 +7,9 @@ import shutil
 import itertools
 import pytest
 from tests.testutils import generate_junction, yaml_file_get_provenance
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
 
 from . import configure_project
 
diff --git a/tests/frontend/source_checkout.py b/tests/frontend/source_checkout.py
index 0bedfe1..3eb63ab 100644
--- a/tests/frontend/source_checkout.py
+++ b/tests/frontend/source_checkout.py
@@ -6,10 +6,10 @@ import tarfile
 
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import cli  # pylint: disable=unused-import
 
-from buildstream import utils, _yaml
-from buildstream._exceptions import ErrorDomain
+from buildstream2 import utils, _yaml
+from buildstream2._exceptions import ErrorDomain
 
 # Project directory
 DATA_DIR = os.path.join(
diff --git a/tests/frontend/track.py b/tests/frontend/track.py
index 808bf05..0eb1e96 100644
--- a/tests/frontend/track.py
+++ b/tests/frontend/track.py
@@ -5,10 +5,10 @@ import stat
 import os
 import pytest
 
-from buildstream.testing import create_repo
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream import _yaml
+from buildstream2.testing import create_repo
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2 import _yaml
 from tests.testutils import generate_junction, yaml_file_get_provenance
 from . import configure_project
 
diff --git a/tests/frontend/version.py b/tests/frontend/version.py
index e7db199..c557a03 100644
--- a/tests/frontend/version.py
+++ b/tests/frontend/version.py
@@ -1,11 +1,11 @@
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 
 # For utils.get_bst_version()
-from buildstream import utils
+from buildstream2 import utils
 
 
 def assert_version(cli_version_output):
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index 1db23cc..c5806a2 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -36,11 +36,11 @@ import pytest
 
 from tests.testutils import create_artifact_share, create_element_size, wait_for_cache_granularity
 
-from buildstream.testing import create_repo, ALL_REPO_KINDS
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream._workspaces import BST_WORKSPACE_FORMAT_VERSION
+from buildstream2.testing import create_repo, ALL_REPO_KINDS
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2._workspaces import BST_WORKSPACE_FORMAT_VERSION
 
 repo_kinds = [(kind) for kind in ALL_REPO_KINDS]
 
diff --git a/tests/integration/artifact.py b/tests/integration/artifact.py
index a5e1f4d..f2dec97 100644
--- a/tests/integration/artifact.py
+++ b/tests/integration/artifact.py
@@ -24,11 +24,11 @@ import pytest
 import shutil
 import tempfile
 
-from buildstream import utils
-from buildstream.testing import cli_integration as cli
+from buildstream2 import utils
+from buildstream2.testing import cli_integration as cli
 from tests.testutils import create_artifact_share
 from tests.testutils.site import HAVE_SANDBOX
-from buildstream._cas import CASCache
+from buildstream2._cas import CASCache
 
 pytestmark = pytest.mark.integration
 
diff --git a/tests/integration/autotools.py b/tests/integration/autotools.py
index 80365b8..ab17eb6 100644
--- a/tests/integration/autotools.py
+++ b/tests/integration/autotools.py
@@ -1,8 +1,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli
-from buildstream.testing.integration import assert_contains
+from buildstream2.testing import cli_integration as cli
+from buildstream2.testing.integration import assert_contains
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/build-uid.py b/tests/integration/build-uid.py
index f2e50a3..0717683 100644
--- a/tests/integration/build-uid.py
+++ b/tests/integration/build-uid.py
@@ -1,7 +1,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli
+from buildstream2.testing import cli_integration as cli
 from tests.testutils.site import HAVE_BWRAP, IS_LINUX, HAVE_SANDBOX
 
 
diff --git a/tests/integration/cachedfail.py b/tests/integration/cachedfail.py
index 2817435..39740f9 100644
--- a/tests/integration/cachedfail.py
+++ b/tests/integration/cachedfail.py
@@ -1,9 +1,9 @@
 import os
 import pytest
 
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain
-from buildstream.testing import cli_integration as cli
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain
+from buildstream2.testing import cli_integration as cli
 
 from tests.conftest import clean_platform_cache
 from tests.testutils import create_artifact_share
diff --git a/tests/integration/cmake.py b/tests/integration/cmake.py
index a69b9cd..27e0ab6 100644
--- a/tests/integration/cmake.py
+++ b/tests/integration/cmake.py
@@ -1,8 +1,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli
-from buildstream.testing.integration import assert_contains
+from buildstream2.testing import cli_integration as cli
+from buildstream2.testing.integration import assert_contains
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/compose-symlinks.py b/tests/integration/compose-symlinks.py
index e510d95..0c8eada 100644
--- a/tests/integration/compose-symlinks.py
+++ b/tests/integration/compose-symlinks.py
@@ -1,7 +1,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli
+from buildstream2.testing import cli_integration as cli
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/compose.py b/tests/integration/compose.py
index dab05fd..df28336 100644
--- a/tests/integration/compose.py
+++ b/tests/integration/compose.py
@@ -1,10 +1,10 @@
 import os
 import pytest
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 
-from buildstream.testing import cli_integration as cli
-from buildstream.testing.integration import walk_dir
+from buildstream2.testing import cli_integration as cli
+from buildstream2.testing.integration import walk_dir
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/import.py b/tests/integration/import.py
index 26c8cf6..5496ce3 100644
--- a/tests/integration/import.py
+++ b/tests/integration/import.py
@@ -1,10 +1,10 @@
 import os
 import pytest
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 
-from buildstream.testing import cli_integration as cli
-from buildstream.testing.integration import walk_dir
+from buildstream2.testing import cli_integration as cli
+from buildstream2.testing.integration import walk_dir
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/make.py b/tests/integration/make.py
index f59c2b0..a06d468 100644
--- a/tests/integration/make.py
+++ b/tests/integration/make.py
@@ -1,8 +1,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli
-from buildstream.testing.integration import assert_contains
+from buildstream2.testing import cli_integration as cli
+from buildstream2.testing.integration import assert_contains
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/manual.py b/tests/integration/manual.py
index 0ba650b..f87ced5 100644
--- a/tests/integration/manual.py
+++ b/tests/integration/manual.py
@@ -1,9 +1,9 @@
 import os
 import pytest
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 
-from buildstream.testing import cli_integration as cli
+from buildstream2.testing import cli_integration as cli
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/messages.py b/tests/integration/messages.py
index 2211ea4..76d1e7d 100644
--- a/tests/integration/messages.py
+++ b/tests/integration/messages.py
@@ -20,9 +20,9 @@
 import os
 import pytest
 
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain
-from buildstream.testing import cli_integration as cli
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain
+from buildstream2.testing import cli_integration as cli
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/pip_element.py b/tests/integration/pip_element.py
index 9ef1631..c6cc44f 100644
--- a/tests/integration/pip_element.py
+++ b/tests/integration/pip_element.py
@@ -2,10 +2,10 @@ import os
 
 import pytest
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 
-from buildstream.testing import cli_integration as cli
-from buildstream.testing.integration import assert_contains
+from buildstream2.testing import cli_integration as cli
+from buildstream2.testing.integration import assert_contains
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/pip_source.py b/tests/integration/pip_source.py
index 645dad4..5bf34d2 100644
--- a/tests/integration/pip_source.py
+++ b/tests/integration/pip_source.py
@@ -1,10 +1,10 @@
 import os
 import pytest
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 
-from buildstream.testing import cli_integration as cli
-from buildstream.testing.integration import assert_contains
+from buildstream2.testing import cli_integration as cli
+from buildstream2.testing.integration import assert_contains
 from tests.testutils.python_repo import setup_pypi_repo
 from tests.testutils.site import HAVE_SANDBOX
 
diff --git a/tests/integration/pullbuildtrees.py b/tests/integration/pullbuildtrees.py
index 91acff4..7020902 100644
--- a/tests/integration/pullbuildtrees.py
+++ b/tests/integration/pullbuildtrees.py
@@ -7,10 +7,10 @@ import tempfile
 from tests.testutils import create_artifact_share
 from tests.testutils.site import HAVE_SANDBOX
 
-from buildstream import utils
-from buildstream.testing import cli, cli_integration as cli2
-from buildstream._cas import CASCache
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2 import utils
+from buildstream2.testing import cli, cli_integration as cli2
+from buildstream2._cas import CASCache
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
 
 
 DATA_DIR = os.path.join(
diff --git a/tests/integration/sandbox-bwrap.py b/tests/integration/sandbox-bwrap.py
index 549de4e..32846a0 100644
--- a/tests/integration/sandbox-bwrap.py
+++ b/tests/integration/sandbox-bwrap.py
@@ -1,9 +1,9 @@
 import os
 import pytest
 
-from buildstream._exceptions import ErrorDomain
+from buildstream2._exceptions import ErrorDomain
 
-from buildstream.testing import cli_integration as cli
+from buildstream2.testing import cli_integration as cli
 from tests.testutils.site import HAVE_BWRAP, HAVE_BWRAP_JSON_STATUS
 
 
diff --git a/tests/integration/script.py b/tests/integration/script.py
index acc752f..6dc9c80 100644
--- a/tests/integration/script.py
+++ b/tests/integration/script.py
@@ -1,8 +1,8 @@
 import os
 import pytest
 
-from buildstream import _yaml
-from buildstream.testing import cli_integration as cli
+from buildstream2 import _yaml
+from buildstream2.testing import cli_integration as cli
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/shell.py b/tests/integration/shell.py
index a9fb485..2e9fb6b 100644
--- a/tests/integration/shell.py
+++ b/tests/integration/shell.py
@@ -1,8 +1,8 @@
 import os
 import pytest
 
-from buildstream import _yaml
-from buildstream.testing import cli_integration as cli
+from buildstream2 import _yaml
+from buildstream2.testing import cli_integration as cli
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/shellbuildtrees.py b/tests/integration/shellbuildtrees.py
index 3d59c78..ff795f2 100644
--- a/tests/integration/shellbuildtrees.py
+++ b/tests/integration/shellbuildtrees.py
@@ -4,8 +4,8 @@ import shutil
 
 from tests.testutils import create_artifact_share
 from tests.testutils.site import HAVE_SANDBOX
-from buildstream.testing import cli, cli_integration
-from buildstream._exceptions import ErrorDomain
+from buildstream2.testing import cli, cli_integration
+from buildstream2._exceptions import ErrorDomain
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/sockets.py b/tests/integration/sockets.py
index af09c39..0318e2e 100644
--- a/tests/integration/sockets.py
+++ b/tests/integration/sockets.py
@@ -1,7 +1,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli
+from buildstream2.testing import cli_integration as cli
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/source-determinism.py b/tests/integration/source-determinism.py
index 5bb0941..c0f8838 100644
--- a/tests/integration/source-determinism.py
+++ b/tests/integration/source-determinism.py
@@ -1,9 +1,9 @@
 import os
 import pytest
 
-from buildstream import _yaml
-from buildstream.testing import cli_integration as cli
-from buildstream.testing import create_repo
+from buildstream2 import _yaml
+from buildstream2.testing import cli_integration as cli
+from buildstream2.testing import create_repo
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/stack.py b/tests/integration/stack.py
index 9cc917e..0e5770f 100644
--- a/tests/integration/stack.py
+++ b/tests/integration/stack.py
@@ -1,7 +1,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli
+from buildstream2.testing import cli_integration as cli
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/symlinks.py b/tests/integration/symlinks.py
index 02238ae..dd83ef8 100644
--- a/tests/integration/symlinks.py
+++ b/tests/integration/symlinks.py
@@ -1,7 +1,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli
+from buildstream2.testing import cli_integration as cli
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/integration/workspace.py b/tests/integration/workspace.py
index 4ee0050..d824e7a 100644
--- a/tests/integration/workspace.py
+++ b/tests/integration/workspace.py
@@ -1,8 +1,8 @@
 import os
 import pytest
 
-from buildstream import _yaml
-from buildstream.testing import cli_integration as cli
+from buildstream2 import _yaml
+from buildstream2.testing import cli_integration as cli
 from tests.testutils.site import HAVE_SANDBOX
 
 
diff --git a/tests/internals/context.py b/tests/internals/context.py
index 82d6001..518db3e 100644
--- a/tests/internals/context.py
+++ b/tests/internals/context.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream._context import Context
-from buildstream._exceptions import LoadError, LoadErrorReason
+from buildstream2._context import Context
+from buildstream2._exceptions import LoadError, LoadErrorReason
 
 DATA_DIR = os.path.join(
     os.path.dirname(os.path.realpath(__file__)),
diff --git a/tests/internals/loader.py b/tests/internals/loader.py
index 006b578..8ac0097 100644
--- a/tests/internals/loader.py
+++ b/tests/internals/loader.py
@@ -1,10 +1,10 @@
 import os
 import pytest
 
-from buildstream._exceptions import LoadError, LoadErrorReason
-from buildstream._context import Context
-from buildstream._project import Project
-from buildstream._loader import MetaElement
+from buildstream2._exceptions import LoadError, LoadErrorReason
+from buildstream2._context import Context
+from buildstream2._project import Project
+from buildstream2._loader import MetaElement
 
 
 DATA_DIR = os.path.join(
diff --git a/tests/internals/pluginfactory.py b/tests/internals/pluginfactory.py
index e9e6367..4ed8118 100644
--- a/tests/internals/pluginfactory.py
+++ b/tests/internals/pluginfactory.py
@@ -5,10 +5,10 @@ import os
 import pytest
 
 from pluginbase import PluginBase
-from buildstream._elementfactory import ElementFactory
-from buildstream._sourcefactory import SourceFactory
-from buildstream._exceptions import PluginError
-from buildstream import _yaml
+from buildstream2._elementfactory import ElementFactory
+from buildstream2._sourcefactory import SourceFactory
+from buildstream2._exceptions import PluginError
+from buildstream2 import _yaml
 
 DATA_DIR = os.path.join(
     os.path.dirname(os.path.realpath(__file__)),
@@ -21,7 +21,7 @@ DATA_DIR = os.path.join(
 @pytest.fixture()
 def plugin_fixture():
     return {
-        'base': PluginBase(package='buildstream.plugins')
+        'base': PluginBase(package='buildstream2.plugins')
     }
 
 
diff --git a/tests/internals/pluginfactory/anotherelement/foo.py b/tests/internals/pluginfactory/anotherelement/foo.py
index 2e067a9..69c5899 100644
--- a/tests/internals/pluginfactory/anotherelement/foo.py
+++ b/tests/internals/pluginfactory/anotherelement/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 
 class AnotherFooElement(Element):
diff --git a/tests/internals/pluginfactory/anothersource/foo.py b/tests/internals/pluginfactory/anothersource/foo.py
index 4675b96..bdb7ca0 100644
--- a/tests/internals/pluginfactory/anothersource/foo.py
+++ b/tests/internals/pluginfactory/anothersource/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Source
+from buildstream2 import Source
 
 
 class AnotherFooSource(Source):
diff --git a/tests/internals/pluginfactory/badversionelement/foo.py b/tests/internals/pluginfactory/badversionelement/foo.py
index 2a8b12a..03c6346 100644
--- a/tests/internals/pluginfactory/badversionelement/foo.py
+++ b/tests/internals/pluginfactory/badversionelement/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 
 class FooElement(Element):
diff --git a/tests/internals/pluginfactory/badversionsource/foo.py b/tests/internals/pluginfactory/badversionsource/foo.py
index 23333a9..047233b 100644
--- a/tests/internals/pluginfactory/badversionsource/foo.py
+++ b/tests/internals/pluginfactory/badversionsource/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Source
+from buildstream2 import Source
 
 
 class FooSource(Source):
diff --git a/tests/internals/pluginfactory/customelement/foo.py b/tests/internals/pluginfactory/customelement/foo.py
index 260de8b..35e597a 100644
--- a/tests/internals/pluginfactory/customelement/foo.py
+++ b/tests/internals/pluginfactory/customelement/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 
 class FooElement(Element):
diff --git a/tests/internals/pluginfactory/customsource/foo.py b/tests/internals/pluginfactory/customsource/foo.py
index de78a00..022fc7c 100644
--- a/tests/internals/pluginfactory/customsource/foo.py
+++ b/tests/internals/pluginfactory/customsource/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Source
+from buildstream2 import Source
 
 
 class FooSource(Source):
diff --git a/tests/internals/pluginloading.py b/tests/internals/pluginloading.py
index 2d99707..646bc19 100644
--- a/tests/internals/pluginloading.py
+++ b/tests/internals/pluginloading.py
@@ -1,10 +1,10 @@
 import os
 import pytest
 
-from buildstream._context import Context
-from buildstream._project import Project
-from buildstream._exceptions import LoadError, LoadErrorReason
-from buildstream._pipeline import Pipeline
+from buildstream2._context import Context
+from buildstream2._project import Project
+from buildstream2._exceptions import LoadError, LoadErrorReason
+from buildstream2._pipeline import Pipeline
 
 DATA_DIR = os.path.join(
     os.path.dirname(os.path.realpath(__file__)),
diff --git a/tests/internals/pluginloading/badversionelement/customelements/foo.py b/tests/internals/pluginloading/badversionelement/customelements/foo.py
index 75536e8..53f81b9 100644
--- a/tests/internals/pluginloading/badversionelement/customelements/foo.py
+++ b/tests/internals/pluginloading/badversionelement/customelements/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 
 class FooElement(Element):
diff --git a/tests/internals/pluginloading/badversionsource/customsources/foo.py b/tests/internals/pluginloading/badversionsource/customsources/foo.py
index f50855f..f87c06d 100644
--- a/tests/internals/pluginloading/badversionsource/customsources/foo.py
+++ b/tests/internals/pluginloading/badversionsource/customsources/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Source, Consistency
+from buildstream2 import Source, Consistency
 
 
 class BarSource(Source):
diff --git a/tests/internals/pluginloading/customelement/pluginelements/foo.py b/tests/internals/pluginloading/customelement/pluginelements/foo.py
index 823306e..02d9c9f 100644
--- a/tests/internals/pluginloading/customelement/pluginelements/foo.py
+++ b/tests/internals/pluginloading/customelement/pluginelements/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Element
+from buildstream2 import Element
 
 
 class FooElement(Element):
diff --git a/tests/internals/pluginloading/customsource/pluginsources/foo.py b/tests/internals/pluginloading/customsource/pluginsources/foo.py
index 8dd1680..4247664 100644
--- a/tests/internals/pluginloading/customsource/pluginsources/foo.py
+++ b/tests/internals/pluginloading/customsource/pluginsources/foo.py
@@ -1,4 +1,4 @@
-from buildstream import Source, Consistency
+from buildstream2 import Source, Consistency
 
 
 class FooSource(Source):
diff --git a/tests/internals/storage.py b/tests/internals/storage.py
index 66423af..3364714 100644
--- a/tests/internals/storage.py
+++ b/tests/internals/storage.py
@@ -2,9 +2,9 @@ import os
 
 import pytest
 
-from buildstream._cas import CASCache
-from buildstream.storage._casbaseddirectory import CasBasedDirectory
-from buildstream.storage._filebaseddirectory import FileBasedDirectory
+from buildstream2._cas import CASCache
+from buildstream2.storage._casbaseddirectory import CasBasedDirectory
+from buildstream2.storage._filebaseddirectory import FileBasedDirectory
 
 DATA_DIR = os.path.join(
     os.path.dirname(os.path.realpath(__file__)),
diff --git a/tests/internals/storage_vdir_import.py b/tests/internals/storage_vdir_import.py
index 9d42c6e..88b7d70 100644
--- a/tests/internals/storage_vdir_import.py
+++ b/tests/internals/storage_vdir_import.py
@@ -4,9 +4,9 @@ import random
 
 import pytest
 
-from buildstream.storage._casbaseddirectory import CasBasedDirectory
-from buildstream.storage._filebaseddirectory import FileBasedDirectory
-from buildstream._cas import CASCache
+from buildstream2.storage._casbaseddirectory import CasBasedDirectory
+from buildstream2.storage._filebaseddirectory import FileBasedDirectory
+from buildstream2._cas import CASCache
 
 
 # These are comparitive tests that check that FileBasedDirectory and
diff --git a/tests/internals/utils_move_atomic.py b/tests/internals/utils_move_atomic.py
index cda0208..5e0e60c 100644
--- a/tests/internals/utils_move_atomic.py
+++ b/tests/internals/utils_move_atomic.py
@@ -3,7 +3,7 @@
 
 import pytest
 
-from buildstream.utils import move_atomic, DirectoryExistsError
+from buildstream2.utils import move_atomic, DirectoryExistsError
 
 
 @pytest.fixture
diff --git a/tests/internals/utils_save_atomic.py b/tests/internals/utils_save_atomic.py
index 0731f7b..51ff666 100644
--- a/tests/internals/utils_save_atomic.py
+++ b/tests/internals/utils_save_atomic.py
@@ -1,7 +1,7 @@
 import os
 import pytest
 
-from buildstream.utils import save_file_atomic
+from buildstream2.utils import save_file_atomic
 
 
 def test_save_new_file(tmpdir):
diff --git a/tests/internals/yaml.py b/tests/internals/yaml.py
index dae20b3..75500c2 100644
--- a/tests/internals/yaml.py
+++ b/tests/internals/yaml.py
@@ -4,8 +4,8 @@ from io import StringIO
 
 import pytest
 
-from buildstream import _yaml
-from buildstream._exceptions import LoadError, LoadErrorReason
+from buildstream2 import _yaml
+from buildstream2._exceptions import LoadError, LoadErrorReason
 
 
 DATA_DIR = os.path.join(
diff --git a/tests/plugins/deprecationwarnings/deprecationwarnings.py b/tests/plugins/deprecationwarnings/deprecationwarnings.py
index 75652bf..60f2fdc 100644
--- a/tests/plugins/deprecationwarnings/deprecationwarnings.py
+++ b/tests/plugins/deprecationwarnings/deprecationwarnings.py
@@ -1,6 +1,6 @@
 import pytest
 import os
-from buildstream.testing import cli
+from buildstream2.testing import cli
 
 
 DATA_DIR = os.path.join(
diff --git a/tests/plugins/deprecationwarnings/project/plugins/elements/deprecated_plugin.py b/tests/plugins/deprecationwarnings/project/plugins/elements/deprecated_plugin.py
index 1badf59..60586a9 100644
--- a/tests/plugins/deprecationwarnings/project/plugins/elements/deprecated_plugin.py
+++ b/tests/plugins/deprecationwarnings/project/plugins/elements/deprecated_plugin.py
@@ -1,4 +1,4 @@
-from buildstream import BuildElement
+from buildstream2 import BuildElement
 
 
 class DeprecatedPlugin(BuildElement):
diff --git a/tests/remoteexecution/partial.py b/tests/remoteexecution/partial.py
index ee0fc25..f10a079 100644
--- a/tests/remoteexecution/partial.py
+++ b/tests/remoteexecution/partial.py
@@ -1,9 +1,9 @@
 import os
 import pytest
 
-from buildstream._exceptions import ErrorDomain
-from buildstream.testing import cli_remote_execution as cli
-from buildstream.testing.integration import assert_contains
+from buildstream2._exceptions import ErrorDomain
+from buildstream2.testing import cli_remote_execution as cli
+from buildstream2.testing.integration import assert_contains
 
 
 pytestmark = pytest.mark.remoteexecution
diff --git a/tests/remoteexecution/simple.py b/tests/remoteexecution/simple.py
index 53f4c65..f4356ee 100644
--- a/tests/remoteexecution/simple.py
+++ b/tests/remoteexecution/simple.py
@@ -1,8 +1,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_remote_execution as cli
-from buildstream.testing.integration import assert_contains
+from buildstream2.testing import cli_remote_execution as cli
+from buildstream2.testing.integration import assert_contains
 
 
 pytestmark = pytest.mark.remoteexecution
diff --git a/tests/sandboxes/missing-command.py b/tests/sandboxes/missing-command.py
index 8156eac..4cc51da 100644
--- a/tests/sandboxes/missing-command.py
+++ b/tests/sandboxes/missing-command.py
@@ -1,9 +1,9 @@
 import os
 import pytest
 
-from buildstream._exceptions import ErrorDomain
+from buildstream2._exceptions import ErrorDomain
 
-from buildstream.testing import cli
+from buildstream2.testing import cli
 
 
 DATA_DIR = os.path.join(
diff --git a/tests/sandboxes/missing_dependencies.py b/tests/sandboxes/missing_dependencies.py
index 22fecaa..167168a 100644
--- a/tests/sandboxes/missing_dependencies.py
+++ b/tests/sandboxes/missing_dependencies.py
@@ -1,10 +1,10 @@
 import os
 import pytest
-from buildstream.testing import cli
+from buildstream2.testing import cli
 from tests.testutils.site import IS_LINUX
 
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain
 
 
 # Project directory
diff --git a/tests/sandboxes/mounting/mount_simple.py b/tests/sandboxes/mounting/mount_simple.py
index 65aaf20..247d464 100644
--- a/tests/sandboxes/mounting/mount_simple.py
+++ b/tests/sandboxes/mounting/mount_simple.py
@@ -4,7 +4,7 @@ from contextlib import ExitStack
 
 import pytest
 
-from buildstream.sandbox._mounter import Mounter
+from buildstream2.sandbox._mounter import Mounter
 
 
 @pytest.mark.skipif(not os.geteuid() == 0, reason="requires root permissions")
diff --git a/tests/sandboxes/remote-exec-config.py b/tests/sandboxes/remote-exec-config.py
index 82943e4..5ff79b6 100644
--- a/tests/sandboxes/remote-exec-config.py
+++ b/tests/sandboxes/remote-exec-config.py
@@ -2,10 +2,10 @@ import pytest
 
 import os
 
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
 
-from buildstream.testing.runcli import cli
+from buildstream2.testing.runcli import cli
 
 DATA_DIR = os.path.join(
     os.path.dirname(os.path.realpath(__file__)),
diff --git a/tests/sourcecache/config.py b/tests/sourcecache/config.py
index 7c33adb..a5bf5a1 100644
--- a/tests/sourcecache/config.py
+++ b/tests/sourcecache/config.py
@@ -24,10 +24,10 @@
 import os
 import pytest
 
-from buildstream import _yaml
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2 import _yaml
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
 
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
 
diff --git a/tests/sourcecache/fetch.py b/tests/sourcecache/fetch.py
index bc025cb..ac3912a 100644
--- a/tests/sourcecache/fetch.py
+++ b/tests/sourcecache/fetch.py
@@ -23,12 +23,12 @@ import os
 import shutil
 import pytest
 
-from buildstream._exceptions import ErrorDomain
-from buildstream._context import Context
-from buildstream._project import Project
-from buildstream import _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream2._exceptions import ErrorDomain
+from buildstream2._context import Context
+from buildstream2._project import Project
+from buildstream2 import _yaml
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import create_repo
 from tests.testutils import create_artifact_share
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project")
diff --git a/tests/sourcecache/project/plugins/elements/always_fail.py b/tests/sourcecache/project/plugins/elements/always_fail.py
index 99ef0d7..4f3c531 100644
--- a/tests/sourcecache/project/plugins/elements/always_fail.py
+++ b/tests/sourcecache/project/plugins/elements/always_fail.py
@@ -18,8 +18,8 @@
 #        Raoul Hidalgo Charman <ra...@codethink.co.uk>
 #
 
-from buildstream.element import ElementError
-from buildstream.buildelement import BuildElement
+from buildstream2.element import ElementError
+from buildstream2.buildelement import BuildElement
 
 
 class AlwaysFail(BuildElement):
diff --git a/tests/sourcecache/push.py b/tests/sourcecache/push.py
index abab161..296e396 100644
--- a/tests/sourcecache/push.py
+++ b/tests/sourcecache/push.py
@@ -23,12 +23,12 @@ import os
 import shutil
 import pytest
 
-from buildstream._context import Context
-from buildstream._exceptions import ErrorDomain
-from buildstream._project import Project
-from buildstream import _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream2._context import Context
+from buildstream2._exceptions import ErrorDomain
+from buildstream2._project import Project
+from buildstream2 import _yaml
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import create_repo
 
 from tests.testutils import create_artifact_share
 
diff --git a/tests/sourcecache/source-checkout.py b/tests/sourcecache/source-checkout.py
index 15c80fd..045b242 100644
--- a/tests/sourcecache/source-checkout.py
+++ b/tests/sourcecache/source-checkout.py
@@ -26,8 +26,8 @@ import shutil
 
 import pytest
 
-from buildstream._exceptions import ErrorDomain
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 from tests.testutils.element_generators import create_element_size
 
diff --git a/tests/sourcecache/staging.py b/tests/sourcecache/staging.py
index 3182852..53d0a15 100644
--- a/tests/sourcecache/staging.py
+++ b/tests/sourcecache/staging.py
@@ -25,10 +25,10 @@ import os
 import shutil
 import pytest
 
-from buildstream._context import Context
-from buildstream._project import Project
+from buildstream2._context import Context
+from buildstream2._project import Project
 
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 from tests.testutils.element_generators import create_element_size
 
 
diff --git a/tests/sourcecache/workspace.py b/tests/sourcecache/workspace.py
index 22316c4..cdb007d 100644
--- a/tests/sourcecache/workspace.py
+++ b/tests/sourcecache/workspace.py
@@ -26,7 +26,7 @@ import shutil
 
 import pytest
 
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream2.testing.runcli import cli  # pylint: disable=unused-import
 
 from tests.testutils.artifactshare import create_artifact_share
 from tests.testutils.element_generators import create_element_size
diff --git a/tests/sources/bzr.py b/tests/sources/bzr.py
index a11932a..42fddd0 100644
--- a/tests/sources/bzr.py
+++ b/tests/sources/bzr.py
@@ -4,10 +4,10 @@
 import os
 import pytest
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import create_repo
 from tests.testutils.site import HAVE_BZR
 
 DATA_DIR = os.path.join(
diff --git a/tests/sources/deb.py b/tests/sources/deb.py
index 69b7c78..ca44974 100644
--- a/tests/sources/deb.py
+++ b/tests/sources/deb.py
@@ -6,9 +6,9 @@ import shutil
 
 import pytest
 
-from buildstream._exceptions import ErrorDomain
-from buildstream import _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2.testing import cli  # pylint: disable=unused-import
 from tests.testutils.site import HAVE_ARPY
 from . import list_dir_contents
 
diff --git a/tests/sources/git.py b/tests/sources/git.py
index b7b175e..5a4fabd 100644
--- a/tests/sources/git.py
+++ b/tests/sources/git.py
@@ -29,11 +29,11 @@ import shutil
 
 import pytest
 
-from buildstream._exceptions import ErrorDomain
-from buildstream import _yaml
-from buildstream.plugin import CoreWarnings
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream2._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2.plugin import CoreWarnings
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import create_repo
 
 from tests.testutils.site import HAVE_GIT, HAVE_OLD_GIT
 
diff --git a/tests/sources/keytest.py b/tests/sources/keytest.py
index dbfe97a..334ebd4 100644
--- a/tests/sources/keytest.py
+++ b/tests/sources/keytest.py
@@ -24,8 +24,8 @@
 import os
 import pytest
 
-from buildstream._exceptions import ErrorDomain
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain
+from buildstream2.testing import cli  # pylint: disable=unused-import
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                         "project_key_test")
diff --git a/tests/sources/local.py b/tests/sources/local.py
index 94d45b3..a737366 100644
--- a/tests/sources/local.py
+++ b/tests/sources/local.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing import cli  # pylint: disable=unused-import
 from tests.testutils import filetypegenerator
 
 DATA_DIR = os.path.join(
diff --git a/tests/sources/no-fetch-cached/plugins/sources/always_cached.py b/tests/sources/no-fetch-cached/plugins/sources/always_cached.py
index fa143a0..e73d177 100644
--- a/tests/sources/no-fetch-cached/plugins/sources/always_cached.py
+++ b/tests/sources/no-fetch-cached/plugins/sources/always_cached.py
@@ -7,7 +7,7 @@ Used to test that BuildStream core does not call fetch() for cached sources.
 
 """
 
-from buildstream import Consistency, Source
+from buildstream2 import Consistency, Source
 
 
 class AlwaysCachedSource(Source):
diff --git a/tests/sources/no_fetch_cached.py b/tests/sources/no_fetch_cached.py
index 69d2861..743cabf 100644
--- a/tests/sources/no_fetch_cached.py
+++ b/tests/sources/no_fetch_cached.py
@@ -4,10 +4,10 @@
 import os
 import pytest
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import create_repo
 from tests.testutils.site import HAVE_GIT
 
 DATA_DIR = os.path.join(
diff --git a/tests/sources/ostree.py b/tests/sources/ostree.py
index aefad68..b2db60a 100644
--- a/tests/sources/ostree.py
+++ b/tests/sources/ostree.py
@@ -23,10 +23,10 @@
 import os
 import pytest
 
-from buildstream._exceptions import ErrorDomain
-from buildstream import _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream2._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import create_repo
 
 DATA_DIR = os.path.join(
     os.path.dirname(os.path.realpath(__file__)),
diff --git a/tests/sources/patch.py b/tests/sources/patch.py
index 4f9db81..ca909e8 100644
--- a/tests/sources/patch.py
+++ b/tests/sources/patch.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream._exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain, LoadErrorReason
+from buildstream2.testing import cli  # pylint: disable=unused-import
 from tests.testutils import filetypegenerator
 
 DATA_DIR = os.path.join(
diff --git a/tests/sources/pip.py b/tests/sources/pip.py
index cf6ea54..eba5a5e 100644
--- a/tests/sources/pip.py
+++ b/tests/sources/pip.py
@@ -4,10 +4,10 @@
 import os
 import pytest
 
-from buildstream._exceptions import ErrorDomain
-from buildstream import _yaml
-from buildstream.plugins.sources.pip import _match_package_name
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2.plugins.sources.pip import _match_package_name
+from buildstream2.testing import cli  # pylint: disable=unused-import
 
 DATA_DIR = os.path.join(
     os.path.dirname(os.path.realpath(__file__)),
diff --git a/tests/sources/previous_source_access.py b/tests/sources/previous_source_access.py
index a0661ca..edfde08 100644
--- a/tests/sources/previous_source_access.py
+++ b/tests/sources/previous_source_access.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2.testing import cli  # pylint: disable=unused-import
 
 DATA_DIR = os.path.join(
     os.path.dirname(os.path.realpath(__file__)),
diff --git a/tests/sources/previous_source_access/plugins/sources/foo_transform.py b/tests/sources/previous_source_access/plugins/sources/foo_transform.py
index 8209464..5a399da 100644
--- a/tests/sources/previous_source_access/plugins/sources/foo_transform.py
+++ b/tests/sources/previous_source_access/plugins/sources/foo_transform.py
@@ -10,7 +10,7 @@ previous sources, and copies its contents to a file called "filetransform".
 import os
 import hashlib
 
-from buildstream import Consistency, Source, SourceError, utils
+from buildstream2 import Consistency, Source, SourceError, utils
 
 
 class FooTransformSource(Source):
diff --git a/tests/sources/project_key_test/plugins/sources/key-test.py b/tests/sources/project_key_test/plugins/sources/key-test.py
index 9331ba0..bf7604f 100644
--- a/tests/sources/project_key_test/plugins/sources/key-test.py
+++ b/tests/sources/project_key_test/plugins/sources/key-test.py
@@ -1,4 +1,4 @@
-from buildstream import Source, Consistency
+from buildstream2 import Source, Consistency
 
 
 class KeyTest(Source):
diff --git a/tests/sources/remote.py b/tests/sources/remote.py
index 8b57151..1b96828 100644
--- a/tests/sources/remote.py
+++ b/tests/sources/remote.py
@@ -5,9 +5,9 @@ import os
 import stat
 import pytest
 
-from buildstream._exceptions import ErrorDomain
-from buildstream import _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2.testing import cli  # pylint: disable=unused-import
 from tests.testutils.file_server import create_file_server
 
 DATA_DIR = os.path.join(
diff --git a/tests/sources/tar.py b/tests/sources/tar.py
index 8446f48..69095fe 100644
--- a/tests/sources/tar.py
+++ b/tests/sources/tar.py
@@ -10,9 +10,9 @@ import urllib.parse
 
 import pytest
 
-from buildstream._exceptions import ErrorDomain
-from buildstream import _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2.testing import cli  # pylint: disable=unused-import
 from tests.testutils.file_server import create_file_server
 from tests.testutils.site import HAVE_LZIP
 from . import list_dir_contents
diff --git a/tests/sources/zip.py b/tests/sources/zip.py
index cb7f440..cc1eb25 100644
--- a/tests/sources/zip.py
+++ b/tests/sources/zip.py
@@ -6,9 +6,9 @@ import zipfile
 
 import pytest
 
-from buildstream._exceptions import ErrorDomain
-from buildstream import _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream2._exceptions import ErrorDomain
+from buildstream2 import _yaml
+from buildstream2.testing import cli  # pylint: disable=unused-import
 from tests.testutils.file_server import create_file_server
 from . import list_dir_contents
 
diff --git a/tests/testutils/artifactshare.py b/tests/testutils/artifactshare.py
index 6c484ce..4dafa90 100644
--- a/tests/testutils/artifactshare.py
+++ b/tests/testutils/artifactshare.py
@@ -7,10 +7,10 @@ from collections import namedtuple
 from contextlib import contextmanager
 from multiprocessing import Process, Queue
 
-from buildstream._cas import CASCache
-from buildstream._cas.casserver import create_server
-from buildstream._exceptions import CASError
-from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
+from buildstream2._cas import CASCache
+from buildstream2._cas.casserver import create_server
+from buildstream2._exceptions import CASError
+from buildstream2._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
 
 
 # ArtifactShare()
diff --git a/tests/testutils/element_generators.py b/tests/testutils/element_generators.py
index 38bafc6..d59be59 100644
--- a/tests/testutils/element_generators.py
+++ b/tests/testutils/element_generators.py
@@ -1,8 +1,8 @@
 import os
 
-from buildstream import _yaml
-from buildstream import utils
-from buildstream.testing import create_repo
+from buildstream2 import _yaml
+from buildstream2 import utils
+from buildstream2.testing import create_repo
 
 
 # create_element_size()
diff --git a/tests/testutils/junction.py b/tests/testutils/junction.py
index 8132e29..0b44630 100644
--- a/tests/testutils/junction.py
+++ b/tests/testutils/junction.py
@@ -1,5 +1,5 @@
-from buildstream import _yaml
-from buildstream.testing import create_repo
+from buildstream2 import _yaml
+from buildstream2.testing import create_repo
 
 
 # generate_junction()
diff --git a/tests/testutils/repo/bzr.py b/tests/testutils/repo/bzr.py
index 53bacad..942684b 100644
--- a/tests/testutils/repo/bzr.py
+++ b/tests/testutils/repo/bzr.py
@@ -2,7 +2,7 @@ import os
 import subprocess
 import pytest
 
-from buildstream.testing import Repo
+from buildstream2.testing import Repo
 from .. import site
 
 
diff --git a/tests/testutils/repo/git.py b/tests/testutils/repo/git.py
index 8ffd09c..c18f6ce 100644
--- a/tests/testutils/repo/git.py
+++ b/tests/testutils/repo/git.py
@@ -4,7 +4,7 @@ import subprocess
 
 import pytest
 
-from buildstream.testing import Repo
+from buildstream2.testing import Repo
 from .. import site
 
 
diff --git a/tests/testutils/repo/ostree.py b/tests/testutils/repo/ostree.py
index c43f39e..785cf94 100644
--- a/tests/testutils/repo/ostree.py
+++ b/tests/testutils/repo/ostree.py
@@ -2,7 +2,7 @@ import subprocess
 
 import pytest
 
-from buildstream.testing import Repo
+from buildstream2.testing import Repo
 from .. import site
 
 
diff --git a/tests/testutils/repo/tar.py b/tests/testutils/repo/tar.py
index 63231fa..913a0aa 100644
--- a/tests/testutils/repo/tar.py
+++ b/tests/testutils/repo/tar.py
@@ -1,9 +1,9 @@
 import os
 import tarfile
 
-from buildstream.utils import sha256sum
+from buildstream2.utils import sha256sum
 
-from buildstream.testing import Repo
+from buildstream2.testing import Repo
 
 
 class Tar(Repo):
diff --git a/tests/testutils/repo/zip.py b/tests/testutils/repo/zip.py
index df3f834..f8baedf 100644
--- a/tests/testutils/repo/zip.py
+++ b/tests/testutils/repo/zip.py
@@ -1,9 +1,9 @@
 import os
 import zipfile
 
-from buildstream.utils import sha256sum
+from buildstream2.utils import sha256sum
 
-from buildstream.testing import Repo
+from buildstream2.testing import Repo
 
 
 class Zip(Repo):
diff --git a/tests/testutils/site.py b/tests/testutils/site.py
index 17c84cd..20e44e3 100644
--- a/tests/testutils/site.py
+++ b/tests/testutils/site.py
@@ -6,8 +6,8 @@ import subprocess
 import sys
 import platform
 
-from buildstream import _site, utils, ProgramNotFoundError
-from buildstream._platform import Platform
+from buildstream2 import _site, utils, ProgramNotFoundError
+from buildstream2._platform import Platform
 
 try:
     BZR = utils.get_host_tool('bzr')
@@ -32,7 +32,7 @@ except ProgramNotFoundError:
     HAVE_OSTREE_CLI = False
 
 try:
-    from buildstream import _ostree  # pylint: disable=unused-import
+    from buildstream2 import _ostree  # pylint: disable=unused-import
     HAVE_OSTREE = True
 except (ImportError, ValueError):
     HAVE_OSTREE = False
diff --git a/tests/testutils/yaml.py b/tests/testutils/yaml.py
index a1dcb86..867eb32 100644
--- a/tests/testutils/yaml.py
+++ b/tests/testutils/yaml.py
@@ -17,7 +17,7 @@
 #  Authors:
 #        Angelos Evripiotis <je...@bloomberg.net>
 
-from buildstream import _yaml
+from buildstream2 import _yaml
 
 
 # yaml_file_get_provenance()
diff --git a/tox.ini b/tox.ini
index 12547f2..32b1849 100644
--- a/tox.ini
+++ b/tox.ini
@@ -13,9 +13,9 @@ skip_missing_interpreters = true
 [testenv]
 commands =
     # Running with coverage reporting enabled
-    py{35,36,37}-!external-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
+    py{35,36,37}-!external-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream2 --cov-config .coveragerc {posargs}
     py{35,36,37}-!nocover: mkdir -p .coverage-reports
-    external-!nocover: {envpython} {toxinidir}/tests/external_plugins.py {envtmpdir} --cov=buildstream --cov-append {posargs}
+    external-!nocover: {envpython} {toxinidir}/tests/external_plugins.py {envtmpdir} --cov=buildstream2 --cov-append {posargs}
     py{35,36,37}-!external-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
     py{35,36,37}-external-!nocover: - mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
     # Running with coverage reporting disabled
@@ -78,7 +78,7 @@ setenv =
 [testenv:lint]
 commands =
     pycodestyle
-    pylint buildstream tests
+    pylint buildstream2 tests
 deps =
     -rrequirements/requirements.txt
     -rrequirements/dev-requirements.txt


[buildstream] 04/06: setup.py: Allow optionality of main entry point at install time.

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/bst2-separation
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 548c977ddb15e0adcc98dbd0758bd30b007c5ba7
Author: Tristan Van Berkom <tr...@codethink.co.uk>
AuthorDate: Thu Apr 4 19:32:31 2019 +0900

    setup.py: Allow optionality of main entry point at install time.
    
    By default, we now install as `bst2` so as to not overlap with
    `bst` which is BuildStream 1.
    
    However, as it does not pose any problem to install as `bst`, we
    allow it. The expectation is that once 2.0 is released, distros will
    probably install `bst1` and `bst2` separately, but alias the `bst`
    command to the latest version (e.g., like the debian 'alternatives' concept).
---
 setup.py | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 02cc29e..7076e8b 100755
--- a/setup.py
+++ b/setup.py
@@ -131,10 +131,24 @@ bst_install_entry_points = {
     ],
 }
 
+#
+# By default BuildStream 2 installs as 'bst2', but allow
+# the installer to override this and install as 'bst' if
+# they wish
+#
+bst_entry_point = os.environ.get('BST_ENTRY_POINT', '')
+if not bst_entry_point:
+    bst_entry_point = 'bst2'
+
+if bst_entry_point not in ('bst', 'bst2'):
+    print("BST_ENTRY_POINT was set to '{}'".format(bst_entry_point) +
+          ", but only 'bst' or 'bst2' is allowed")
+    sys.exit(1)
+
 if not os.environ.get('BST_ARTIFACTS_ONLY', ''):
     check_for_bwrap()
     bst_install_entry_points['console_scripts'] += [
-        'bst = buildstream2._frontend:cli'
+        '{} = buildstream2._frontend:cli'.format(bst_entry_point)
     ]
 
 #####################################################