add python 3.10 (#837)

* fix: use py 3.10 for v14

closes #836

* docs: update development readme for py versions

* ci: update github actions py version to 3.10

* Quote Python version in yaml files

* fix: typo in environment variable

Co-authored-by: Lev Vereshchagin <mail@vrslev.com>
This commit is contained in:
Revant Nandgaonkar
2022-07-03 15:09:10 +05:30
committed by GitHub
parent 730e14b6cd
commit 1754e6872f
6 changed files with 23 additions and 9 deletions

View File

@@ -79,15 +79,17 @@ WORKDIR /home/frappe
# Python 3.7 sits here for ERPNext version-12
# TODO: Remove Python 3.7 when version-12 will not be supported
ENV PYTHON_VERSION_V12=3.7.12
ENV PYTHON_VERSION=3.9.9
ENV PYTHON_VERSION_V13=3.9.9
ENV PYTHON_VERSION=3.10.5
ENV PYENV_ROOT /home/frappe/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
# From https://github.com/pyenv/pyenv#basic-github-checkout
RUN git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \
&& pyenv install $PYTHON_VERSION_V12 \
&& pyenv install $PYTHON_VERSION_V13 \
&& pyenv install $PYTHON_VERSION \
&& pyenv global $PYTHON_VERSION $PYTHON_VERSION_V12 \
&& pyenv global $PYTHON_VERSION $PYTHON_VERSION_V12 $PYTHON_VERSION_v13 \
&& sed -Ei -e '/^([^#]|$)/ {a export PYENV_ROOT="/home/frappe/.pyenv" a export PATH="$PYENV_ROOT/bin:$PATH" a ' -e ':a' -e '$!{n;ba};}' ~/.profile \
&& echo 'eval "$(pyenv init --path)"' >>~/.profile \
&& echo 'eval "$(pyenv init -)"' >>~/.bashrc