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 2019-01-02 15:17:20 +01:00 committed by Kubernetes Prow Robot
parent 5834e609a6
commit d58b338bd8
4 changed files with 12 additions and 19041 deletions

View File

@ -11,22 +11,22 @@ if [[ -e $BINDIR/.bootstrapped ]]; then
exit 0 exit 0
fi 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 - wget -O - https://bitbucket.org/pypy/pypy/downloads/pypy3-$PYPY_VERSION-linux64.tar.bz2 | tar -xjf -
mv -n pypy-$PYPY_VERSION-linux64 pypy mv -n pypy3-$PYPY_VERSION-linux64 pypy3
## library fixup ## library fixup
mkdir -p pypy/lib mkdir -p pypy3/lib
if [ -f /lib64/libncurses.so.5.9 ]; then 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 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 fi
cat > $BINDIR/python <<EOF cat > $BINDIR/python <<EOF
#!/bin/bash #!/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 EOF
chmod +x $BINDIR/python chmod +x $BINDIR/python

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
BINDIR="/opt/bin" 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) $@

View File

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