Skip to content
This repository was archived by the owner on Sep 8, 2024. It is now read-only.
This repository was archived by the owner on Sep 8, 2024. It is now read-only.

Virtual environment dev_setup with python argument #3041

@HFabi

Description

@HFabi

Is your feature request related to a problem? Please describe.
It is possible to provide a python version as an argument to the dev_setup.sh script. I suggest that the provided version should also be used to install the correct pip. This would make it easier to install mycroft on systems such as respeaker core 2.

Describe the solution you'd like
A clear and concise description of what you want to happen.
I would suggest the following change:

# dev_setup.sh
function install_venv() {
    $opt_python -m venv "${VIRTUALENV_ROOT}/" --without-pip
    curl https://bootstrap.pypa.io/get-pip.py | "${VIRTUALENV_ROOT}/bin/python" - 'pip==20.0.2'
    [[ -x ${VIRTUALENV_ROOT}/bin/pip ]]
}

# dev_setup.sh changes:
function install_venv() {
    $opt_python -m venv "${VIRTUALENV_ROOT}/" --without-pip
    # replace "python" with "$opt_python"
    curl https://bootstrap.pypa.io/get-pip.py | "${VIRTUALENV_ROOT}/bin/${opt_python}" - 'pip==20.0.2'.  # <-----
    [[ -x ${VIRTUALENV_ROOT}/bin/pip ]]
}

Describe alternatives you've considered

Additional context

I am going to create a Pull Request with these change, if others consider it reasonable But first want to discuss about it here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions