Skip to content
Snippets Groups Projects
Commit c49162a4 authored by Patrick MADELA's avatar Patrick MADELA
Browse files

Update .gitlab-ci.yml file

parent ff3689da
Branches
No related tags found
No related merge requests found
Pipeline #1003 passed
......@@ -5,6 +5,7 @@ variables:
OS: "linux-el6"
ARCH: "x86_64"
NAME: "python-${PYTHON_VERSION}-${OS}-${ARCH}"
PYTHON_ROOT: "${CI_PROJECT_DIR}/${NAME}"
stages:
- build
......@@ -12,26 +13,21 @@ stages:
build:
stage: build
script:
# - yum -y install zlib-devel bzip2-devel openssl-devel readline-devel ncurses-devel sqlite-devel gdbm-devel db4-devel expat-devel libpcap-devel xz-devel pcre-devel libffi-devel tk-devel
# - curl -s https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz | tar -xJf - -C /tmp
# - cd /tmp/Python-${PYTHON_VERSION}
# - ./configure --prefix=${PYTHON_ROOT}
# - make -j 4
# - make install
# - ln -s python3 ${PYTHON_ROOT}/bin/python
# - cd /tmp && rm -rf /tmp/Python-${PYTHON_VERSION}
# # Upgrade pip
# - ${PYTHON_ROOT}/bin/pip3 install -q --no-cache-dir --upgrade pip
# # Fix python shebang to make it independent of install path
# - grep -I -r -l "^#\!${PYTHON_ROOT}/bin/python.*$" ${PYTHON_ROOT} | xargs sed -i '1c\#\!/usr/bin/env python'
# # Clean pycache
# - find ${PYTHON_ROOT} -iname __pycache__ -print0 | xargs -0 rm -rf
- env
- pwd
- mkdir -p ${NAME}/bin
- echo test > ${NAME}/bin/python
- cd ${NAME}
- ls -al
- yum -y install zlib-devel bzip2-devel openssl-devel readline-devel ncurses-devel sqlite-devel gdbm-devel db4-devel expat-devel libpcap-devel xz-devel pcre-devel libffi-devel tk-devel
- curl -s https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz | tar -xJf -
- cd Python-${PYTHON_VERSION}
- ./configure --prefix=${PYTHON_ROOT}
- make -j 4
- make install
- ln -s python3 ${PYTHON_ROOT}/bin/python
- rm -rf Python-${PYTHON_VERSION}
# Upgrade pip
- ${PYTHON_ROOT}/bin/pip3 install -q --no-cache-dir --upgrade pip
# Fix python shebang to make it independent of install path
- grep -I -r -l "^#\!${PYTHON_ROOT}/bin/python.*$" ${PYTHON_ROOT} | xargs sed -i '1c\#\!/usr/bin/env python'
# Clean pycache
- find ${PYTHON_ROOT} -iname __pycache__ -print0 | xargs -0 rm -rf
- cd ${PYTHON_ROOT}
- zip -r --symlinks ${CI_PROJECT_DIR}/${NAME}.zip *
artifacts:
name: ${NAME}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment