From 21b91b1dbe8d917ba740ed9bc3f717e95c51ac93 Mon Sep 17 00:00:00 2001 From: Shivansh-007 Date: Wed, 17 Mar 2021 09:30:42 +0530 Subject: [PATCH] pkg(python-2.7.18): Add python 2.7.18 --- packages/python/2.7.18/build.sh | 21 +++++++++++++++++++++ packages/python/2.7.18/environment | 1 + packages/python/2.7.18/metadata.json | 6 ++++++ packages/python/2.7.18/run | 3 +++ packages/python/2.7.18/test.py | 1 + 5 files changed, 32 insertions(+) create mode 100755 packages/python/2.7.18/build.sh create mode 100644 packages/python/2.7.18/environment create mode 100644 packages/python/2.7.18/metadata.json create mode 100644 packages/python/2.7.18/run create mode 100644 packages/python/2.7.18/test.py diff --git a/packages/python/2.7.18/build.sh b/packages/python/2.7.18/build.sh new file mode 100755 index 0000000..1cc8e23 --- /dev/null +++ b/packages/python/2.7.18/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +PREFIX=$(realpath $(dirname $0)) + +mkdir -p build + +cd build + +curl "https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz" -o python.tar.gz +tar xzf python.tar.gz --strip-components=1 +rm python.tar.gz + +./configure --prefix "$PREFIX" --with-ensurepip=install +make -j$(nproc) +make install -j$(nproc) + +cd .. + +rm -rf build + + diff --git a/packages/python/2.7.18/environment b/packages/python/2.7.18/environment new file mode 100644 index 0000000..bd0ff98 --- /dev/null +++ b/packages/python/2.7.18/environment @@ -0,0 +1 @@ +export PATH=$PWD/bin:$PATH \ No newline at end of file diff --git a/packages/python/2.7.18/metadata.json b/packages/python/2.7.18/metadata.json new file mode 100644 index 0000000..fb22add --- /dev/null +++ b/packages/python/2.7.18/metadata.json @@ -0,0 +1,6 @@ +{ + "language": "python", + "version": "2.7.18", + "author": "Shivansh-007 ", + "aliases": ["py", "python2"] +} \ No newline at end of file diff --git a/packages/python/2.7.18/run b/packages/python/2.7.18/run new file mode 100644 index 0000000..9858f52 --- /dev/null +++ b/packages/python/2.7.18/run @@ -0,0 +1,3 @@ +#!/bin/bash + +python2.7 "$@" \ No newline at end of file diff --git a/packages/python/2.7.18/test.py b/packages/python/2.7.18/test.py new file mode 100644 index 0000000..d9708c5 --- /dev/null +++ b/packages/python/2.7.18/test.py @@ -0,0 +1 @@ +print "OK" \ No newline at end of file