comparison contrib/automation/hgautomation/linux.py @ 47206:546e812a1c2d

automation: create Python 3.5 variant of requirements.txt The automation environment is refusing to build with the previous file because some dependencies won't install on Python 3.5. I couldn't find an easy way to salvage the situation with a single requirements.txt file. So, I decided to introduce a variant for Python 3.5. As part of this, we update packages to latest versions. (I do question why we are still supporting Python 3.5...) Differential Revision: https://phab.mercurial-scm.org/D10690
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 06 May 2021 17:46:57 -0700
parents a6c5ec6b4728
children 743522fa2455
comparison
equal deleted inserted replaced
47205:acd84c434896 47206:546e812a1c2d
54 done 54 done
55 55
56 for v in ${PYENV3_VERSIONS}; do 56 for v in ${PYENV3_VERSIONS}; do
57 pyenv install -v ${v} 57 pyenv install -v ${v}
58 ${PYENV_ROOT}/versions/${v}/bin/python get-pip.py 58 ${PYENV_ROOT}/versions/${v}/bin/python get-pip.py
59 ${PYENV_ROOT}/versions/${v}/bin/pip install -r /hgdev/requirements-py3.txt 59
60 case ${v} in
61 3.5.*)
62 REQUIREMENTS=requirements-py3.5.txt
63 ;;
64 pypy3.5*)
65 REQUIREMENTS=requirements-py3.5.txt
66 ;;
67 *)
68 REQUIREMENTS=requirements-py3.txt
69 ;;
70 esac
71
72 ${PYENV_ROOT}/versions/${v}/bin/pip install -r /hgdev/${REQUIREMENTS}
60 done 73 done
61 74
62 pyenv global ${PYENV2_VERSIONS} ${PYENV3_VERSIONS} system 75 pyenv global ${PYENV2_VERSIONS} ${PYENV3_VERSIONS} system
63 '''.lstrip().replace( 76 '''.lstrip().replace(
64 '\r\n', '\n' 77 '\r\n', '\n'
305 # Will be normalized to hg:hg later. 318 # Will be normalized to hg:hg later.
306 sudo chown `whoami` /hgdev 319 sudo chown `whoami` /hgdev
307 320
308 {install_rust} 321 {install_rust}
309 322
310 cp requirements-py2.txt /hgdev/requirements-py2.txt 323 cp requirements-*.txt /hgdev/
311 cp requirements-py3.txt /hgdev/requirements-py3.txt
312 324
313 # Disable the pip version check because it uses the network and can 325 # Disable the pip version check because it uses the network and can
314 # be annoying. 326 # be annoying.
315 cat << EOF | sudo tee -a /etc/pip.conf 327 cat << EOF | sudo tee -a /etc/pip.conf
316 [global] 328 [global]