Browse Source

Update the version of pypy used on CoreOS bootstrap-os (#3922)

* Update the version of pypy used on CoreOS bootstrap-os

* update the pip installation process on CoreOS
pull/3958/head
MarkusTeufelberger 5 years ago
committed by Kubernetes Prow Robot
parent
commit
d58b338bd8
4 changed files with 12 additions and 19041 deletions
  1. 14
      roles/bootstrap-os/files/bootstrap.sh
  2. 19017
      roles/bootstrap-os/files/get-pip.py
  3. 2
      roles/bootstrap-os/files/runner
  4. 20
      roles/bootstrap-os/tasks/bootstrap-coreos.yml

14
roles/bootstrap-os/files/bootstrap.sh

@ -11,22 +11,22 @@ if [[ -e $BINDIR/.bootstrapped ]]; then
exit 0
fi
PYPY_VERSION=5.1.0
PYPY_VERSION=v6.0.0
wget -O - https://bitbucket.org/pypy/pypy/downloads/pypy-$PYPY_VERSION-linux64.tar.bz2 |tar -xjf -
mv -n pypy-$PYPY_VERSION-linux64 pypy
wget -O - https://bitbucket.org/pypy/pypy/downloads/pypy3-$PYPY_VERSION-linux64.tar.bz2 | tar -xjf -
mv -n pypy3-$PYPY_VERSION-linux64 pypy3
## library fixup
mkdir -p pypy/lib
mkdir -p pypy3/lib
if [ -f /lib64/libncurses.so.5.9 ]; then
ln -snf /lib64/libncurses.so.5.9 $BINDIR/pypy/lib/libtinfo.so.5
ln -snf /lib64/libncurses.so.5.9 $BINDIR/pypy3/lib/libtinfo.so.5
elif [ -f /lib64/libncurses.so.6.1 ]; then
ln -snf /lib64/libncurses.so.6.1 $BINDIR/pypy/lib/libtinfo.so.5
ln -snf /lib64/libncurses.so.6.1 $BINDIR/pypy3/lib/libtinfo.so.5
fi
cat > $BINDIR/python <<EOF
#!/bin/bash
LD_LIBRARY_PATH=$BINDIR/pypy/lib:$LD_LIBRARY_PATH exec $BINDIR/pypy/bin/pypy "\$@"
LD_LIBRARY_PATH=$BINDIR/pypy3/lib:$LD_LIBRARY_PATH exec $BINDIR/pypy3/bin/pypy3 "\$@"
EOF
chmod +x $BINDIR/python

19017
roles/bootstrap-os/files/get-pip.py
File diff suppressed because it is too large
View File

2
roles/bootstrap-os/files/runner

@ -1,3 +1,3 @@
#!/bin/bash
BINDIR="/opt/bin"
LD_LIBRARY_PATH=$BINDIR/pypy/lib:$LD_LIBRARY_PATH $BINDIR/pypy/bin/$(basename $0) $@
LD_LIBRARY_PATH=$BINDIR/pypy3/lib:$LD_LIBRARY_PATH $BINDIR/pypy3/bin/$(basename $0) $@

20
roles/bootstrap-os/tasks/bootstrap-coreos.yml

@ -24,7 +24,7 @@
- facts
- name: Bootstrap | Check if we need to install pip
shell: "pip --version"
shell: "pip3 --version"
register: need_pip
failed_when: false
changed_when: false
@ -34,26 +34,14 @@
environment:
PATH: "{{ ansible_env.PATH }}:{{ bin_dir }}"
- name: Bootstrap | Copy get-pip.py
copy:
src: get-pip.py
dest: ~/get-pip.py
when: need_pip.rc != 0
- name: Bootstrap | Install pip
shell: "{{ansible_python_interpreter}} ~/get-pip.py"
when: need_pip.rc != 0
- name: Bootstrap | Remove get-pip.py
file:
path: ~/get-pip.py
state: absent
shell: "{{ ansible_python_interpreter }} -m ensurepip"
when: need_pip.rc != 0
- name: Bootstrap | Install pip launcher
copy:
src: runner
dest: "{{ bin_dir }}/pip"
dest: "{{ bin_dir }}/pip3"
mode: 0755
when: need_pip.rc != 0
@ -61,7 +49,7 @@
pip:
name: "{{ item }}"
extra_args: "{{ pip_extra_args | default(omit) }}"
with_items: "{{pip_python_coreos_modules}}"
with_items: "{{ pip_python_coreos_modules }}"
environment:
PATH: "{{ ansible_env.PATH }}:{{ bin_dir }}"

Loading…
Cancel
Save