[Lunar-commits] <moonbase-other> Python-3: Adding to moonbase. DO NOT REMOVE "make altinstall" from the

stumbles stumbles at lunar-linux.org
Sat Oct 13 17:00:16 CEST 2012


commit a8a263288e7b2a5f6fb312ddfcf5e2cbf3f364d3
Author: stumbles <stumbles at lunar-linux.org>
Date: Sat, 13 Oct 2012 08:00:16 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/a8a263288e7b2a5f6fb312ddfcf5e2cbf3f364d3

Python-3: Adding to moonbase. DO NOT REMOVE "make altinstall" from the
BUILD.

BIG FAT WARNING:

If you run /usr/bin/2to3-3.3 conversion script on existing python scripts

YOU ARE ON YOUR OWN.

Doing this could cause all manner of maladies and just might cause all the
integrated circuits on your motherboard to transform into their respective
descrete components thus causing it to explode in size filling your living
room. The wadya gonna do?

WE PREFER to let those modules able to use Python3 to do their own thing
on their own.

YOU HAVE BEEN WARNED.
---
  python/Python-3/BUILD        | +17/-0    
  python/Python-3/DEPENDS      | +2/-0     
  python/Python-3/DETAILS      | +21/-0    
  python/Python-3/POST_INSTALL | +12/-0    
  4 files changed, 52 insertions(+)

--- /dev/null
+++ b/python/Python-3/BUILD
@@ -0,0 +1,17 @@
+(
+
+  OPTS+=" --enable-shared --with-threads"  &&
+
+  default_config &&
+
+# This is important, lets 2.x versions and it to coexist.
+  make &&
+  prepare_install &&
+  make altinstall &&
+
+# Till Python 3 based apps catch up we need a symlink from python3.3 to python3
+  ln -sf /usr/bin/python3.3 /usr/bin/python3
+
+) > $C_FIFO 2>&1
+
+  
--- /dev/null
+++ b/python/Python-3/DEPENDS
@@ -0,0 +1,2 @@
+optional_depends "expat"     "--with-system-expat"    "--without-system-expat"    "Use system provided expat support"
+optional_depends "libffi"    "--with-system-ffi"      "--without-system-ffi"      "Use system provided libffi support"
--- /dev/null
+++ b/python/Python-3/DETAILS
@@ -0,0 +1,21 @@
+          MODULE=Python-3
+         VERSION=3.0
+          SOURCE=$MODULE.$VERSION.tar.bz2
+      SOURCE_URL=http://www.python.org/ftp/python/${MODULE#*-}.$VERSION/
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE.$VERSION
+      SOURCE_VFY=sha1:3e1464bc2c1dfa74287bc58da81168f50b0ae5c7
+        WEB_SITE=http://www.python.org
+         ENTERED=20121013
+         UPDATED=20121013
+           SHORT="Interpreted, interactive, object-oriented programming language"
+
+cat << EOF
+Python is an interpreted, interactive, object-oriented programming
+language. It combines remarkable power with very clear syntax, and isn't
+difficult to learn. It has modules, classes, exceptions, very high level
+data types, and dynamic typing. There are interfaces to many system
+calls and libraries, as well as to various windowing systems (Tk, Mac,
+MFC, GTK+, Qt, wxWindows). Newbuilt-in modules are easily written in C
+or C++. Python is also usable as an extension language for applications
+that need a programmable interface.
+EOF
--- /dev/null
+++ b/python/Python-3/POST_INSTALL
@@ -0,0 +1,12 @@
+#  Reinstall site-packages 
+message "${MESSAGE_COLOR}Any Python module previously installed may now be broken due to the way Python"
+message "handles modules. They may need to be recompiled in order to work, especially"
+message "on a major version change like 3.0 to 3.1 Minor version numbers,"
+message "like 3.3.0, to 3.3.1 are usually safe without recompiling.${DEFAULT_COLOR}"
+
+if query "Do you want lunar to attempt to upgrade your Python modules?" y; then
+        PYTHONMODS="$( lvu from /usr/lib/python3*/site-packages | cut -d: -f1 | uniq | grep -v Python)"
+        for PYTHONMOD in $(sort_by_dependency $PYTHONMODS); do
+                lin -c $PYTHONMOD || true
+        done
+fi




More information about the Lunar-commits mailing list