diff options
author | Alastair Tse <liquidx@gentoo.org> | 2003-11-01 20:15:51 +0000 |
---|---|---|
committer | Alastair Tse <liquidx@gentoo.org> | 2003-11-01 20:15:51 +0000 |
commit | f5e67155efbd8c74442b513d67f9a183c6251f70 (patch) | |
tree | c703713fa210b0399cbe8c2cb91ddddf57df128d /dev-lang | |
parent | many changes to handling of useflags and dependencies (diff) | |
download | gentoo-2-f5e67155efbd8c74442b513d67f9a183c6251f70.tar.gz gentoo-2-f5e67155efbd8c74442b513d67f9a183c6251f70.tar.bz2 gentoo-2-f5e67155efbd8c74442b513d67f9a183c6251f70.zip |
many changes to handling of useflags and dependencies
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/ChangeLog | 9 | ||||
-rw-r--r-- | dev-lang/python/Manifest | 12 | ||||
-rw-r--r-- | dev-lang/python/files/python-2.2.3-disable_modules_and_ssl.patch | 35 | ||||
-rw-r--r-- | dev-lang/python/files/python-2.3.2-disable_modules_and_ssl.patch | 36 | ||||
-rw-r--r-- | dev-lang/python/python-2.2.3-r5.ebuild | 49 | ||||
-rw-r--r-- | dev-lang/python/python-2.3.2-r1.ebuild | 47 |
6 files changed, 151 insertions, 37 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog index 8cc2de53e95a..c5a34c593380 100644 --- a/dev-lang/python/ChangeLog +++ b/dev-lang/python/ChangeLog @@ -1,6 +1,13 @@ # 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.45 2003/10/27 09:21:51 liquidx Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.46 2003/11/01 20:15:46 liquidx Exp $ + + 01 Nov 2003; Alastair Tse <liquidx@gentoo.org> python-2.2.3-r5.ebuild, + python-2.3.2-r1.ebuild, files/python-2.2.3-disable_modules_and_ssl.patch, + files/python-2.3.2-disable_modules_and_ssl.patch: + reordered deps to allow minimal python build for USE='build'. makes python + respect useflags explicitly even if the dependency exists. added support to + disable SSL. tweaked python_mod_optimize. *python-2.2.3-r5 (27 Oct 2003) diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 3aabb48e56d5..ad7dc68a5cf3 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -1,4 +1,4 @@ -MD5 8bf2ec3eed7afe1971594b892580a5e2 ChangeLog 8469 +MD5 d00651f14749d352fda8fc57f4b1da0a ChangeLog 8870 MD5 8145ce0144332d6caca98fa5fb648741 metadata.xml 221 MD5 58b06d58bccd371fcbf1b781164c75a9 python-2.1.3-r1.ebuild 2345 MD5 f7959cf61958991a7e25f83a4e8b2ff8 python-2.2.1-r5.ebuild 2912 @@ -8,10 +8,9 @@ MD5 58ed89f3cc48f16f8bc96b76490e5b6a python-2.2.3-r1.ebuild 3293 MD5 0a274212a2a49a52600b617a38bafa09 python-2.2.3-r2.ebuild 3441 MD5 48d3de450107a8702bbd30ddfdceeed2 python-2.2.3-r3.ebuild 3488 MD5 5806acebfc91d925f328a751fd5503e5 python-2.2.3-r4.ebuild 3491 -MD5 92c61b17ba9a81349b38f41a30a5763f python-2.2.3-r5.ebuild 3488 -MD5 9d23cf2838de6b5f43e1395533bb759b python-2.2.3-r6.ebuild 4097 +MD5 0ad8593d461ed3351ef9930a2cf6901b python-2.2.3-r5.ebuild 4191 MD5 789d8555967a31cc0de2126fa6468fc2 python-2.2.3.ebuild 2999 -MD5 a53bcd98cbe4a9ff64acc1c655409b12 python-2.3.2-r1.ebuild 4031 +MD5 68553edd1bd134e351ac0d49e90e003e python-2.3.2-r1.ebuild 4745 MD5 7c0dcd5a1aa1ec0db97cd0847faab0d7 python-2.3.2.ebuild 3675 MD5 3dbbf5dfb3660eb003061a0c59f6e758 files/depreorder.py 1947 MD5 f3f370c8d1382c1a7571cfc1cbb196d9 files/digest-python-2.1.3-r1 62 @@ -24,17 +23,16 @@ MD5 f11f5d528c570ef739ea10806cebfa9f files/digest-python-2.2.3-r2 62 MD5 f11f5d528c570ef739ea10806cebfa9f files/digest-python-2.2.3-r3 62 MD5 f11f5d528c570ef739ea10806cebfa9f files/digest-python-2.2.3-r4 62 MD5 f11f5d528c570ef739ea10806cebfa9f files/digest-python-2.2.3-r5 62 -MD5 f11f5d528c570ef739ea10806cebfa9f files/digest-python-2.2.3-r6 62 MD5 aafa57d90e8894592bdf346eedc77faa files/digest-python-2.3.2 62 MD5 aafa57d90e8894592bdf346eedc77faa files/digest-python-2.3.2-r1 62 MD5 5f2361b3e770981b737a9ad3d2863931 files/python-2.2.1-r5-gentoo.diff 4152 MD5 11aa066154fe2e0a4c306124c7e5dd4a files/python-2.2.2-tk-8.4.x.patch 2997 MD5 96d4207fb41391c70d5f02e1785c9527 files/python-2.2.3-db4.patch 1220 -MD5 cf88c36976606ffe7f4a5aa7540bdaba files/python-2.2.3-disable_modules_and_ssl.patch 1207 +MD5 7480e63a1ff3aff7eaf8718424add7f8 files/python-2.2.3-disable_modules_and_ssl.patch 1212 MD5 07398060a831f18193315973df204cbf files/python-2.2.3-gentoo_py_dontcompile.patch 732 -MD5 70e2c0e0b1c82793b65bec6bbe5e52e0 files/python-2.2.3-use_opts.patch 2235 MD5 46588eb4b2cfdd8277153e8e6f728eca files/python-2.3-add_portage_search_path.patch 607 MD5 7808762bbf53647c7cd597be4044e9f7 files/python-2.3-gentoo_py_dontcompile.patch 478 +MD5 2b953054102d344834597bc73b209e12 files/python-2.3.2-disable_modules_and_ssl.patch 1285 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 diff --git a/dev-lang/python/files/python-2.2.3-disable_modules_and_ssl.patch b/dev-lang/python/files/python-2.2.3-disable_modules_and_ssl.patch new file mode 100644 index 000000000000..931702eb84d4 --- /dev/null +++ b/dev-lang/python/files/python-2.2.3-disable_modules_and_ssl.patch @@ -0,0 +1,35 @@ +--- setup.py.old 2003-11-01 09:44:51.725439600 +0000 ++++ setup.py 2003-11-01 09:48:36.818220296 +0000 +@@ -12,7 +12,14 @@ + from distutils.command.install import install + + # This global variable is used to hold the list of modules to be disabled. +-disabled_module_list = [] ++try: ++ disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split() ++except KeyError: ++ disabled_module_list = [] ++try: ++ disable_ssl = os.environ["PYTHON_DISABLE_SSL"] ++except KeyError: ++ disable_ssl = 0 + + def find_file(filename, std_dirs, paths): + """Searches for the directory where a given file is located, +@@ -210,6 +217,7 @@ + return platform + + def detect_modules(self): ++ global disable_ssl + # Ensure that /usr/local is always used + if '/usr/local/lib' not in self.compiler.library_dirs: + self.compiler.library_dirs.insert(0, '/usr/local/lib') +@@ -378,7 +386,7 @@ + if krb5_h: + ssl_incs += krb5_h + +- if ssl_incs is not None and ssl_libs is not None: ++ if ssl_incs is not None and ssl_libs is not None and not disable_ssl: + rtlibs = None + if platform.startswith('sunos'): + rtlibs = ssl_libs diff --git a/dev-lang/python/files/python-2.3.2-disable_modules_and_ssl.patch b/dev-lang/python/files/python-2.3.2-disable_modules_and_ssl.patch new file mode 100644 index 000000000000..808d7cb82e7b --- /dev/null +++ b/dev-lang/python/files/python-2.3.2-disable_modules_and_ssl.patch @@ -0,0 +1,36 @@ +--- setup.py.old 2003-11-01 19:23:48.495647848 +0000 ++++ setup.py 2003-11-01 19:24:16.044459792 +0000 +@@ -15,7 +15,14 @@ + from distutils.command.install_lib import install_lib + + # This global variable is used to hold the list of modules to be disabled. +-disabled_module_list = [] ++try: ++ disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split() ++except KeyError: ++ disabled_module_list = [] ++try: ++ disable_ssl = os.environ["PYTHON_DISABLE_SSL"] ++except KeyError: ++ disable_ssl = 0 + + def add_dir_to_list(dirlist, dir): + """Add the directory 'dir' to the list 'dirlist' (at the front) if +@@ -240,6 +247,7 @@ + return sys.platform + + def detect_modules(self): ++ global disable_ssl + # Ensure that /usr/local is always used + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') +@@ -451,7 +459,8 @@ + ] ) + + if (ssl_incs is not None and +- ssl_libs is not None): ++ ssl_libs is not None and ++ not disable_ssl): + exts.append( Extension('_ssl', ['_ssl.c'], + include_dirs = ssl_incs, + library_dirs = ssl_libs, diff --git a/dev-lang/python/python-2.2.3-r5.ebuild b/dev-lang/python/python-2.2.3-r5.ebuild index 7d08f24de3be..41bed4595a10 100644 --- a/dev-lang/python/python-2.2.3-r5.ebuild +++ b/dev-lang/python/python-2.2.3-r5.ebuild @@ -1,10 +1,10 @@ # 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.2.3-r5.ebuild,v 1.1 2003/10/27 09:21:51 liquidx Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.2.3-r5.ebuild,v 1.2 2003/11/01 20:15:46 liquidx Exp $ inherit flag-o-matic eutils python -IUSE="readline tcltk berkdb bootstrap build doc" +IUSE="readline tcltk berkdb build doc ssl" PYVER_MAJOR="`echo ${PV%_*} | cut -d '.' -f 1`" PYVER_MINOR="`echo ${PV%_*} | cut -d '.' -f 2`" @@ -18,17 +18,16 @@ HOMEPAGE="http://www.python.org" LICENSE="PSF-2.2" KEYWORDS="~amd64 ~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~arm ~ia64" -DEPEND="virtual/glibc >=sys-libs/zlib-1.1.3 - doc? ( =dev-python/python-docs-${PV}* ) - 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. +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 ) + dev-libs/expat + sys-libs/gdbm + ssl? ( dev-libs/openssl ) + doc? ( =dev-python/python-docs-${PV}* ) + )" RDEPEND="${DEPEND} dev-python/python-fchksum" @@ -41,7 +40,8 @@ SLOT="2.2" src_unpack() { unpack ${A} - epatch ${FILESDIR}/${P}-db4.patch + EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${P}-db4.patch + EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${P}-disable_modules_and_ssl.patch EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-2.3-add_portage_search_path.patch epatch ${FILESDIR}/${PN}-2.2.3-gentoo_py_dontcompile.patch } @@ -65,6 +65,24 @@ src_compile() { myopts="--with-cxx=no" fi + # 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 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 + # build python with threads support myopts="${myopts} --with-threads" @@ -103,12 +121,13 @@ src_install() { cp -r "${S}/Tools/idle" "${D}/usr/lib/python${PYVER}/tools/" dosym /usr/lib/python${PYVER}/tools/idle/idle.py /usr/bin/idle.py fi + use ncurses || rm -rf ${D}/usr/lib/python${PYVER}/curses } pkg_postinst() { python_makesym PYTHON_OVERRIDE_PYVER="2.2" python_mod_optimize - PYTHON_OVERRIDE_PYVER="2.2" python_mod_optimize -x site-packages ${ROOT}usr/lib/python${SLOT} + PYTHON_OVERRIDE_PYVER="2.2" python_mod_optimize -x site-packages -x test ${ROOT}usr/lib/python${SLOT} } pkg_postrm() { diff --git a/dev-lang/python/python-2.3.2-r1.ebuild b/dev-lang/python/python-2.3.2-r1.ebuild index b5eb528f2e30..a847821a72fe 100644 --- a/dev-lang/python/python-2.3.2-r1.ebuild +++ b/dev-lang/python/python-2.3.2-r1.ebuild @@ -1,6 +1,6 @@ # 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.3 2003/10/09 15:46:58 liquidx Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.3.2-r1.ebuild,v 1.4 2003/11/01 20:15:46 liquidx Exp $ inherit flag-o-matic python @@ -23,15 +23,15 @@ KEYWORDS="~x86" 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. + >=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 ) + dev-libs/expat + sys-libs/gdbm + ssl? ( dev-libs/openssl ) + doc? ( =dev-python/python-docs-${PV}* ) + )" RDEPEND="${DEPEND} dev-python/python-fchksum" @@ -44,6 +44,7 @@ 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) @@ -64,6 +65,24 @@ src_compile() { myconf="--with-cxx=no" fi + # 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 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 + # FIXME: (need to verify the consequences of this, probably breaks tkinter?) # use unicode ucs4 if cjk, otherwise use ucs2. use cjk \ @@ -88,8 +107,8 @@ src_install() { 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 + # 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! @@ -111,7 +130,7 @@ pkg_postrm() { pkg_postinst() { python_makesym python_mod_optimize - python_mod_optimize -x site-packages ${ROOT}usr/lib/python${PYVER} + python_mod_optimize -x site-packages -x test ${ROOT}usr/lib/python${PYVER} echo ewarn @@ -124,7 +143,7 @@ pkg_postinst() { 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 "think twice about uninstalling it, otherwise your system will break." ewarn echo -ne "\a"; sleep 1 echo -ne "\a"; sleep 1 |