##// END OF EJS Templates
automation: drop support for Python 2.7 in Linux environment...
Gregory Szorc -
r49700:5c8148cd default
parent child Browse files
Show More
@@ -919,17 +919,12 b' def ensure_linux_dev_ami(c: AWSConnectio'
919 'SecurityGroupIds': [c.security_groups['linux-dev-1'].id],
919 'SecurityGroupIds': [c.security_groups['linux-dev-1'].id],
920 }
920 }
921
921
922 requirements2_path = (
923 pathlib.Path(__file__).parent.parent / 'linux-requirements-py2.txt'
924 )
925 requirements3_path = (
922 requirements3_path = (
926 pathlib.Path(__file__).parent.parent / 'linux-requirements-py3.txt'
923 pathlib.Path(__file__).parent.parent / 'linux-requirements-py3.txt'
927 )
924 )
928 requirements35_path = (
925 requirements35_path = (
929 pathlib.Path(__file__).parent.parent / 'linux-requirements-py3.5.txt'
926 pathlib.Path(__file__).parent.parent / 'linux-requirements-py3.5.txt'
930 )
927 )
931 with requirements2_path.open('r', encoding='utf-8') as fh:
932 requirements2 = fh.read()
933 with requirements3_path.open('r', encoding='utf-8') as fh:
928 with requirements3_path.open('r', encoding='utf-8') as fh:
934 requirements3 = fh.read()
929 requirements3 = fh.read()
935 with requirements35_path.open('r', encoding='utf-8') as fh:
930 with requirements35_path.open('r', encoding='utf-8') as fh:
@@ -941,7 +936,6 b' def ensure_linux_dev_ami(c: AWSConnectio'
941 {
936 {
942 'instance_config': config,
937 'instance_config': config,
943 'bootstrap_script': BOOTSTRAP_DEBIAN,
938 'bootstrap_script': BOOTSTRAP_DEBIAN,
944 'requirements_py2': requirements2,
945 'requirements_py3': requirements3,
939 'requirements_py3': requirements3,
946 'requirements_py35': requirements35,
940 'requirements_py35': requirements35,
947 }
941 }
@@ -977,10 +971,6 b' def ensure_linux_dev_ami(c: AWSConnectio'
977 fh.write(BOOTSTRAP_DEBIAN)
971 fh.write(BOOTSTRAP_DEBIAN)
978 fh.chmod(0o0700)
972 fh.chmod(0o0700)
979
973
980 with sftp.open('%s/requirements-py2.txt' % home, 'wb') as fh:
981 fh.write(requirements2)
982 fh.chmod(0o0700)
983
984 with sftp.open('%s/requirements-py3.txt' % home, 'wb') as fh:
974 with sftp.open('%s/requirements-py3.txt' % home, 'wb') as fh:
985 fh.write(requirements3)
975 fh.write(requirements3)
986 fh.chmod(0o0700)
976 fh.chmod(0o0700)
@@ -469,9 +469,7 b' def get_parser():'
469 '--python-version',
469 '--python-version',
470 help='Python version to use',
470 help='Python version to use',
471 choices={
471 choices={
472 'system2',
473 'system3',
472 'system3',
474 '2.7',
475 '3.5',
473 '3.5',
476 '3.6',
474 '3.6',
477 '3.7',
475 '3.7',
@@ -25,7 +25,6 b' DISTROS = {'
25 }
25 }
26
26
27 INSTALL_PYTHONS = r'''
27 INSTALL_PYTHONS = r'''
28 PYENV2_VERSIONS="2.7.17 pypy2.7-7.2.0"
29 PYENV3_VERSIONS="3.5.10 3.6.13 3.7.10 3.8.10 3.9.5 pypy3.5-7.0.0 pypy3.6-7.3.3 pypy3.7-7.3.3"
28 PYENV3_VERSIONS="3.5.10 3.6.13 3.7.10 3.8.10 3.9.5 pypy3.5-7.0.0 pypy3.6-7.3.3 pypy3.7-7.3.3"
30
29
31 git clone https://github.com/pyenv/pyenv.git /hgdev/pyenv
30 git clone https://github.com/pyenv/pyenv.git /hgdev/pyenv
@@ -46,13 +45,6 b' VIRTUALENV_TARBALL=virtualenv-16.7.5.tar'
46 wget -O ${VIRTUALENV_TARBALL} --progress dot:mega https://files.pythonhosted.org/packages/66/f0/6867af06d2e2f511e4e1d7094ff663acdebc4f15d4a0cb0fed1007395124/${VIRTUALENV_TARBALL}
45 wget -O ${VIRTUALENV_TARBALL} --progress dot:mega https://files.pythonhosted.org/packages/66/f0/6867af06d2e2f511e4e1d7094ff663acdebc4f15d4a0cb0fed1007395124/${VIRTUALENV_TARBALL}
47 echo "${VIRTUALENV_SHA256} ${VIRTUALENV_TARBALL}" | sha256sum --check -
46 echo "${VIRTUALENV_SHA256} ${VIRTUALENV_TARBALL}" | sha256sum --check -
48
47
49 for v in ${PYENV2_VERSIONS}; do
50 pyenv install -v ${v}
51 ${PYENV_ROOT}/versions/${v}/bin/python get-pip.py
52 ${PYENV_ROOT}/versions/${v}/bin/pip install ${VIRTUALENV_TARBALL}
53 ${PYENV_ROOT}/versions/${v}/bin/pip install -r /hgdev/requirements-py2.txt
54 done
55
56 for v in ${PYENV3_VERSIONS}; do
48 for v in ${PYENV3_VERSIONS}; do
57 pyenv install -v ${v}
49 pyenv install -v ${v}
58 ${PYENV_ROOT}/versions/${v}/bin/python get-pip.py
50 ${PYENV_ROOT}/versions/${v}/bin/python get-pip.py
@@ -72,7 +64,7 b' for v in ${PYENV3_VERSIONS}; do'
72 ${PYENV_ROOT}/versions/${v}/bin/pip install -r /hgdev/${REQUIREMENTS}
64 ${PYENV_ROOT}/versions/${v}/bin/pip install -r /hgdev/${REQUIREMENTS}
73 done
65 done
74
66
75 pyenv global ${PYENV2_VERSIONS} ${PYENV3_VERSIONS} system
67 pyenv global ${PYENV3_VERSIONS} system
76 '''.lstrip().replace(
68 '''.lstrip().replace(
77 '\r\n', '\n'
69 '\r\n', '\n'
78 )
70 )
@@ -274,17 +266,8 b' PACKAGES="\\'
274 netbase \
266 netbase \
275 ntfs-3g \
267 ntfs-3g \
276 nvme-cli \
268 nvme-cli \
277 pyflakes \
278 pyflakes3 \
269 pyflakes3 \
279 pylint \
280 pylint3 \
270 pylint3 \
281 python-all-dev \
282 python-dev \
283 python-docutils \
284 python-fuzzywuzzy \
285 python-pygments \
286 python-subversion \
287 python-vcr \
288 python3-boto3 \
271 python3-boto3 \
289 python3-dev \
272 python3-dev \
290 python3-docutils \
273 python3-docutils \
@@ -595,9 +578,7 b' def run_tests(ssh_client, python_version'
595
578
596 print('running tests')
579 print('running tests')
597
580
598 if python_version == 'system2':
581 if python_version == 'system3':
599 python = '/usr/bin/python2'
600 elif python_version == 'system3':
601 python = '/usr/bin/python3'
582 python = '/usr/bin/python3'
602 elif python_version.startswith('pypy'):
583 elif python_version.startswith('pypy'):
603 python = '/hgdev/pyenv/shims/%s' % python_version
584 python = '/hgdev/pyenv/shims/%s' % python_version
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now