summaryrefslogtreecommitdiffstats
path: root/base/python2/Pkgfile
diff options
context:
space:
mode:
authortnut <thierryn1 at hispeed dot ch>2011-01-14 22:39:13 +0100
committertnut <thierryn1 at hispeed dot ch>2011-01-14 22:39:13 +0100
commitb7bc664c4775e4817dca0a821a98cd18e25e81d2 (patch)
tree3e6631cf1d8be9a805aa719b10fe26dcd63400d2 /base/python2/Pkgfile
parent52a1425c74b8bbdee4f3839e2fe763adba0d19b0 (diff)
downloadnutyx-extra-b7bc664c4775e4817dca0a821a98cd18e25e81d2.tar.gz
nutyx-extra-b7bc664c4775e4817dca0a821a98cd18e25e81d2.tar.bz2
nutyx-extra-b7bc664c4775e4817dca0a821a98cd18e25e81d2.tar.xz
nutyx-extra-b7bc664c4775e4817dca0a821a98cd18e25e81d2.zip
python2 dans base
Diffstat (limited to 'base/python2/Pkgfile')
-rwxr-xr-xbase/python2/Pkgfile61
1 files changed, 61 insertions, 0 deletions
diff --git a/base/python2/Pkgfile b/base/python2/Pkgfile
new file mode 100755
index 000000000..b67a30181
--- /dev/null
+++ b/base/python2/Pkgfile
@@ -0,0 +1,61 @@
+# Description: Environnement de développement python
+# URL: http://www.python.org
+# Maintainer: NuTyX core team
+# Packager: thierryn1 at hispeed dot ch
+# Depends on:
+
+name=python2
+version=2.7.1
+release=5
+_pybasever=2.7
+
+source=( http://www.python.org/ftp/python/$version/Python-$version.tar.bz2
+ python-2.7-db51.diff)
+
+build() {
+ cd Python-$version
+
+ patch -Np1 -i ../python-2.7-db51.diff
+
+ sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
+
+ rm -r Modules/expat
+ rm -r Modules/zlib
+ rm -r Modules/_ctypes/{darwin,libffi}*
+
+
+ export OPT="${CFLAGS}"
+ ./configure --prefix=/usr --enable-shared --with-threads --enable-ipv6 \
+ --enable-unicode=ucs4 --with-system-expat --with-system-ffi
+
+ make
+ make DESTDIR=$PKG altinstall
+
+ ln -sf python${_pybasever} $PKG/usr/bin/python2
+ ln -sf python${_pybasever}-config $PKG/usr/bin/python2-config
+
+ ln -sf ../../libpython${_pybasever}.so \
+ $PKG/usr/lib/python${_pybasever}/config/libpython${_pybasever}.so
+
+ mv $PKG/usr/bin/smtpd.py $PKG/usr/lib/python${_pybasever}/
+
+ # some useful "stuff"
+ install -dm755 $PKG/usr/lib/python${_pybasever}/Tools/{i18n,scripts}
+ install -m755 Tools/i18n/{msgfmt,pygettext}.py \
+ $PKG/usr/lib/python${_pybasever}/Tools/i18n/
+ install -m755 Tools/scripts/{README,*py} \
+ $PKG/usr/lib/python${_pybasever}/Tools/scripts/
+
+ # fix conflicts with python
+ mv $PKG/usr/bin/idle{,2}
+ mv $PKG/usr/bin/pydoc{,2}
+
+ # clean up #!s
+ find $PKG/usr/lib/python2.7/ -name '*.py' | \
+ xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|"
+
+ # clean-up reference to build directory
+ sed -i "s#$SRC/Python-$version:##" \
+ $PKG/usr/lib/python${_pybasever}/config/Makefile
+}
+