VS-Code - How to put vscode executable in system path and how to open source code directly in vscode
Introduction VS code is an excellent free IDE for maany types of programming…
March 03, 2021
In this post, we will see how we can apply a patch to Python and install it through pyenv.
We will take example of FIPS patch to python 3.9.2, as in post
We are doing it for Centos-7.
First, we will set some environment variable.
PYENV_VERSION=3.9.2
PYENV_INSTALLER_URL=https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer
PYTHON_CONFIGURE_OPTS="--enable-shared"
Lets download pyenv installer.
umask 022
curl -s -S -L "$PYENV_INSTALLER_URL" -o /usr/bin/pyenv-installer
chmod 0755 /usr/bin/pyenv-installer
Installing Pyenv
/usr/bin/pyenv-installer
export PATH="/root/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
Apply patch (assuming we have patch from post) and Install Python 3.9.2
pyenv install --patch $PYENV_VERSION < python_patch_3.9.2.patch
pyenv global $PYENV_VERSION
Its clean and easier way to install Python through pyenv.
Lets do it via Dockerfile
FROM centos:7
RUN yum makecache fast && yum -y update
RUN yum -y install git \
libffi-devel libffi libssh2-devel autoconf automake libtool \
libxml2-devel libxslt-devel libjpeg-devel zlib-devel \
make cmake gcc python-devel python-setuptools wget \
&& yum clean all \
&& rm -rf /var/cache/yum
ADD python_patch_3.9.2.patch /python_installation/
ARG PYENV_VERSION=3.9.2
ENV PYENV_INSTALLER_URL=https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer
ENV PYTHON_CONFIGURE_OPTS="--enable-shared"
RUN umask 022 \
&& curl -s -S -L "$PYENV_INSTALLER_URL" -o /usr/bin/pyenv-installer \
&& chmod 0755 /usr/bin/pyenv-installer \
&& /usr/bin/pyenv-installer \
&& eval "$(pyenv init -)" \
&& pyenv install --patch $PYENV_VERSION < /python_installation/python_patch_3.9.2.patch \
&& pyenv global $PYENV_VERSION
Introduction VS code is an excellent free IDE for maany types of programming…
Listing down the commonly used Elastic Search queries. You can get search…
Introduction In the ReactJS project, you are having aa parent component and a…
While running docker commands with some images, I started getting error: The…
Introduction We often require to execute in timed manner, i.e. to specify a max…
This post some useful tips of using strings, and some issues while dealing with…
Introduction This post has the complete code to send email through smtp server…
Introduction In a normal email sending code from python, I’m getting following…
Introduction In one of my app, I was using to talk to . I have used some event…
Introduction So you have a Django project, and want to run it using docker image…
Introduction It is very important to introduce few process so that your code and…
Introduction In this post, we will see a sample Jenkin Pipeline Groovy script…