Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/pypy: pypy-2.0.2-r1.ebuild ChangeLog
Date: Sun, 30 Mar 2014 20:55:48
Message-Id: 20140330205545.7A41420057@flycatcher.gentoo.org
1 mgorny 14/03/30 20:55:45
2
3 Modified: ChangeLog
4 Added: pypy-2.0.2-r1.ebuild
5 Log:
6 Backport the :0 slot switch to pypy-2.0.2 since we have binpackages for this version.
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
9
10 Revision Changes Path
11 1.58 dev-python/pypy/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pypy/ChangeLog?rev=1.58&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pypy/ChangeLog?rev=1.58&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pypy/ChangeLog?r1=1.57&r2=1.58
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-python/pypy/ChangeLog,v
20 retrieving revision 1.57
21 retrieving revision 1.58
22 diff -u -r1.57 -r1.58
23 --- ChangeLog 18 Mar 2014 10:39:34 -0000 1.57
24 +++ ChangeLog 30 Mar 2014 20:55:45 -0000 1.58
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-python/pypy
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/ChangeLog,v 1.57 2014/03/18 10:39:34 mgorny Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/ChangeLog,v 1.58 2014/03/30 20:55:45 mgorny Exp $
30 +
31 +*pypy-2.0.2-r1 (30 Mar 2014)
32 +
33 + 30 Mar 2014; Michał Górny <mgorny@g.o> +pypy-2.0.2-r1.ebuild:
34 + Backport the :0 slot switch to pypy-2.0.2 since we have binpackages for this
35 + version.
36
37 18 Mar 2014; Michał Górny <mgorny@g.o> -pypy-9999.ebuild:
38 Remove the live ebuild since it is outdated and not supported.
39
40
41
42 1.1 dev-python/pypy/pypy-2.0.2-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pypy/pypy-2.0.2-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pypy/pypy-2.0.2-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: pypy-2.0.2-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2014 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-python/pypy/pypy-2.0.2-r1.ebuild,v 1.1 2014/03/30 20:55:45 mgorny Exp $
52
53 EAPI=5
54
55 PYTHON_COMPAT=( python2_7 pypy2_0 )
56 inherit check-reqs eutils multilib multiprocessing pax-utils \
57 python-any-r1 toolchain-funcs versionator
58
59 DESCRIPTION="A fast, compliant alternative implementation of the Python language"
60 HOMEPAGE="http://pypy.org/"
61 SRC_URI="mirror://bitbucket/pypy/pypy/downloads/${P}-src.tar.bz2"
62
63 LICENSE="MIT"
64 SLOT="0/$(get_version_component_range 1-2 ${PV})"
65 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
66 IUSE="bzip2 doc +jit ncurses sandbox shadowstack sqlite sse2"
67
68 RDEPEND=">=sys-libs/zlib-1.1.3
69 virtual/libffi
70 virtual/libintl
71 dev-libs/expat
72 dev-libs/openssl
73 bzip2? ( app-arch/bzip2 )
74 ncurses? ( sys-libs/ncurses )
75 sqlite? ( dev-db/sqlite:3 )"
76 DEPEND="${RDEPEND}
77 doc? ( dev-python/sphinx )
78 ${PYTHON_DEPS}"
79 PDEPEND="app-admin/python-updater"
80
81 S="${WORKDIR}/${P}-src"
82
83 pkg_pretend() {
84 CHECKREQS_MEMORY="2G"
85 use amd64 && CHECKREQS_MEMORY="4G"
86 check-reqs_pkg_pretend
87 # if [[ ${MERGE_TYPE} != binary && "$(gcc-version)" == "4.8" ]]; then
88 # die "PyPy does not build correctly with GCC 4.8"
89 # fi
90 }
91
92 pkg_setup() {
93 pkg_pretend
94 python-any-r1_pkg_setup
95 }
96
97 src_prepare() {
98 epatch "${FILESDIR}/1.9-scripts-location.patch"
99 epatch "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
100 epatch "${FILESDIR}/2.0.2-distutils-fix_handling_of_executables_and_flags.patch"
101
102 epatch_user
103 }
104
105 src_compile() {
106 tc-export CC
107
108 local jit_backend
109 if use jit; then
110 jit_backend='--jit-backend='
111
112 # We only need the explicit sse2 switch for x86.
113 # On other arches we can rely on autodetection which uses
114 # compiler macros. Plus, --jit-backend= doesn't accept all
115 # the modern values...
116
117 if use x86; then
118 if use sse2; then
119 jit_backend+=x86
120 else
121 jit_backend+=x86-without-sse2
122 fi
123 else
124 jit_backend+=auto
125 fi
126 fi
127
128 local args=(
129 $(usex jit -Ojit -O2)
130 $(usex shadowstack --gcrootfinder=shadowstack '')
131 $(usex sandbox --sandbox '')
132
133 ${jit_backend}
134 --make-jobs=$(makeopts_jobs)
135
136 pypy/goal/targetpypystandalone
137 )
138
139 # Avoid linking against libraries disabled by use flags
140 local opts=(
141 bzip2:bz2
142 ncurses:_minimal_curses
143 )
144
145 local opt
146 for opt in "${opts[@]}"; do
147 local flag=${opt%:*}
148 local mod=${opt#*:}
149
150 args+=(
151 $(usex ${flag} --withmod --withoutmod)-${mod}
152 )
153 done
154
155 set -- "${PYTHON}" rpython/bin/rpython --batch "${args[@]}"
156 echo -e "\033[1m${@}\033[0m"
157 "${@}" || die "compile error"
158
159 use doc && emake -C pypy/doc/ html
160 pax-mark m "${ED%/}${INSDESTTREE}/pypy-c"
161 }
162
163 src_test() {
164 # (unset)
165 local -x PYTHONDONTWRITEBYTECODE
166
167 ./pypy-c ./pypy/test_all.py --pypy=./pypy-c lib-python || die
168 }
169
170 src_install() {
171 einfo "Installing PyPy ..."
172 insinto "/usr/$(get_libdir)/pypy"
173 doins -r include lib_pypy lib-python pypy-c
174 fperms a+x ${INSDESTTREE}/pypy-c
175 pax-mark m "${ED%/}${INSDESTTREE}/pypy-c"
176 dosym ../$(get_libdir)/pypy/pypy-c /usr/bin/pypy
177 dodoc README.rst
178
179 if ! use sqlite; then
180 rm -r "${ED%/}${INSDESTTREE}"/lib-python/*2.7/sqlite3 || die
181 rm "${ED%/}${INSDESTTREE}"/lib_pypy/_sqlite3.py || die
182 fi
183
184 # Install docs
185 use doc && dohtml -r pypy/doc/_build/html/
186
187 einfo "Generating caches and byte-compiling ..."
188
189 python_export pypy EPYTHON PYTHON PYTHON_SITEDIR
190 local PYTHON=${ED%/}${INSDESTTREE}/pypy-c
191
192 echo "EPYTHON='${EPYTHON}'" > epython.py
193 python_domodule epython.py
194
195 # Note: call portage helpers before this line.
196 # PYTHONPATH confuses them and will result in random failures.
197
198 local -x PYTHONPATH="${ED%/}${INSDESTTREE}/lib_pypy:${ED%/}${INSDESTTREE}/lib-python/2.7"
199
200 # Generate Grammar and PatternGrammar pickles.
201 "${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
202 || die "Generation of Grammar and PatternGrammar pickles failed"
203
204 # Generate cffi cache
205 "${PYTHON}" -c "import _curses" || die "Failed to import _curses"
206 if use sqlite; then
207 "${PYTHON}" -c "import _sqlite3" || die "Failed to import _sqlite3"
208 fi
209
210 # compile the installed modules
211 python_optimize "${ED%/}${INSDESTTREE}"
212 }