Skip to content
Browse files

Remove python ebuild updating tool

  • Loading branch information...
1 parent a00c9c7 commit f173c66b9f059a7b6119f804d55e74053d4a5645 @kiwifb kiwifb committed Jun 13, 2012
Showing with 0 additions and 73 deletions.
  1. +0 −73 Tools/update-python
View
73 Tools/update-python
@@ -1,73 +0,0 @@
-#!/bin/bash
-
-# exit on error
-set -e
-
-# change to root of sage tree
-cd "$(dirname $0)/.."
-
-echo "using overlay at $(pwd)"
-
-# remove old files
-find dev-lang/python -type f ! -name "*dynamic_class_copyreg*patch" -delete
-
-# copy new files
-cp -r /usr/portage/dev-lang/python dev-lang/
-
-# remove python ebuilds we do not need and patch everything else
-for dst in dev-lang/python/*.ebuild; do
- # filter ebuilds we dont need
- case "${dst}" in
- dev-lang/python/python-2.[7]*.ebuild)
- # keep this ebuild
- lastKeptEbuild="${dst}"
- ;;
- *)
- rm "${dst}"
- continue
- ;;
- esac
-
- # patch ebuilds to include pickle patch
- patch --quiet --no-backup-if-mismatch -l "${dst}" <<-'EOF'
- --- python.ebuild
- +++ python.ebuild
- @@ -81,3 +80,10 @@
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}"
-
- + if use sage; then
- + # patch pickle for sage http://bugs.python.org/issue7689
- + epatch "${FILESDIR}/dynamic_class_copyreg_py.patch"
- + EPATCH_OPTS="${EPATCH_OPTS} -l" \
- + epatch "${FILESDIR}/dynamic_class_copyreg_c.patch"
- + fi
- +
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- EOF
-
- # add "sage" USE flag
- sed -i "s/IUSE=\([\"\']\)/IUSE=\1sage /" "${dst}"
-
- # check if USE flag was added correctly
- if [[ $(grep -c "IUSE=[\"\']sage " ${dst}) -ne 1 ]]; then
- echo "Sed didn't apply cleanly to ${dst}" >&2
- exit 1
- fi
-
- # add keywords for prefix
- ekeyword ~amd64-linux "${dst}" &> /dev/null
- ekeyword ~x86-linux "${dst}" &> /dev/null
-done
-
-for i in dev-lang/python/files/*; do
- if ! grep -qF "/$(basename "$i")" dev-lang/python/*.ebuild; then
- rm "$i"
- fi
-done
-
-# add description for sage USE flag
-sed -i 's:</use>:\t<flag name="sage">Apply fix for issue7689'\
-' required by sage.</flag>\n</use>:' dev-lang/python/metadata.xml
-
-# regenerate manifest file
-ebuild "${lastKeptEbuild}" manifest &> /dev/null

0 comments on commit f173c66

Please sign in to comment.
Something went wrong with that request. Please try again.