def build_cmake(self, extension: Extension):
        """
        The steps required to build the extension
        """

        # We import the setup_requires modules here because if we import them
        # at the top this script will always fail as they won't be present

        from git import Repo as GitRepo
        from svn.remote import RemoteClient as SvnRepo

        self.announce("Preparing the build environment", level=3)

        blender_dir = os.path.join(BLENDERPY_DIR, "blender")

        build_dir = pathlib.Path(self.build_temp)

        extension_path = pathlib.Path(self.get_ext_fullpath(extension.name))

        os.makedirs(blender_dir, exist_ok=True)
        os.makedirs(str(build_dir), exist_ok=True)
        os.makedirs(str(extension_path.parent.absolute()), exist_ok=True)

        # Now that the necessary directories are created, ensure that OS 
        # specific steps are performed; a good example is checking on linux 
        # that the required build libraries are in place.

        os_build_args = []

        # Have to find the correct release tag to checkout here, as potentially
        # master may not be the correct one for this Python version. We use svn
        # to find whether or not master, or a specific tag supports the 
        # current python version

        if sys.platform == "win32": # Windows only steps

            import winreg

            vs_versions = []

            for version in [12, 14, 15]:

                try:

                    winreg.OpenKey(winreg.HKEY_CLASSES_ROOT,
                                   f"VisualStudio.DTE.{version}.0")

                except:

                    pass
                    
                else:

                    vs_versions.append(version)

            if not vs_versions:

                raise Exception("Windows users must have Visual Studio 2013 "
                                "or later installed")

            if max(vs_versions) == 15:

                os_build_args += ["-G", f"Visual Studio 15 2017"
                                        f"{' Win64' if BITS == 64 else ''}"]

            elif max(vs_versions) == 14:

                os_build_args += ["-G", f"Visual Studio 14 2015"
                                        f"{' Win64' if BITS == 64 else ''}"]

            elif max(vs_versions) == 12:

                os_build_args += ["-G", f"Visual Studio 12 2013"
                                        f"{' Win64' if BITS == 64 else ''}"]

            # TODO: Clean up here

            svn_lib_options += [f"win{64 if BITS == 64 else 'dows'}_vc{version}" 
                                for version in vs_versions]

            blender_svn_repo = SvnRepo(svn_url)

            os.makedirs(svn_dir, exist_ok=True)

            self.announce(f"Checking out svn libs from {svn_url}", level=3)

            try:
                
                blender_svn_repo.checkout(svn_dir)

            except Exception as e:

                self.warn("Windows users must have the svn executable "
                          "available from the command line")
                self.warn("Please install Tortoise SVN with \"command line "
                          "client tools\" as described here")
                self.warn("https://stackoverflow.com/questions/1625406/using-"
                          "tortoisesvn-via-the-command-line")
                raise e

        elif sys.platform == "linux": # Linux only steps

            # TODO: Test linux environment, issue #1

            pass

        elif sys.platform == "darwin": # MacOS only steps

            # TODO: Test MacOS environment, issue #2

            pass

        # Perform relatively common build steps

        # TODO: if blender desired version, then see if we can install that
        # Otherwise fail, if no desired version, find the latest version that
        # supports our python and install that

        git_repo = GitRepo(GIT_BASE_URL)
        svn_repo = SvnRepo(SVN_BASE_URL)

        if BLENDER_DESIRED_VERSION:

            match = BLENDER_VERSION_REGEX.match(BLENDER_DESIRED_VERSION)

            if match:

                # We have a blender version that conforms to the naming scheme
                # now to see if it actually exists in git and svn

                if match.group(0) in git_repo.tags:

                    # The version was tagged in the git repository
                    # now, format the version to match the svn versioning 
                    # scheme...

                    svn_version_tag = (f"blender-{match.group(1)}"
                                       f"{match.group(2) if not match.group(2).startswith("-rc")}-release")

                    svn_tag_repo = SvnRepo(os.path.join(SVN_BASE_URL, SVN_TAGS))

                    if svn_version_tag in svn_tag_repo.list():

                        # The version was released in svn and we found it
                        # Now, is it compatible with our OS and python version?

                    else:

                        raise Exception(f"{BLENDER_DESIRED_VERSION} was found "
                                        f"in the git repository but not the "
                                        f"svn repository.")

                else:

                    raise Exception(f"The provided version "
                                    f"{BLENDER_DESIRED_VERSION} does not "
                                    f"exist; please check "
                                    f"https://git.blender.org/gitweb/"
                                    f"gitweb.cgi/blender.git/tags for a list "
                                    f"of valid Blender releases")

            else:

                # The blender version did not conform to the naming scheme
                # fail and notify the user how to list the version

                raise Exception(f"The provided version "
                                f"{BLENDER_DESIRED_VERSION} did not match "
                                f"Blender's naming scheme. Please list your "
                                f"desired version as 'v' followed by a digit, "
                                f"followed by a period, followed by two "
                                f"digits and either 'a', 'b', 'c' or '-rc' "
                                f"(versions using '-rc' can optionally add "
                                f"a number which specifies which release "
                                f"candidate they want to install) such that "
                                f"the version looks like the following: "
                                f"v2.74-rc2")

        else:

            if sys.version_info >= (3, 6):

                # we can get from svn and git master branch

            else:

                # we must find a compatible version

        self.announce(f"Cloning Blender source from {BLENDER_GIT_REPO_URL}",
                      level=3)

        try:

            blender_git_repo = GitRepo(blender_dir)

        except:

            GitRepo.clone_from(BLENDER_GIT_REPO_URL, blender_dir)
            blender_git_repo = GitRepo(blender_dir)

        finally:
                
            blender_git_repo.heads.master.checkout()
            blender_git_repo.remotes.origin.pull()

        self.announce(f"Updating Blender git submodules", level=3)

        blender_git_repo.git.submodule('update', '--init', '--recursive')

        for submodule in blender_git_repo.submodules:
                
            submodule_repo = submodule.module()
            submodule_repo.heads.master.checkout()
            submodule_repo.remotes.origin.pull()

        self.announce("Configuring cmake project", level=3)

        self.spawn(['cmake', '-H'+blender_dir, '-B'+self.build_temp,
                    '-DWITH_PLAYER=OFF', '-DWITH_PYTHON_INSTALL=OFF',
                    '-DWITH_PYTHON_MODULE=ON', 
                    f"-DPYTHON_VERSION="
                    f"{sys.version_info[0]}.{sys.version_info[1]}"]
                    + os_build_args)
        
        self.announce("Building binaries", level=3)

        self.spawn(["cmake", "--build", self.build_temp, "--target", "INSTALL",
                    "--config", "Release"])

        # Build finished, now copy the files into the copy directory
        # The copy directory is the parent directory of the extension (.pyd)

        self.announce("Moving Blender python module", level=3)

        bin_dir = os.path.join(str(build_dir), 'bin', 'Release')
        self.distribution.bin_dir = bin_dir

        bpy_path = [os.path.join(bin_dir, _bpy) for _bpy in
                    os.listdir(bin_dir) if
                    os.path.isfile(os.path.join(bin_dir, _bpy)) and
                    os.path.splitext(_bpy)[0].startswith('bpy') and
                    os.path.splitext(_bpy)[1] in [".pyd", ".so"]][0]

        shutil.move(str(bpy_path), str(extension_path))
The steps required to build the extension