summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Tse <liquidx@gentoo.org>2003-11-22 15:13:18 +0000
committerAlastair Tse <liquidx@gentoo.org>2003-11-22 15:13:18 +0000
commit2b56813e6e0ba46d73d855cb83f626aa182a8ff5 (patch)
tree3ffab97f30340ba1b327841bf1255a00e29de935 /dev-lang
parentucs4 is now default for python-2.3. python-updater has some added options. (diff)
downloadgentoo-2-2b56813e6e0ba46d73d855cb83f626aa182a8ff5.tar.gz
gentoo-2-2b56813e6e0ba46d73d855cb83f626aa182a8ff5.tar.bz2
gentoo-2-2b56813e6e0ba46d73d855cb83f626aa182a8ff5.zip
ucs4 is now default for python-2.3. python-updater has some added options.
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/python/ChangeLog20
-rw-r--r--dev-lang/python/Manifest6
-rw-r--r--dev-lang/python/files/digest-python-2.3.2-r21
-rw-r--r--dev-lang/python/files/python-updater40
-rw-r--r--dev-lang/python/python-2.3.2-r2.ebuild156
5 files changed, 209 insertions, 14 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog
index 40deb02b2892..d482d5987013 100644
--- a/dev-lang/python/ChangeLog
+++ b/dev-lang/python/ChangeLog
@@ -1,6 +1,24 @@
# ChangeLog for dev-lang/python
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.51 2003/11/13 09:01:53 liquidx Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.52 2003/11/22 15:13:12 liquidx Exp $
+
+*python-2.3.2-r2 (22 Nov 2003)
+
+ 22 Nov 2003; Alastair Tse <liquidx@gentoo.org> python-2.3.2-r2.ebuild,
+ files/python-updater:
+ ucs4 is now default. if you previously had python-2.3 merged, you'll need to
+ update your packages again. (sorry, that is the price for running p.mask'ed
+ versions). to update your python packages if you had python-2.3 installed,
+ run :
+
+ /usr/portage/dev-lang/python/files/python-updater -o 2.3
+
+ if you are upgrading from python-2.2, then you will need to run:
+
+ /usr/portage/dev-lang/python/files/python-updater
+
+ python-updater script also modified to have more robust command-line
+ parsing. hopefully this will be the last revision till we can go ~x86.
13 Nov 2003; Alastair Tse <liquidx@gentoo.org> python-2.3.2-r1.ebuild:
fix python-config install for python-2.3
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index ceee9aee25fc..23b6b7e4a578 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,4 +1,4 @@
-MD5 61e9585214c85d7f80349b198a7b4438 ChangeLog 9822
+MD5 bf0cd5a39f61e644ff58adecbb9652f6 ChangeLog 10529
MD5 8145ce0144332d6caca98fa5fb648741 metadata.xml 221
MD5 58b06d58bccd371fcbf1b781164c75a9 python-2.1.3-r1.ebuild 2345
MD5 f7959cf61958991a7e25f83a4e8b2ff8 python-2.2.1-r5.ebuild 2912
@@ -7,7 +7,7 @@ MD5 58ed89f3cc48f16f8bc96b76490e5b6a python-2.2.3-r1.ebuild 3293
MD5 77b761a177b5943e0a0893fcbd8b0e3a python-2.2.3-r5.ebuild 4472
MD5 789d8555967a31cc0de2126fa6468fc2 python-2.2.3.ebuild 2999
MD5 cca542f96b13c06fa4f7cd6626182a6c python-2.3.2-r1.ebuild 4817
-MD5 8efd0beb961ba91576860c3a502037f4 python-2.3.2-r2.ebuild 4697
+MD5 a37f869182da9839fe8494a9e020e764 python-2.3.2-r2.ebuild 4723
MD5 3dbbf5dfb3660eb003061a0c59f6e758 files/depreorder.py 1947
MD5 f3f370c8d1382c1a7571cfc1cbb196d9 files/digest-python-2.1.3-r1 62
MD5 aa73c4258e3be099345a929ad6e01665 files/digest-python-2.2.1-r5 62
@@ -30,4 +30,4 @@ MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2 178
MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2.1 178
MD5 b530d6f9dbcf30239061be3de80932cc files/python-config-2.2.2 178
MD5 201acd1cfd5124f25c58a8db3f78a502 files/python-config-2.3 178
-MD5 5179879c392872e491a5be1b97c08a85 files/python-updater 7753
+MD5 85f269cd745feae3953f7e35215e242d files/python-updater 8138
diff --git a/dev-lang/python/files/digest-python-2.3.2-r2 b/dev-lang/python/files/digest-python-2.3.2-r2
new file mode 100644
index 000000000000..416c04df6929
--- /dev/null
+++ b/dev-lang/python/files/digest-python-2.3.2-r2
@@ -0,0 +1 @@
+MD5 f54d7a529d444994b4b33429bbb45479 Python-2.3.2.tgz 8459427
diff --git a/dev-lang/python/files/python-updater b/dev-lang/python/files/python-updater
index d0e2e8842820..cfc1ff9dcd43 100644
--- a/dev-lang/python/files/python-updater
+++ b/dev-lang/python/files/python-updater
@@ -23,8 +23,6 @@
OLD_PY_VER=2.2
NEW_PY_VER=$(python -V 2>&1 | sed 's:Python ::' | cut -d. -f1-2)
-OLD_MODULES_DIR=/usr/lib/python${OLD_PY_VER}
-OLD_INCLUDE_DIR=/usr/include/python${OLD_PY_VER}
PKGS_EXCEPTIONS="dev-lang/python sys-apps/portage"
PKGS_MANUAL="app-office/gnumeric app-office/dia x11-libs/vte"
@@ -71,6 +69,14 @@ elog() {
}
+usage() {
+ echo "usage: python-updater [-h|-p|-o X.X|-n X.X]"
+ echo " -h help"
+ echo " -p pretend (don't do anything)"
+ echo " -o X.X set old python version to upgrade from [default: ${OLD_PY_VER}]"
+ echo " -n X.X set new python version to upgrade to [default: ${NEW_PY_VER}]"
+}
+
#
# Sanity check
#
@@ -93,21 +99,30 @@ fi
# Command Line Parsing
#
#
-
-if [ -n "$1" ]; then
+while [ -n "$1" ]; do
case "$1" in
- -h)
- echo "usage: python-updater [-h|-p]"
- echo " -h help"
- echo " -p pretend (don't do anything)"
+ -h)
+ usage
+ exit 0
;;
-p)
PRETEND=1
;;
+ -o)
+ shift
+ OLD_PY_VER="$1"
+ ;;
+ -n)
+ shift
+ NEW_PY_VER="$1"
+ ;;
*)
+ usage
+ echo "unrecognised option: $1"
;;
esac
-fi
+ shift
+done
#
# Test where portage is, in python2.2 or somewhere else?
@@ -125,6 +140,8 @@ done
# /usr/lib/python${OLD_PY_VER}
#
#
+OLD_MODULES_DIR=/usr/lib/python${OLD_PY_VER}
+OLD_INCLUDE_DIR=/usr/include/python${OLD_PY_VER}
eloginfo "Starting Python Updater from ${OLD_PY_VER} to ${NEW_PY_VER} :"
eloginfo "Searching for packages with files in ${OLD_MODULES_DIR} .."
@@ -219,10 +236,12 @@ OUTPUT_PKGS_FAILED=""
for pkg in ${PKGS_FAILED}; do OUTPUT_PKGS_FAILED="${OUTPUT_PKGS_FAILED} \=$pkg"; done
if [ -n "${PKGS_FAILED}" -o -n "${PKGS_MISSING}" -o -n "${PKGS_MASKED}" ]; then
+ ewarn " "
ewarn "************************************************************"
ewarn "* Packages that still need to be manually emerged : *"
ewarn "************************************************************"
if [ -n "${OUTPUT_PKGS_MASKED}" ]; then
+ ewarn " "
ewarn " Masked Packages:"
ewarn " ----------------"
ewarn " Unmask the following packages (at your own risk) and "
@@ -233,6 +252,7 @@ if [ -n "${PKGS_FAILED}" -o -n "${PKGS_MISSING}" -o -n "${PKGS_MASKED}" ]; then
ewarn " "
fi
if [ -n "${OUTPUT_PKGS_MISSING}" ]; then
+ ewarn " "
ewarn " Missing Packages:"
ewarn " -----------------"
ewarn " These packages need to be updated because their versions do"
@@ -241,9 +261,9 @@ if [ -n "${PKGS_FAILED}" -o -n "${PKGS_MISSING}" -o -n "${PKGS_MASKED}" ]; then
for x in ${OUTPUT_PKGS_MISSING}; do
echo " ${x}"
done
- ewarn " "
fi
if [ -n "${OUTPUT_PKGS_FAILED}" ]; then
+ ewarn " "
ewarn " Failed Packaged:"
ewarn " ----------------"
ewarn " These packages have failed and need to be re-emerged again."
diff --git a/dev-lang/python/python-2.3.2-r2.ebuild b/dev-lang/python/python-2.3.2-r2.ebuild
new file mode 100644
index 000000000000..cec3b3d74242
--- /dev/null
+++ b/dev-lang/python/python-2.3.2-r2.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.3.2-r2.ebuild,v 1.1 2003/11/22 15:13:12 liquidx Exp $
+
+inherit flag-o-matic python
+
+MY_PV=${PV/_rc/c}
+PYVER_MAJOR="`echo ${PV%_*} | cut -d '.' -f 1`"
+PYVER_MINOR="`echo ${PV%_*} | cut -d '.' -f 2`"
+PYVER="${PYVER_MAJOR}.${PYVER_MINOR}"
+
+S="${WORKDIR}/Python-${MY_PV}"
+DESCRIPTION="A really great language"
+SRC_URI="http://www.python.org/ftp/python/${PV%_*}/Python-${MY_PV}.tgz"
+HOMEPAGE="http://www.python.org"
+
+IUSE="ncurses gdbm ssl readline tcltk berkdb bootstrap ipv6 build"
+LICENSE="PSF-2.2"
+SLOT="2.3"
+
+KEYWORDS="~x86"
+# "~ppc ~sparc ~alpha ~mips ~hppa ~arm"
+
+DEPEND="virtual/glibc
+ >=sys-libs/zlib-1.1.3
+ !build? ( tcltk? ( >=dev-lang/tk-8.0 )
+ ncurses? ( >=sys-libs/ncurses-5.2 readline? ( >=sys-libs/readline-4.1 ) )
+ berkdb? ( >=sys-libs/db-3.1 )
+ gdbm? ( sys-libs/gdbm )
+ ssl? ( dev-libs/openssl )
+ doc? ( =dev-python/python-docs-${PV}* )
+ dev-libs/expat
+ )"
+
+RDEPEND="${DEPEND} dev-python/python-fchksum"
+
+# The dev-python/python-fchksum RDEPEND is needed to that this python provides
+# the functionality expected from previous pythons.
+
+PROVIDE="virtual/python"
+
+
+src_unpack() {
+ unpack ${A}
+ # adds /usr/lib/portage/pym to sys.path - liquidx (08 Oct 03)
+ EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-2.3.2-disable_modules_and_ssl.patch
+ EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-2.3-add_portage_search_path.patch
+ # adds support for PYTHON_DONTCOMPILE shell environment to
+ # supress automatic generation of .pyc and .pyo files - liquidx (08 Oct 03)
+ EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-2.3-gentoo_py_dontcompile.patch
+}
+
+src_configure() {
+ # disable extraneous modules with extra dependencies
+ if [ -n "`use build`" ]; then
+ export PYTHON_DISABLE_MODULES="readline pyexpat dbm gdbm bsddb _socket _curses _curses_panel _tkinter"
+ export PYTHON_DISABLE_SSL=1
+ else
+ use gdbm \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} gdbm"
+ use berkdb \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} dbm bsddb"
+ use readline \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} readline"
+ use tcltk \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _tkinter"
+ use ncurses \
+ || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _curses _curses_panel"
+ use ssl \
+ || export PYTHON_DISABLE_SSL=1
+ export PYTHON_DISABLE_MODULES
+ fi
+}
+
+src_compile() {
+ filter-flags -malign-double
+
+ [ "${ARCH}" = "hppa" ] && append-flags -fPIC
+ [ "${ARCH}" = "alpha" ] && append-flags -fPIC
+ [ "${ARCH}" = "amd64" ] && append-flags -fPIC
+
+ export OPT="${CFLAGS}"
+
+ local myconf
+ #if we are creating a new build image, we remove the dependency on g++
+ if [ "`use build`" -a ! "`use bootstrap`" ]; then
+ myconf="--with-cxx=no"
+ fi
+
+ src_configure
+
+ econf --with-fpectl \
+ --enable-shared \
+ --enable-unicode=ucs4 \
+ `use_enable ipv6` \
+ --infodir='${prefix}'/share/info \
+ --mandir='${prefix}'/share/man \
+ --with-threads \
+ ${myconf} || die
+ emake || die "Parallel make failed"
+}
+
+src_install() {
+ dodir /usr
+ src_configure
+ make DESTDIR="${D}" altinstall || die
+
+ # install our own custom python-config
+ exeinto /usr/bin
+ newexe ${FILESDIR}/python-config-${PYVER} python-config
+
+ # The stuff below this line extends from 2.1, and should be deprecated
+ # in 2.3, or possibly can wait till 2.4
+
+ # seems like the build do not install Makefile.pre.in anymore
+ # it probably shouldn't - use DistUtils, people!
+ insinto /usr/lib/python${PYVER}/config
+ doins ${S}/Makefile.pre.in
+
+ # While we're working on the config stuff... Let's fix the OPT var
+ # so that it doesn't have any opts listed in it. Prevents the problem
+ # with compiling things with conflicting opts later.
+ dosed -e 's:^OPT=.*:OPT=-DNDEBUG:' /usr/lib/python${PYVER}/config/Makefile
+
+}
+
+pkg_postrm() {
+ python_makesym
+ python_mod_cleanup
+}
+
+pkg_postinst() {
+ python_makesym
+ python_mod_optimize
+ python_mod_optimize -x site-packages -x test ${ROOT}usr/lib/python${PYVER}
+
+ echo
+ ewarn
+ ewarn "If you have just upgraded from python-2.2.x you will need to run:"
+ ewarn
+ ewarn "${PORTDIR}/dev-lang/python/files/python-updater"
+ ewarn
+ ewarn "This will automatically rebuild all the python dependent modules"
+ ewarn "to run with python-2.3."
+ ewarn
+ ewarn "Python 2.2 is still installed and can be accessed via /usr/bin/python2.2."
+ ewarn "Portage-2.0.49-r8 and below will continue to use python-2.2.x, so"
+ ewarn "think twice about uninstalling it, otherwise your system will break."
+ ewarn
+ echo -ne "\a"; sleep 1
+ echo -ne "\a"; sleep 1
+ echo -ne "\a"; sleep 1
+ echo -ne "\a"; sleep 1
+ echo -ne "\a"; sleep 1
+
+}