Prepare development environment.

    Perform the following steps:

     - Uninstall ``dmf_control_board_firmware`` if installed as Conda package.
     - Install build and run-time Conda dependencies.
     - Link working ``.pioenvs`` directory into Conda ``Library`` directory to
       make development versions of compiled firmware binaries available to
       Python API.
     - Link ``dmf_control_board_firmware`` Python package into site packages
       directory.

    See Also
    --------
    :func:`develop_unlink`

def develop_link(options, info):
    '''
    Prepare development environment.

    Perform the following steps:

     - Uninstall ``dmf_control_board_firmware`` if installed as Conda package.
     - Install build and run-time Conda dependencies.
     - Link working ``.pioenvs`` directory into Conda ``Library`` directory to
       make development versions of compiled firmware binaries available to
       Python API.
     - Link ``dmf_control_board_firmware`` Python package into site packages
       directory.

    See Also
    --------
    :func:`develop_unlink`
    '''
    project_dir = ph.path(__file__).realpath().parent

    # Uninstall ``dmf_control_board_firmware`` if installed as Conda package.
    info('Check if Conda package is installed...')
    version_info = ch.conda_version_info('dmf-control-board-firmware')
    if version_info.get('installed') is not None:
        info('Uninstall `dmf-control-board-firmware` package...')
        ch.conda_exec('uninstall', '-y', 'dmf-control-board-firmware',
                      verbose=True)
    else:
        info('`dmf-control-board-firmware` package is not installed.')

    # Install build and run-time Conda dependencies.
    info('Install build and run-time Conda dependencies...')
    recipe_dir = project_dir.joinpath('.conda-recipe').realpath()
    ch.conda_exec('install', '-y', '-n', 'root', 'conda-build', verbose=True)
    ch.development_setup(recipe_dir, verbose=True)

    # Link working ``.pioenvs`` directory into Conda ``Library`` directory.
    info('Link working firmware directories into Conda environment.')
    pio_bin_dir = pioh.conda_bin_path()

    fw_bin_dir = pio_bin_dir.joinpath('dmf-control-board-firmware')

    if not fw_bin_dir.exists():
        project_dir.joinpath('.pioenvs').junction(fw_bin_dir)

    fw_config_ini = fw_bin_dir.joinpath('platformio.ini')
    if not fw_config_ini.exists():
        project_dir.joinpath('platformio.ini').link(fw_config_ini)

    # Link ``dmf_control_board_firmware`` Python package `conda.pth` in site
    # packages directory.
    info('Link working Python directory into Conda environment...')
    ch.conda_exec('develop', project_dir, verbose=True)
    info(72 * '-' + '\nFinished')