diff options
author | Alastair Tse <liquidx@gentoo.org> | 2003-10-08 15:06:29 +0000 |
---|---|---|
committer | Alastair Tse <liquidx@gentoo.org> | 2003-10-08 15:06:29 +0000 |
commit | 696ed77e10d47882b5c86d709753dc078a647b4e (patch) | |
tree | c71542d9d72b610e8d529c964a1b0be37773d9f8 /dev-lang | |
parent | add pyc/pyo disabling patch (diff) | |
download | historical-696ed77e10d47882b5c86d709753dc078a647b4e.tar.gz historical-696ed77e10d47882b5c86d709753dc078a647b4e.tar.bz2 historical-696ed77e10d47882b5c86d709753dc078a647b4e.zip |
add pyc/pyo disabling patch
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/Manifest | 4 | ||||
-rw-r--r-- | dev-lang/python/files/digest-python-2.3.2-r1 | 1 | ||||
-rw-r--r-- | dev-lang/python/files/python-2.3-gentoo_py_dontcompile.patch | 17 | ||||
-rw-r--r-- | dev-lang/python/python-2.3.2-r1.ebuild | 134 |
4 files changed, 154 insertions, 2 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 7f706aeb80da..5cd4d4c5ce5b 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -1,4 +1,4 @@ -MD5 a6c22eececd7e5dcc619b08c96a45066 ChangeLog 6690 +MD5 22dd51769ed98612d66db2def56ec781 ChangeLog 7053 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 c70d578ef0b3e6358108691e8b88d458 python-2.2.2.ebuild 3027 MD5 ecfb635781f27f8a8f54c552dcd40684 python-2.2.3-r1.ebuild 3298 MD5 0a274212a2a49a52600b617a38bafa09 python-2.2.3-r2.ebuild 3441 MD5 789d8555967a31cc0de2126fa6468fc2 python-2.2.3.ebuild 2999 -MD5 a463f0f4a776461e2826fa1ad1ee928f python-2.3.2-r1.ebuild 3815 +MD5 ee7eac7f6919aaee5b547152db12286d python-2.3.2-r1.ebuild 3965 MD5 7c0dcd5a1aa1ec0db97cd0847faab0d7 python-2.3.2.ebuild 3675 MD5 f3f370c8d1382c1a7571cfc1cbb196d9 files/digest-python-2.1.3-r1 62 MD5 aa73c4258e3be099345a929ad6e01665 files/digest-python-2.2.1-r5 62 diff --git a/dev-lang/python/files/digest-python-2.3.2-r1 b/dev-lang/python/files/digest-python-2.3.2-r1 new file mode 100644 index 000000000000..416c04df6929 --- /dev/null +++ b/dev-lang/python/files/digest-python-2.3.2-r1 @@ -0,0 +1 @@ +MD5 f54d7a529d444994b4b33429bbb45479 Python-2.3.2.tgz 8459427 diff --git a/dev-lang/python/files/python-2.3-gentoo_py_dontcompile.patch b/dev-lang/python/files/python-2.3-gentoo_py_dontcompile.patch new file mode 100644 index 000000000000..22ecd0ef72e6 --- /dev/null +++ b/dev-lang/python/files/python-2.3-gentoo_py_dontcompile.patch @@ -0,0 +1,17 @@ +--- Python-2.3.2/Python/import.c 2003-10-08 12:29:03.166032656 +0100 ++++ import.c 2003-10-08 12:32:57.423420120 +0100 +@@ -808,8 +808,12 @@ + write_compiled_module(PyCodeObject *co, char *cpathname, long mtime) + { + FILE *fp; +- +- fp = open_exclusive(cpathname); ++ char *py_dontcompile = getenv("PYTHON_DONTCOMPILE"); ++ ++ if (!py_dontcompile) ++ fp = open_exclusive(cpathname); ++ else ++ fp = NULL; + if (fp == NULL) { + if (Py_VerboseFlag) + PySys_WriteStderr( diff --git a/dev-lang/python/python-2.3.2-r1.ebuild b/dev-lang/python/python-2.3.2-r1.ebuild new file mode 100644 index 000000000000..5e83c7cff26a --- /dev/null +++ b/dev-lang/python/python-2.3.2-r1.ebuild @@ -0,0 +1,134 @@ +# 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-r1.ebuild,v 1.1 2003/10/08 15:06: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="readline tcltk berkdb bootstrap ipv6 cjk" +LICENSE="PSF-2.2" +SLOT="2.3" + +KEYWORDS="~x86" +# "~ppc ~sparc ~alpha ~mips ~hppa ~arm" + +DEPEND="virtual/glibc + >=sys-libs/zlib-1.1.3 + readline? ( >=sys-libs/readline-4.1 >=sys-libs/ncurses-5.2 ) + berkdb? ( >=sys-libs/db-3 ) + tcltk? ( >=dev-lang/tk-8.0 ) + || ( dev-libs/expat + ( !build? ( dev-libs/expat ) ) + ( !bootstrap? ( dev-libs/expat ) ) + )" +# This is a hairy one. Basically depend on dev-libs/expat +# if "build" or "bootstrap" not in USE. + +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-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_compile() { + filter-flags -malign-double + + [ "${ARCH}" = "hppa" ] && append-flags -fPIC + [ "${ARCH}" = "alpha" ] && 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 + + # FIXME: (need to verify the consequences of this, probably breaks tkinter?) + # use unicode ucs4 if cjk, otherwise use ucs2. + use cjk \ + && myconf="${myconf} --enable-unicode=ucs4" \ + || myconf="${myconf} --enable-unicode=ucs2" + + econf --with-fpectl \ + --enable-shared \ + `use_enable ipv6` \ + --infodir='${prefix}'/share/info \ + --mandir='${prefix}'/share/man \ + --with-threads \ + ${myconf} || die + emake || die "Parallel make failed" +} + +src_install() { + dodir /usr + make DESTDIR="${D}" altinstall || die + + # install our own custom python-config + exeinto /usr/bin + newexe ${FILESDIR}/python-config-${PV} python-config + + # This stuff below 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 + + 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 + +} |