diff options
author | 2011-12-01 11:19:00 +0000 | |
---|---|---|
committer | 2011-12-01 11:19:00 +0000 | |
commit | 58b3749a81c7610d61348e4b94eeef6f754e7c55 (patch) | |
tree | 016c022e3b4098da055b024e646218acf98a4f48 /dev-lang | |
parent | Clean up for EAPI=4, fix initd script (thanks jbergstroem). (diff) | |
download | historical-58b3749a81c7610d61348e4b94eeef6f754e7c55.tar.gz historical-58b3749a81c7610d61348e4b94eeef6f754e7c55.tar.bz2 historical-58b3749a81c7610d61348e4b94eeef6f754e7c55.zip |
Remove old python versions from the tree.
Package-Manager: portage-2.1.10.39/cvs/Linux x86_64
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/ChangeLog | 6 | ||||
-rw-r--r-- | dev-lang/python/Manifest | 15 | ||||
-rw-r--r-- | dev-lang/python/python-2.7.2-r2.ebuild | 392 | ||||
-rw-r--r-- | dev-lang/python/python-3.1.4-r2.ebuild | 357 | ||||
-rw-r--r-- | dev-lang/python/python-3.2-r2.ebuild | 363 |
5 files changed, 10 insertions, 1123 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog index 89722c23304c..845e412a0926 100644 --- a/dev-lang/python/ChangeLog +++ b/dev-lang/python/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-lang/python # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.558 2011/11/26 16:50:52 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.559 2011/12/01 11:19:00 djc Exp $ + + 01 Dec 2011; Dirkjan Ochtman <djc@gentoo.org> -python-2.7.2-r2.ebuild, + -python-3.1.4-r2.ebuild, -python-3.2-r2.ebuild: + Remove old versions from the tree. 26 Nov 2011; Mike Gilbert <floppym@gentoo.org> python-2.6.7-r2.ebuild, python-2.7.2-r2.ebuild, python-2.7.2-r3.ebuild, python-3.1.4-r2.ebuild, diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 3cf622533cdd..7ec2e56bc053 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -1,5 +1,5 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 +Hash: SHA512 AUX linux2.patch 606 RMD160 0cca6f619a98e6090d01f4a80c2178c323416a47 SHA1 8fc817c8da2f74d3ccc93d84a1bc713ed26c00e2 SHA256 a178120a3022ecb14044c82eff7e828f6d060b6885acacd4a4d8569fde372fd7 AUX pydoc.conf 279 RMD160 85dcc3abd24faf09f3753b5c2299517f9b2ebc6a SHA1 c1faef486a0041c2175bfbc2cf10eccaa574e8c2 SHA256 6437e85d16d34efaf2665b3cabb0707392e6dee3df04989d3fcac63fd22997e8 @@ -19,7 +19,6 @@ DIST Python-2.7.2.tar.bz2 11754834 RMD160 c3bf4f09b7c429a4d9f4cc251c795304cd5232 DIST Python-3.1.3.tar.bz2 9875464 RMD160 730f3b8eb1a41f1b7c469fc81be734bb802cb9f9 SHA1 aeadf1eb7f450aab77a8972c042bc5f49bcf2288 SHA256 77f6f41a51be4ca85d83670405c8281dd1237bb00d8be8a7560cb3ccdf5558cb DIST Python-3.1.4.tar.xz 8184052 RMD160 beb24a2a1227aa2bc036263b4c808daa72fa3e02 SHA1 e5767a4fc92433816451de75c8721f2e1a81f6ea SHA256 21aa936b3989a8e32ba17799fcf235e0979a2e1c95e70bcd3bc066185a559afc DIST Python-3.2.2.tar.xz 8923224 RMD160 f28dc7a6b8a6ed1cc359791b1c70367d36ae0af3 SHA1 5e654dbd48476193ccdef4d604ed4f45b48c6769 SHA256 1072d13d846373e7eaa4f94c21f0985d2965e916ff1096abe72d1af67c5f55f9 -DIST Python-3.2.tar.xz 8877208 RMD160 25e958dbb17223d6c2060520e0921e6d9c9f7906 SHA1 55a3a9d39f31563370d0c494373bb6d38e4d1a00 SHA256 38a3de4ed38e92e1c3dd81e230caf6569d41bf8df6537d099541a6d3dca1b132 DIST python-gentoo-patches-2.4.6.tar.bz2 10983 RMD160 c06dc76edec86d708a0c0e37126ae50f49f61bd3 SHA1 bbc04083fe74cff8c723c5c3cab70b1b814c987f SHA256 0508a66408f218c655823303833599344d2edeec1ffc683c6ada3fc33731590d DIST python-gentoo-patches-2.5.4-r3.tar.bz2 19473 RMD160 c3a807693103f9e26c3cce4add5a1f3d975ef216 SHA1 c6170894865ee8aac8c813916c21a0d0458691bc SHA256 03f5bdb0a4ac8eb498a90c5cd444a5c76ed7e79bff5e8dca00efe77cf80c6391 DIST python-gentoo-patches-2.6.6-r2.tar.bz2 16277 RMD160 432a63f7313e98a99cd300ee3c1f905d343c401e SHA1 30f5ba4e5eb25833331f193966c3e00be4470cf9 SHA256 2754d2aa27086efccc2de73442cf0022f3f9768431b10ff72c9181c4ddd95428 @@ -29,25 +28,21 @@ DIST python-gentoo-patches-2.7.2.tar.bz2 14485 RMD160 6b66705d61b525d0089326ddb7 DIST python-gentoo-patches-3.1.3-r1.tar.bz2 13730 RMD160 73f922d850e464e589c7a3cfb8f755d36167d156 SHA1 9228b63c980b80dd7e8dd9e0276c29af18692e33 SHA256 f23056436b298ed0ff9823b52902aaaa63eae0c4585a4a19e47571685127631e DIST python-gentoo-patches-3.1.4.tar.bz2 12930 RMD160 5ba5d20e065e6c346848d0c3ed12d65cd6b089be SHA1 b6bb595e03a78a87e3164874a9a12711bee4b9f8 SHA256 9800f3a9989c8aac4c96a7e6411baf96af0c18c041627a330681783a84cb4316 DIST python-gentoo-patches-3.2.2.tar.bz2 10834 RMD160 f1ca3bec5705b72ee488a37ea71dc7110b4495f1 SHA1 c5daaea3c52a564228c84be741da6cf039b10e19 SHA256 521c1bd7c360fb66788e7c5e191497e014bb104f2ef2272d99a40b764082d7cb -DIST python-gentoo-patches-3.2.tar.bz2 11826 RMD160 8d450939f3f2f7f5c779b8701097fcf92909c36b SHA1 bdc922a4b94bbb616dbf702e913f74984ad8bda5 SHA256 43799206ed8c81936e3b3e68e8c562334b346652d30383c5b7b93fe9741ad0db EBUILD python-2.4.6.ebuild 9411 RMD160 53ad3acad20e23e4ab1edab8f400211df27f4772 SHA1 5434007f9e697d0bbfe31e018515f439f4e335d0 SHA256 e054c684ca729c81a117b49db8192ed7a13e23728f24e07a235af71a8f036f35 EBUILD python-2.5.4-r4.ebuild 9761 RMD160 abd16725421330ef8a312b435d84afe6caa42687 SHA1 78467f3eed7934aa39da1d52e5cb3285203ed3d4 SHA256 1ec9596fef71bdfb9bf31893469bdde13401dbde05cf53071d19d24d4cc25008 EBUILD python-2.6.6-r2.ebuild 10643 RMD160 05d2ccb6c2190fd8670e4746813661402492d228 SHA1 e9593163f531cb8bcebf65e510671fc762fbaefa SHA256 4c662ef2238e60fe0007566b2ac19869edfef18c2b3b965eb94606ae525ac45c EBUILD python-2.6.7-r2.ebuild 11713 RMD160 8ae1389d4475f4257684f2bfebbe07a1989123bd SHA1 d7040fbeb217975d4d109795052e10763757f9e2 SHA256 2ca0e45d147cefe8114015d0756425de97ecea8f241c1ac4881aa53bb40653c7 EBUILD python-2.7.1-r1.ebuild 11217 RMD160 c26e835583ee4797dfc0e5ae51932fd8e9303777 SHA1 62830059f58bff5c6e05b53d3e9bf2da733a752c SHA256 316d43bb68f55203cfee8029262e39c594af822f8d8b536fc19a89d5da698769 -EBUILD python-2.7.2-r2.ebuild 11965 RMD160 dc8ea13fae712a74d73de01252511fd1f7b09989 SHA1 7041921d5932bb1cb707f2cfc3160e908461884c SHA256 597f4d93c733476583f7a6de66f9f59ceb86535a5959bf45b6317b68e04c3cd8 EBUILD python-2.7.2-r3.ebuild 11990 RMD160 a456c556c4725415453da7207ec5a96362dad860 SHA1 ebd81188225b3032e6e191da9af94149b086bc7d SHA256 6d37770550b16c433d025c464df62c354b3b35e322ab205a65009f9ba8e7f7b2 EBUILD python-3.1.3-r1.ebuild 9894 RMD160 edd846b9fe5c472e4e99dfa95395708afa71ed13 SHA1 2807dad1ee84148cb2ddd466f047e5610e7c668b SHA256 ff762195045158c7cf2719a7ebfdb8317b4aa7fcf089db52afa9559a36ed01bc -EBUILD python-3.1.4-r2.ebuild 10458 RMD160 e90defd95d8ea5f61da090d4b740f7d565f90835 SHA1 b4cdaf412dc3f21ec496bb72d1132fede95d830b SHA256 2d0fe7933339970c95e277d15a2f51ab599666d89b3e216d1f1eeda71a4cc23f EBUILD python-3.1.4-r3.ebuild 10490 RMD160 88dd6a6b04ecb4391943b0694ccc522667de767c SHA1 6351f3bb4c7e39393d9f6d628c9f15a1cae778b4 SHA256 fdd34a955ed1e7544a3894f7ccef90a22f6a03f326dccfc5c8f55a503120c95d -EBUILD python-3.2-r2.ebuild 10810 RMD160 b0d3a19ba079a08e1824536384a85325d25384b9 SHA1 7c4d53daf3d814695138d3829765457307b5b19f SHA256 520ae01936ea5a9c4026dc6f9aa5e5b09da4e7f7525bf075f984bd36a5b8d13e EBUILD python-3.2.2.ebuild 10716 RMD160 eaf7fd123e8f20d13d5b1ba2a6f1b60e62be780b SHA1 e27ab698ad9092c2246cf0960cfb8d74eeaf7e79 SHA256 bc35f6e26996c6b177f20af619e127ea3fb3b64237fcf6c003c5f98203087d44 -MISC ChangeLog 99877 RMD160 fc4a98381140494dbbe43eb0c6817674b353c094 SHA1 ca3a9c1af93441f397a553c09d0b2326efec0e8c SHA256 8e7d7919f1c6aa2a0394d423736f30778661b11eeda6b8bdad655906e8f83fd5 +MISC ChangeLog 100034 RMD160 bd49811b996ecd593b74bd74a3768c8f76ab4a66 SHA1 c779533fd82eb70aa180bcc7aa32cf857b56320a SHA256 f737258a5261d11f562551dea42a613e492bd81394de03975226be332053b48b MISC metadata.xml 661 RMD160 54831d16b8807086bfabdbb3df9d33336b5d42a0 SHA1 9867c337fe9e6f4e967004fc9409763e0fedf43b SHA256 2c6c3407251f7ccd6501dee49494e539a9544f2fbae99a4373eefdf4e83e8908 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iF4EAREIAAYFAk7RGPYACgkQC77qH+pIQ6ShZwD/fkMy15U6pUDoNYq+084QKSLr -iaGdW6/R6srwH4PryTYA/1e8S5qYII4yeEP3/yPTlS2bYFAFqVSh80L3ZEtpqthi -=p2Vb +iEYEAREKAAYFAk7XYqwACgkQxeMuLWsGW/tF8gCfcIgY9fJuW1AXdp7T2Yon0Rn/ +U5sAoI2570qlzilV3xDzjqEbeSXxC9Fx +=6XL1 -----END PGP SIGNATURE----- diff --git a/dev-lang/python/python-2.7.2-r2.ebuild b/dev-lang/python/python-2.7.2-r2.ebuild deleted file mode 100644 index c3b48fccf6c2..000000000000 --- a/dev-lang/python/python-2.7.2-r2.ebuild +++ /dev/null @@ -1,392 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.2-r2.ebuild,v 1.6 2011/11/26 16:50:52 floppym Exp $ - -EAPI="2" -WANT_AUTOMAKE="none" - -inherit autotools eutils flag-o-matic multilib python toolchain-funcs - -if [[ "${PV}" == *_pre* ]]; then - inherit mercurial - - EHG_REPO_URI="http://hg.python.org/cpython" - EHG_REVISION="" -else - MY_PV="${PV%_p*}" - MY_P="Python-${MY_PV}" -fi - -PATCHSET_REVISION="0" - -DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language." -HOMEPAGE="http://www.python.org/" -if [[ "${PV}" == *_pre* ]]; then - SRC_URI="" -else - SRC_URI="http://www.python.org/ftp/python/${MY_PV}/${MY_P}.tar.bz2 - mirror://gentoo/python-gentoo-patches-${MY_PV}$([[ "${PATCHSET_REVISION}" != "0" ]] && echo "-r${PATCHSET_REVISION}").tar.bz2" -fi - -LICENSE="PSF-2" -SLOT="2.7" -PYTHON_ABI="${SLOT}" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" -IUSE="-berkdb build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" - -RDEPEND=">=app-admin/eselect-python-20091230 - app-arch/bzip2 - >=sys-libs/zlib-1.1.3 - virtual/libffi - virtual/libintl - !build? ( - berkdb? ( || ( - sys-libs/db:4.8 - sys-libs/db:4.7 - sys-libs/db:4.6 - sys-libs/db:4.5 - sys-libs/db:4.4 - sys-libs/db:4.3 - sys-libs/db:4.2 - ) ) - gdbm? ( sys-libs/gdbm ) - ncurses? ( - >=sys-libs/ncurses-5.2 - readline? ( >=sys-libs/readline-4.1 ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3[extensions] ) - ssl? ( dev-libs/openssl ) - tk? ( - >=dev-lang/tk-8.0 - dev-tcltk/blt - ) - xml? ( >=dev-libs/expat-2 ) - ) - !!<sys-apps/portage-2.1.9" -DEPEND=">=sys-devel/autoconf-2.65 - ${RDEPEND} - $([[ "${PV}" == *_pre* ]] && echo "=${CATEGORY}/${PN}-${PV%%.*}*") - dev-util/pkgconfig - $([[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+_pre ]] && echo "doc? ( dev-python/sphinx )") - !sys-devel/gcc[libffi]" -RDEPEND+=" !build? ( app-misc/mime-types ) - $([[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+_pre ]] || echo "doc? ( dev-python/python-docs:${SLOT} )")" -PDEPEND="app-admin/python-updater" - -if [[ "${PV}" != *_pre* ]]; then - S="${WORKDIR}/${MY_P}" -fi - -pkg_setup() { - python_pkg_setup - - if use berkdb; then - ewarn "\"bsddb\" module is out-of-date and no longer maintained inside dev-lang/python." - ewarn "\"bsddb\" and \"dbhash\" modules have been additionally removed in Python 3." - ewarn "You should use external, still maintained \"bsddb3\" module provided by dev-python/bsddb3," - ewarn "which supports both Python 2 and Python 3." - else - if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then - ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb] to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." - ewarn "You might need to migrate your databases." - fi - fi -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib - - if [[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+_pre ]]; then - if [[ "$(hg branch)" != "default" ]]; then - die "Invalid EHG_REVISION" - fi - fi - - if [[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+_pre ]]; then - if [[ "$(hg branch)" != "${SLOT}" ]]; then - die "Invalid EHG_REVISION" - fi - - if grep -Eq '#define PY_RELEASE_LEVEL[[:space:]]+PY_RELEASE_LEVEL_FINAL' Include/patchlevel.h; then - # Update micro version, release level and version string. - local micro_version="${PV%_pre*}" - micro_version="${micro_version##*.}" - local version_string="${PV%.*}.$((${micro_version} - 1))+" - sed \ - -e "s/\(#define PY_MICRO_VERSION[[:space:]]\+\)[^[:space:]]\+/\1${micro_version}/" \ - -e "s/\(#define PY_RELEASE_LEVEL[[:space:]]\+\)[^[:space:]]\+/\1PY_RELEASE_LEVEL_ALPHA/" \ - -e "s/\(#define PY_VERSION[[:space:]]\+\"\)[^\"]\+\(\"\)/\1${version_string}\2/" \ - -i Include/patchlevel.h || die "sed failed" - fi - fi - - local excluded_patches - if ! tc-is-cross-compiler; then - excluded_patches="*_all_crosscompile.patch" - fi - - local patchset_dir - if [[ "${PV}" == *_pre* ]]; then - patchset_dir="${FILESDIR}/${SLOT}-${PATCHSET_REVISION}" - else - patchset_dir="${WORKDIR}/${MY_PV}" - fi - - EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" epatch "${patchset_dir}" - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # Linux-3 compat. Bug #374579 (upstream issue12571) - cp -r "${S}/Lib/plat-linux2" "${S}/Lib/plat-linux3" || die - - eautoreconf -} - -src_configure() { - if use build; then - # Disable extraneous modules with extra dependencies. - export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" - export PYTHON_DISABLE_SSL="1" - else - # dbm module can be linked against berkdb or gdbm. - # Defaults to gdbm when both are enabled, #204343. - local disable - use berkdb || use gdbm || disable+=" dbm" - use berkdb || disable+=" _bsddb" - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - if tc-is-cross-compiler; then - OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \ - ./configure --{build,host}=${CBUILD} || die "cross-configure failed" - emake python Parser/pgen || die "cross-make failed" - mv python hostpython - mv Parser/pgen Parser/hostpgen - make distclean - sed -i \ - -e "/^HOSTPYTHON/s:=.*:=./hostpython:" \ - -e "/^HOSTPGEN/s:=.*:=./Parser/hostpgen:" \ - Makefile.pre.in || die "sed failed" - fi - - # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. - tc-export CXX - - # Set LDFLAGS so we link modules with -lpython2.7 correctly. - # Needed on FreeBSD unless Python 2.7 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - if use berkdb; then - dbmliborder+="${dbmliborder:+:}bdb" - fi - - OPT="" econf \ - --with-fpectl \ - --enable-shared \ - $(use_enable ipv6) \ - $(use_with threads) \ - $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ - --infodir='${prefix}/share/info' \ - --mandir='${prefix}/share/man' \ - --with-dbmliborder="${dbmliborder}" \ - --with-libc="" \ - --enable-loadable-sqlite-extensions \ - --with-system-expat \ - --with-system-ffi -} - -src_compile() { - emake EPYTHON="python${PV%%.*}" || die "emake failed" -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Byte compiling should be enabled here. - # Otherwise test_import fails. - python_enable_pyc - - # Skip failing tests. - local skipped_tests="distutils gdb" - - for test in ${skipped_tests}; do - mv "${S}/Lib/test/test_${test}.py" "${T}" - done - - # Rerun failed tests in verbose mode (regrtest -w). - emake test EXTRATESTOPTS="-w" < /dev/tty - local result="$?" - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}/Lib/test/test_${test}.py" - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}$(python_get_libdir)/test'" - elog "and run the tests separately." - - python_disable_pyc - - if [[ "${result}" -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - [[ -z "${ED}" ]] && ED="${D%/}${EPREFIX}/" - - emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed" - python_clean_installation_image -q - - sed -e "s/\(LDFLAGS=\).*/\1/" -i "${ED}$(python_get_libdir)/config/Makefile" || die "sed failed" - - mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}" - - # Fix collisions between different slots of Python. - mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" - mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" - mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" - rm -f "${ED}usr/bin/smtpd.py" - - if use build; then - rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test} - else - use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/"{bsddb/test,test} - use berkdb || rm -fr "${ED}$(python_get_libdir)/"{bsddb,dbhash.py,test/test_bsddb*} - use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,lib-tk} - fi - - use threads || rm -fr "${ED}$(python_get_libdir)/multiprocessing" - use wininst || rm -f "${ED}$(python_get_libdir)/distutils/command/"wininst-*.exe - - dodoc Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed" - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins -r "${S}/Tools" || die "doins failed" - fi - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed" - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed" - - if use kernel_linux; then - if [ -d "${ED}$(python_get_libdir)/plat-linux2" ];then - cp -r "${ED}$(python_get_libdir)/plat-linux2" \ - "${ED}$(python_get_libdir)/plat-linux3" || die "copy plat-linux failed" - else - cp -r "${ED}$(python_get_libdir)/plat-linux3" \ - "${ED}$(python_get_libdir)/plat-linux2" || die "copy plat-linux failed" - fi - fi - - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${SLOT}:" \ - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - [[ -z "${EROOT}" || (! -d "${EROOT}" && -d "${ROOT}") ]] && EROOT="${ROOT%/}${EPREFIX}/" - - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir) - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn - ewarn "\e[1;31m************************************************************************\e[0m" - ewarn - ewarn "You have just upgraded from an older version of Python." - ewarn "You should switch active version of Python ${PV%%.*} and run" - ewarn "'python-updater \${options}' to rebuild Python modules." - ewarn - ewarn "\e[1;31m************************************************************************\e[0m" - ewarn - - local n - for ((n = 0; n < 12; n++)); do - echo -ne "\a" - sleep 1 - done - fi -} - -pkg_postrm() { - eselect_python_update - - python_mod_cleanup $(python_get_libdir) -} diff --git a/dev-lang/python/python-3.1.4-r2.ebuild b/dev-lang/python/python-3.1.4-r2.ebuild deleted file mode 100644 index a3217f81ab13..000000000000 --- a/dev-lang/python/python-3.1.4-r2.ebuild +++ /dev/null @@ -1,357 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.4-r2.ebuild,v 1.6 2011/11/26 16:50:52 floppym Exp $ - -EAPI="3" -WANT_AUTOMAKE="none" - -inherit autotools eutils flag-o-matic multilib python toolchain-funcs - -if [[ "${PV}" == *_pre* ]]; then - inherit mercurial - - EHG_REPO_URI="http://hg.python.org/cpython" - EHG_REVISION="" -else - MY_PV="${PV%_p*}" - MY_P="Python-${MY_PV}" -fi - -PATCHSET_REVISION="0" - -DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language." -HOMEPAGE="http://www.python.org/" -if [[ "${PV}" == *_pre* ]]; then - SRC_URI="" -else - SRC_URI="http://www.python.org/ftp/python/${MY_PV}/${MY_P}.tar.xz - mirror://gentoo/python-gentoo-patches-${MY_PV}$([[ "${PATCHSET_REVISION}" != "0" ]] && echo "-r${PATCHSET_REVISION}").tar.bz2" -fi - -LICENSE="PSF-2" -SLOT="3.1" -PYTHON_ABI="${SLOT}" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" -IUSE="build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" - -RDEPEND=">=app-admin/eselect-python-20091230 - app-arch/bzip2 - >=sys-libs/zlib-1.1.3 - virtual/libffi - virtual/libintl - !build? ( - gdbm? ( sys-libs/gdbm ) - ncurses? ( - >=sys-libs/ncurses-5.2 - readline? ( >=sys-libs/readline-4.1 ) - ) - sqlite? ( >=dev-db/sqlite-3.3.3:3 ) - ssl? ( dev-libs/openssl ) - tk? ( - >=dev-lang/tk-8.0 - dev-tcltk/blt - ) - xml? ( >=dev-libs/expat-2 ) - )" -DEPEND="${RDEPEND} - $([[ "${PV}" == *_pre* ]] && echo "=${CATEGORY}/${PN}-${PV%%.*}*") - dev-util/pkgconfig - $([[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+_pre ]] && echo "doc? ( dev-python/sphinx )") - !sys-devel/gcc[libffi]" -RDEPEND+=" !build? ( app-misc/mime-types ) - $([[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+_pre ]] || echo "doc? ( dev-python/python-docs:${SLOT} )")" -PDEPEND="app-admin/python-updater" - -if [[ "${PV}" != *_pre* ]]; then - S="${WORKDIR}/${MY_P}" -fi - -pkg_setup() { - python_pkg_setup -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib - - if [[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+_pre ]]; then - if [[ "$(hg branch)" != "default" ]]; then - die "Invalid EHG_REVISION" - fi - fi - - if [[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+_pre ]]; then - if [[ "$(hg branch)" != "${SLOT}" ]]; then - die "Invalid EHG_REVISION" - fi - - if grep -Eq '#define PY_RELEASE_LEVEL[[:space:]]+PY_RELEASE_LEVEL_FINAL' Include/patchlevel.h; then - # Update micro version, release level and version string. - local micro_version="${PV%_pre*}" - micro_version="${micro_version##*.}" - local version_string="${PV%.*}.$((${micro_version} - 1))+" - sed \ - -e "s/\(#define PY_MICRO_VERSION[[:space:]]\+\)[^[:space:]]\+/\1${micro_version}/" \ - -e "s/\(#define PY_RELEASE_LEVEL[[:space:]]\+\)[^[:space:]]\+/\1PY_RELEASE_LEVEL_ALPHA/" \ - -e "s/\(#define PY_VERSION[[:space:]]\+\"\)[^\"]\+\(\"\)/\1${version_string}\2/" \ - -i Include/patchlevel.h || die "sed failed" - fi - fi - - local excluded_patches - if ! tc-is-cross-compiler; then - excluded_patches="*_all_crosscompile.patch" - fi - - local patchset_dir - if [[ "${PV}" == *_pre* ]]; then - patchset_dir="${FILESDIR}/${SLOT}-${PATCHSET_REVISION}" - else - patchset_dir="${WORKDIR}/${MY_PV}" - fi - - EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" epatch "${patchset_dir}" - - # Linux-3 compat. Bug #374579 (upstream issue12571) - cp -r "${S}/Lib/plat-linux2" "${S}/Lib/plat-linux3" || die - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - eautoreconf -} - -src_configure() { - if use build; then - # Disable extraneous modules with extra dependencies. - export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" - export PYTHON_DISABLE_SSL="1" - else - local disable - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - if tc-is-cross-compiler; then - OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \ - ./configure --{build,host}=${CBUILD} || die "cross-configure failed" - emake python Parser/pgen || die "cross-make failed" - mv python hostpython - mv Parser/pgen Parser/hostpgen - make distclean - sed -i \ - -e "/^HOSTPYTHON/s:=.*:=./hostpython:" \ - -e "/^HOSTPGEN/s:=.*:=./Parser/hostpgen:" \ - Makefile.pre.in || die "sed failed" - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - - # Set LDFLAGS so we link modules with -lpython3.1 correctly. - # Needed on FreeBSD unless Python 3.1 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - OPT="" econf \ - --with-fpectl \ - --enable-shared \ - $(use_enable ipv6) \ - $(use_with threads) \ - $(use_with wide-unicode) \ - --infodir='${prefix}/share/info' \ - --mandir='${prefix}/share/man' \ - --with-computed-gotos \ - --with-dbmliborder="${dbmliborder}" \ - --with-libc="" \ - --with-system-ffi -} - -src_compile() { - emake EPYTHON="python${PV%%.*}" || die "emake failed" -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - if ! use threads; then - ewarn "Disabling tests due to USE=\"-threads\"" - return - fi - - # Byte compiling should be enabled here. - # Otherwise test_import fails. - python_enable_pyc - - # Skip failing tests. - local skipped_tests="distutils" - - for test in ${skipped_tests}; do - mv "${S}/Lib/test/test_${test}.py" "${T}" - done - - # Rerun failed tests in verbose mode (regrtest -w). - emake test EXTRATESTOPTS="-w" < /dev/tty - local result="$?" - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}/Lib/test/test_${test}.py" - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}$(python_get_libdir)/test'" - elog "and run the tests separately." - - python_disable_pyc - - if [[ "${result}" -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - emake DESTDIR="${D}" altinstall || die "emake altinstall failed" - python_clean_installation_image -q - - mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}" - - # Fix collisions between different slots of Python. - mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" - mv "${ED}usr/bin/pydoc3" "${ED}usr/bin/pydoc${SLOT}" - mv "${ED}usr/bin/idle3" "${ED}usr/bin/idle${SLOT}" - rm -f "${ED}usr/bin/smtpd.py" - - if use build; then - rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,sqlite3,test,tkinter} - else - use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/test" - use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,tkinter,test/test_tk*} - fi - - use threads || rm -fr "${ED}$(python_get_libdir)/multiprocessing" - use wininst || rm -f "${ED}$(python_get_libdir)/distutils/command/"wininst-*.exe - - dodoc Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed" - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins -r "${S}/Tools" || die "doins failed" - fi - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed" - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed" - - if use kernel_linux; then - if [ -d "${ED}$(python_get_libdir)/plat-linux2" ];then - cp -r "${ED}$(python_get_libdir)/plat-linux2" \ - "${ED}$(python_get_libdir)/plat-linux3" || die "copy plat-linux failed" - else - cp -r "${ED}$(python_get_libdir)/plat-linux3" \ - "${ED}$(python_get_libdir)/plat-linux2" || die "copy plat-linux failed" - fi - fi - - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${SLOT}:" \ - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir) - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn - ewarn "\e[1;31m************************************************************************\e[0m" - ewarn - ewarn "You have just upgraded from an older version of Python." - ewarn "You should switch active version of Python ${PV%%.*} and run" - ewarn "'python-updater \${options}' to rebuild Python modules." - ewarn - ewarn "\e[1;31m************************************************************************\e[0m" - ewarn - - local n - for ((n = 0; n < 12; n++)); do - echo -ne "\a" - sleep 1 - done - fi -} - -pkg_postrm() { - eselect_python_update - - python_mod_cleanup $(python_get_libdir) -} diff --git a/dev-lang/python/python-3.2-r2.ebuild b/dev-lang/python/python-3.2-r2.ebuild deleted file mode 100644 index 14abc50baa72..000000000000 --- a/dev-lang/python/python-3.2-r2.ebuild +++ /dev/null @@ -1,363 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.2-r2.ebuild,v 1.6 2011/10/31 04:02:01 vapier Exp $ - -EAPI="3" -WANT_AUTOMAKE="none" - -inherit autotools eutils flag-o-matic multilib python toolchain-funcs - -if [[ "${PV}" == *_pre* ]]; then - inherit subversion - - ESVN_PROJECT="python" - ESVN_REPO_URI="http://svn.python.org/projects/python/branches/release32-maint" - ESVN_REVISION="" -else - MY_PV="${PV%_p*}" - MY_P="Python-${MY_PV}" -fi - -PATCHSET_REVISION="0" - -DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language." -HOMEPAGE="http://www.python.org/" -if [[ "${PV}" == *_pre* ]]; then - SRC_URI="" -else - SRC_URI="http://www.python.org/ftp/python/${MY_PV}/${MY_P}.tar.xz - mirror://gentoo/python-gentoo-patches-${MY_PV}$([[ "${PATCHSET_REVISION}" != "0" ]] && echo "-r${PATCHSET_REVISION}").tar.bz2" -fi - -LICENSE="PSF-2" -SLOT="3.2" -PYTHON_ABI="${SLOT}" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" -IUSE="build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" - -RDEPEND=">=app-admin/eselect-python-20091230 - >=sys-libs/zlib-1.1.3 - virtual/libffi - virtual/libintl - !build? ( - gdbm? ( sys-libs/gdbm ) - ncurses? ( - >=sys-libs/ncurses-5.2 - readline? ( >=sys-libs/readline-4.1 ) - ) - sqlite? ( >=dev-db/sqlite-3.3.8:3[extensions] ) - ssl? ( dev-libs/openssl ) - tk? ( - >=dev-lang/tk-8.0 - dev-tcltk/blt - ) - xml? ( >=dev-libs/expat-2 ) - )" -DEPEND=">=sys-devel/autoconf-2.65 - ${RDEPEND} - $([[ "${PV}" == *_pre* ]] && echo "=${CATEGORY}/${PN}-${PV%%.*}*") - $([[ "${PV}" != *_pre* ]] && echo "app-arch/xz-utils") - dev-util/pkgconfig - $([[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+_pre ]] && echo "doc? ( dev-python/sphinx )") - !sys-devel/gcc[libffi]" -RDEPEND+=" !build? ( app-misc/mime-types ) - $([[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+_pre ]] || echo "doc? ( dev-python/python-docs:${SLOT} )")" -PDEPEND="app-admin/python-updater" - -if [[ "${PV}" != *_pre* ]]; then - S="${WORKDIR}/${MY_P}" -fi - -pkg_setup() { - python_pkg_setup -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib - - if [[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+_pre ]]; then - if grep -Eq '#define PY_RELEASE_LEVEL[[:space:]]+PY_RELEASE_LEVEL_FINAL' Include/patchlevel.h; then - # Update micro version, release level and version string. - local micro_version="${PV%_pre*}" - micro_version="${micro_version##*.}" - local version_string="${PV%.*}.$((${micro_version} - 1))+" - sed \ - -e "s/\(#define PY_MICRO_VERSION[[:space:]]\+\)[^[:space:]]\+/\1${micro_version}/" \ - -e "s/\(#define PY_RELEASE_LEVEL[[:space:]]\+\)[^[:space:]]\+/\1PY_RELEASE_LEVEL_ALPHA/" \ - -e "s/\(#define PY_VERSION[[:space:]]\+\"\)[^\"]\+\(\"\)/\1${version_string}\2/" \ - -i Include/patchlevel.h || die "sed failed" - fi - fi - - local excluded_patches - if ! tc-is-cross-compiler; then - excluded_patches="*_all_crosscompile.patch" - fi - - local patchset_dir - if [[ "${PV}" == *_pre* ]]; then - patchset_dir="${FILESDIR}/${SLOT}-${PATCHSET_REVISION}" - else - patchset_dir="${WORKDIR}/${MY_PV}" - fi - - EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" epatch "${patchset_dir}" - - # Linux-3 compat. Bug #374579 (upstream issue12571) - cp -r "${S}/Lib/plat-linux2" "${S}/Lib/plat-linux3" || die - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - if ! use wininst; then - # Remove Microsoft Windows executables. - rm Lib/distutils/command/wininst-*.exe - fi - - # Support versions of Autoconf other than 2.65. - sed -e "/version_required(2\.65)/d" -i configure.in || die "sed failed" - - # Disable ABI flags. - sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.in || die "sed failed" - - if [[ "${PV}" == *_pre* ]]; then - sed -e "s/\(-DSVNVERSION=\).*\( -o\)/\1\\\\\"${ESVN_REVISION}\\\\\"\2/" -i Makefile.pre.in || die "sed failed" - fi - - #WRT bug #376303 - epatch "${FILESDIR}/${P}-soname_typo.patch" || die "soname patch failed" - - eautoreconf -} - -src_configure() { - if use build; then - # Disable extraneous modules with extra dependencies. - export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" - export PYTHON_DISABLE_SSL="1" - else - local disable - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - if tc-is-cross-compiler; then - OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \ - ./configure --{build,host}=${CBUILD} || die "cross-configure failed" - emake python Parser/pgen || die "cross-make failed" - mv python hostpython - mv Parser/pgen Parser/hostpgen - make distclean - sed -i \ - -e "/^HOSTPYTHON/s:=.*:=./hostpython:" \ - -e "/^HOSTPGEN/s:=.*:=./Parser/hostpgen:" \ - Makefile.pre.in || die "sed failed" - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - - # Set LDFLAGS so we link modules with -lpython3.2 correctly. - # Needed on FreeBSD unless Python 3.2 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - OPT="" econf \ - --with-fpectl \ - --enable-shared \ - $(use_enable ipv6) \ - $(use_with threads) \ - $(use_with wide-unicode) \ - --infodir='${prefix}/share/info' \ - --mandir='${prefix}/share/man' \ - --with-computed-gotos \ - --with-dbmliborder="${dbmliborder}" \ - --with-libc="" \ - --enable-loadable-sqlite-extensions \ - --with-system-expat \ - --with-system-ffi -} - -src_compile() { - emake EPYTHON="python${PV%%.*}" CPPFLAGS="" CFLAGS="" LDFLAGS="" || die "emake failed" -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Byte compiling should be enabled here. - # Otherwise test_import fails. - python_enable_pyc - - # Skip failing tests. - local skip_tests="distutils gdb" - - for test in ${skip_tests}; do - mv "${S}/Lib/test/test_${test}.py" "${T}" - done - - # Rerun failed tests in verbose mode (regrtest -w). - emake test EXTRATESTOPTS="-w" CPPFLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty - local result="$?" - - for test in ${skip_tests}; do - mv "${T}/test_${test}.py" "${S}/Lib/test/test_${test}.py" - done - - elog "The following tests have been skipped:" - for test in ${skip_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}$(python_get_libdir)/test'" - elog "and run the tests separately." - - python_disable_pyc - - if [[ "${result}" -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - emake DESTDIR="${D}" altinstall || die "emake altinstall failed" - python_clean_installation_image -q - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${ED}$(python_get_libdir)/config-${SLOT}/Makefile" || die "sed failed" - - mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}" - - if use build; then - rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,sqlite3,test,tkinter} - else - use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/test" - use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,tkinter,test/test_tk*} - fi - - use threads || rm -fr "${ED}$(python_get_libdir)/multiprocessing" - - dodoc Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed" - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins -r "${S}/Tools" || die "doins failed" - fi - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed" - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed" - - if use kernel_linux; then - if [ -d "${ED}$(python_get_libdir)/plat-linux2" ];then - cp -r "${ED}$(python_get_libdir)/plat-linux2" \ - "${ED}$(python_get_libdir)/plat-linux3" || die "copy plat-linux failed" - else - cp -r "${ED}$(python_get_libdir)/plat-linux3" \ - "${ED}$(python_get_libdir)/plat-linux2" || die "copy plat-linux failed" - fi - fi - - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${SLOT}:" \ - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update - - python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir) - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn - ewarn "\e[1;31m************************************************************************\e[0m" - ewarn - ewarn "You have just upgraded from an older version of Python." - ewarn "You should run 'python-updater \${options}' to rebuild Python modules." - ewarn - ewarn "\e[1;31m************************************************************************\e[0m" - ewarn - - local n - for ((n = 0; n < 12; n++)); do - echo -ne "\a" - sleep 1 - done - fi -} - -pkg_postrm() { - eselect_python_update - - python_mod_cleanup $(python_get_libdir) -} |