Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/
Date: Tue, 25 Apr 2017 22:20:21
Message-Id: 1493158809.223bba3cf1e29fb9bd73b2d91b9bee9963f8a9cd.mgorny@gentoo
1 commit: 223bba3cf1e29fb9bd73b2d91b9bee9963f8a9cd
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 25 22:04:22 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 25 22:20:09 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=223bba3c
7
8 dev-lang/python: Clean old versions up
9
10 dev-lang/python/Manifest | 3 -
11 dev-lang/python/python-3.5.2.ebuild | 362 ------------------------------------
12 dev-lang/python/python-3.6.0.ebuild | 340 ---------------------------------
13 3 files changed, 705 deletions(-)
14
15 diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
16 index e9a7af80382..b89754b87ed 100644
17 --- a/dev-lang/python/Manifest
18 +++ b/dev-lang/python/Manifest
19 @@ -2,14 +2,11 @@ DIST Python-2.7.12.tar.xz 12390820 SHA256 d7837121dd5652a05fef807c361909d255d173
20 DIST Python-2.7.13.tar.xz 12495628 SHA256 35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731 SHA512 f37c9a28ce129d01e63c84d7db627a06402854578f62d17927334ea21ede318e04bbf66e890e3f47c85333e6b19f6e5581fb3f3e27efd24be27017d1b6529c4b WHIRLPOOL 6bb6ad867c856bcaea97d5ad85882d990f5c8169a2450685cb77645f674bead83970c67a6a689ce0807856e366f320a0230250d2239f005f2a64cc32505507a5
21 DIST Python-3.4.5.tar.xz 14516820 SHA256 ee64b1c8a47461009abf25252332d29a4e587cb4f0c1c96aa793a3732e9d898a SHA512 b548a5338d141b3086dea372fa2cc245ba5350ee9f0d1304ef6222dc45380b66d380b092e547d54206d56ca68563b95036f445f97f72bb0ef1d48f81a74a3d4c WHIRLPOOL 43e0aed0177d46148964447b4fb24475c4c736afb2ba84ec393fbf55db3da3f192308f9c8f236deaa7a608dac56946ee7755970fadaa82bf406c910a05f36883
22 DIST Python-3.4.6.tar.xz 14473592 SHA256 f13428bbe6aa9e3b9b6499502dc488c26096349ed7a21f7a0c1db90911115f40 SHA512 f6785cf6a99a8a27823baefe59cc20e34cbec01bb444c8600e7f49b5437159d5137f9d80fce26e219846d71bfe98f68bc6f0c87719a34db0050a4eaca95959ac WHIRLPOOL d76c18cd247a953ff836cea1ead6f9fb71637938f8bdc91376f06841069944863ac3f6fa536fd0102279e828149c3280b48a48c8d0eaca70df2941a3f38a18ed
23 -DIST Python-3.5.2.tar.xz 15222676 SHA256 0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40 SHA512 c07c3366f1c81e214241444bb9da6db9d11da32ad66bfa29cdad5a3b2e34e4d870bda6d4ce3c3910b582942e91f1d8c8a1c1a7b9464cc147b83c9e0007012742 WHIRLPOOL cf55d67f362b6a7529d43bb5aa8014c8349be190c6d4dae9d48de1679ab8623087478f41686cdced981cf18bb3d107052732cd437ff31ba5de2cc06b04ec2289
24 DIST Python-3.5.3.tar.xz 15213396 SHA256 eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0 SHA512 bbcc20e315c63dbc8901d7e7bfa29d4dbdad9335720757d8d679730319fd1d9fcfdb55cf62d620c9b052134170f162c28d653a8af60923185b8932524d827864 WHIRLPOOL 8aecc4dd97342d23b61cbef686f8324d4e9ee970e40745f88027bca63cf144cfa454e4d88ac52d508126c26f1ddb18617d0ff37f036438f08842998ed9e06066
25 -DIST Python-3.6.0.tar.xz 16805836 SHA256 b0c5f904f685e32d9232f7bdcbece9819a892929063b6e385414ad2dd6a23622 SHA512 9d06bee9172bc0bfd2d280fd1c27ea712f3258cfbfd2e2aeb734d0a6710998d5deeefc5d6e72251750dd9493d35461511ceaa187a29dea700ca238ff6ac1dbb2 WHIRLPOOL 4fbe3b971ff6fca4349c74ca07ade0406ae70e0d201cb7689e95744a6f39d1bcc010eb426f4e02aa8f692828aa996aa5c7656b8031503b342b9b4a42beeb7827
26 DIST Python-3.6.1.tar.xz 16872064 SHA256 a01810ddfcec216bcdb357a84bfaafdfaa0ca42bbdaa4cb7ff74f5a9961e4041 SHA512 8605fb7019386fec227d4b06d06f00ae500a8a89df289bfe6141bb56196c75483a60cc0ee553930742b31cefce68add5ccf226e0f27b7b915f5026d597e1ac29 WHIRLPOOL 94309888496431e974463c42375df5eb067321687d47e81efebd36aac322d44bb76f274c0595c7e9de2ea35ead594d0b261e1be2ec31914a812e654c71fff105
27 DIST python-gentoo-patches-2.7.12-0.tar.xz 13576 SHA256 cd842eec7202df57c153adc1fbb81e70b26ef651f8e9346e065d8577b93f343b SHA512 8bf530fca15c47fa5d9bc958e433b35943a12c98e4172806a45aa60dc85ec92f8ab6ffcd90f752dc5bf8ffc711414894c15820c4b6ef72dbcedc2808119fb1f6 WHIRLPOOL 54b8ca6a4371d460dadccfdffcc096c12930d58714eef95117a658d7a1337ea89c45c69553b5b993017211faaa0f8d670e09a8452e53c0fb176be3e908524ee6
28 DIST python-gentoo-patches-2.7.13-0.tar.xz 13292 SHA256 271835eb36125d09cc5e904ef23a5263acd8e5f513202a8d4f8a9a0f64fc80a8 SHA512 d70f6baba1a465a752c515e33dfdee2a5cc75400fadfb8ea0bd1e82d50089abdf02d7726c697850dc47de2054aa494bbdc08de2673c260b54e609f29dab259ad WHIRLPOOL 6a6d8b099fa814839bf5b3455b3889205c649ef522b35c3a501831d63d0e916d7747b83ac9b8991f8f8c34b328478d84cf7a12a32161ce0fec37204f9c019e2d
29 DIST python-gentoo-patches-3.4.5-0.tar.xz 12044 SHA256 84ee7630670a1dac4bbbc55fabf5f99b5b29007de4f140ad956e93d2e7aba8fa SHA512 108a4845667ecdf4001fcbeffab0cfbbac87439a449a7351428b0f3e2f159e3848ee0c0dfa45c9fba893b9f9584b33722fc8bb0bd7485a1d0909c3a35ede6ed8 WHIRLPOOL f0248faa0b4ce5679e37381bba90f8a4d361a49db792787bffc06a54a4bc82fea4d53255120f10e6dbf51b99e12417fc1b469be9624e73508fa3a212a38e7352
30 DIST python-gentoo-patches-3.4.6-0.tar.xz 11728 SHA256 93e7c8487deefc36c612403fb6c82e495c46846a1952f9ed85f82af41840be4a SHA512 41c22dc8f1db8800fc0b97eed2b27bf1873e5de1369bd4aecf7a7a91e609a78e45a4b56fc89d575317f33a7704c0c1cad1494e8a993415a198f256e8338f49ab WHIRLPOOL 851945e7ccea985a88bcbd71bc404bc34c27a0e335386e9ed15fa9876aab3285ff559936fb2dcadf7ac0594a7cb03ac3a9e4135b67b350c5fdf33e9a44ca0654
31 -DIST python-gentoo-patches-3.5.2-0.tar.xz 12008 SHA256 eb898fb448bd40f086ae2910e94c608faa932eb377fe40bd34f4390b4c37aac1 SHA512 e2ef1b8f10f9ea849bf52a0be65d48f7cfecf07bdf151cbbd7e3a1c9428a8d96e901650496c4ae7fd0093af8cc90de8df674dc1a4c66ad21916a4ee45a81efc8 WHIRLPOOL 66b99c7c50e3eaca783f773349b3e8a357f706a7da6a66bd2e0a53946bc81d965ac99d8fd4c50ba7e42052aa84508c8aede5eacedbb95f040a48cf1a5de6b6b0
32 DIST python-gentoo-patches-3.5.3-0.tar.xz 11740 SHA256 34e83921697c31a5470afc09b8601b4f54466ac75b3b8ed3ed71af218af10d1c SHA512 16357e49573ea6abe6f106327c0f733312653c68726c4c3f0d1ec21df6d22bc69e512a28131b3a81eb2261e32376811a839b16604e72c7fb5abb7a692840228d WHIRLPOOL 99d3eb0a132f674b998e467a5d89e73d26cf547613034938ad255ccad9d34852b6b18a3da39659c8164b196788bdc90bf2e8ebc5c8c0c4f6fb6fc45fcdd406f5
33 DIST python-gentoo-patches-3.6.0-0.tar.xz 10680 SHA256 ecf78d292f2fef1116b41c3884f492d41ea716a14f0a21755ba2f8d76aefe1a7 SHA512 f340643cf338c693ce315fab705ba888040a2989b0887686d43886319419245c24bb46ebb71cea422644f1f3beaf64289b773e72db3377187bf11a83f9313a90 WHIRLPOOL 4a4d12ea0dbb03b5d2730db40b5aebe4c1c937cfe63341c775431dc06a3b60552b9390fdf9b7fff5e50024a93d11b269ef80a95afcf308327943f7003dd4c379
34
35 diff --git a/dev-lang/python/python-3.5.2.ebuild b/dev-lang/python/python-3.5.2.ebuild
36 deleted file mode 100644
37 index 2f0c079da10..00000000000
38 --- a/dev-lang/python/python-3.5.2.ebuild
39 +++ /dev/null
40 @@ -1,362 +0,0 @@
41 -# Copyright 1999-2016 Gentoo Foundation
42 -# Distributed under the terms of the GNU General Public License v2
43 -
44 -EAPI="5"
45 -WANT_LIBTOOL="none"
46 -
47 -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
48 -
49 -MY_P="Python-${PV/_/}"
50 -PATCHSET_VERSION="3.5.2-0"
51 -
52 -DESCRIPTION="An interpreted, interactive, object-oriented programming language"
53 -HOMEPAGE="http://www.python.org/"
54 -SRC_URI="http://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
55 - https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
56 -
57 -LICENSE="PSF-2"
58 -SLOT="3.5/3.5m"
59 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
60 -IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml"
61 -
62 -# Do not add a dependency on dev-lang/python to this ebuild.
63 -# If you need to apply a patch which requires python for bootstrapping, please
64 -# run the bootstrap code on your dev box and include the results in the
65 -# patchset. See bug 447752.
66 -
67 -RDEPEND="app-arch/bzip2:0=
68 - app-arch/xz-utils:0=
69 - >=sys-libs/zlib-1.1.3:0=
70 - virtual/libffi
71 - virtual/libintl
72 - gdbm? ( sys-libs/gdbm:0=[berkdb] )
73 - ncurses? (
74 - >=sys-libs/ncurses-5.2:0=
75 - readline? ( >=sys-libs/readline-4.1:0= )
76 - )
77 - sqlite? ( >=dev-db/sqlite-3.3.8:3= )
78 - ssl? (
79 - !libressl? ( dev-libs/openssl:0= )
80 - libressl? ( dev-libs/libressl:= )
81 - )
82 - tk? (
83 - >=dev-lang/tcl-8.0:0=
84 - >=dev-lang/tk-8.0:0=
85 - dev-tcltk/blt:0=
86 - dev-tcltk/tix
87 - )
88 - xml? ( >=dev-libs/expat-2.1:0= )
89 - !!<sys-apps/sandbox-2.6-r1"
90 -DEPEND="${RDEPEND}
91 - virtual/pkgconfig
92 - !sys-devel/gcc[libffi(-)]"
93 -RDEPEND+=" !build? ( app-misc/mime-types )"
94 -PDEPEND=">=app-eselect/eselect-python-20140125-r1"
95 -
96 -S="${WORKDIR}/${MY_P}"
97 -
98 -PYVER=${SLOT%/*}
99 -
100 -src_prepare() {
101 - # Ensure that internal copies of expat, libffi and zlib are not used.
102 - rm -fr Modules/expat
103 - rm -fr Modules/_ctypes/libffi*
104 - rm -fr Modules/zlib
105 -
106 - if tc-is-cross-compiler; then
107 - # Invokes BUILDPYTHON, which is built for the host arch
108 - local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
109 - fi
110 -
111 - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
112 - epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch"
113 - epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
114 -
115 - epatch_user
116 -
117 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
118 - configure.ac \
119 - Lib/distutils/command/install.py \
120 - Lib/distutils/sysconfig.py \
121 - Lib/site.py \
122 - Lib/sysconfig.py \
123 - Lib/test/test_site.py \
124 - Makefile.pre.in \
125 - Modules/getpath.c \
126 - Modules/Setup.dist \
127 - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
128 -
129 - eautoreconf
130 -}
131 -
132 -src_configure() {
133 - local disable
134 - use gdbm || disable+=" gdbm"
135 - use ncurses || disable+=" _curses _curses_panel"
136 - use readline || disable+=" readline"
137 - use sqlite || disable+=" _sqlite3"
138 - use ssl || export PYTHON_DISABLE_SSL="1"
139 - use tk || disable+=" _tkinter"
140 - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
141 - export PYTHON_DISABLE_MODULES="${disable}"
142 -
143 - if ! use xml; then
144 - ewarn "You have configured Python without XML support."
145 - ewarn "This is NOT a recommended configuration as you"
146 - ewarn "may face problems parsing any XML documents."
147 - fi
148 -
149 - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
150 - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
151 - fi
152 -
153 - if [[ "$(gcc-major-version)" -ge 4 ]]; then
154 - append-flags -fwrapv
155 - fi
156 -
157 - filter-flags -malign-double
158 -
159 - # https://bugs.gentoo.org/show_bug.cgi?id=50309
160 - if is-flagq -O3; then
161 - is-flagq -fstack-protector-all && replace-flags -O3 -O2
162 - use hardened && replace-flags -O3 -O2
163 - fi
164 -
165 - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
166 - tc-export CXX
167 -
168 - # The configure script fails to use pkg-config correctly.
169 - # http://bugs.python.org/issue15506
170 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
171 -
172 - # Set LDFLAGS so we link modules with -lpython3.2 correctly.
173 - # Needed on FreeBSD unless Python 3.2 is already installed.
174 - # Please query BSD team before removing this!
175 - append-ldflags "-L."
176 -
177 - local dbmliborder
178 - if use gdbm; then
179 - dbmliborder+="${dbmliborder:+:}gdbm"
180 - fi
181 -
182 - BUILD_DIR="${WORKDIR}/${CHOST}"
183 - mkdir -p "${BUILD_DIR}" || die
184 - cd "${BUILD_DIR}" || die
185 -
186 - local myeconfargs=(
187 - --with-fpectl
188 - --enable-shared
189 - $(use_enable ipv6)
190 - $(use_with threads)
191 - --infodir='${prefix}/share/info'
192 - --mandir='${prefix}/share/man'
193 - --with-computed-gotos
194 - --with-dbmliborder="${dbmliborder}"
195 - --with-libc=
196 - --enable-loadable-sqlite-extensions
197 - --without-ensurepip
198 - --with-system-expat
199 - --with-system-ffi
200 - )
201 -
202 - ECONF_SOURCE="${S}" OPT="" econf "${myeconfargs[@]}"
203 -
204 - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
205 - eerror "configure has detected that the sem_open function is broken."
206 - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
207 - die "Broken sem_open function (bug 496328)"
208 - fi
209 -}
210 -
211 -src_compile() {
212 - # Ensure sed works as expected
213 - # https://bugs.gentoo.org/594768
214 - local -x LC_ALL=C
215 -
216 - cd "${BUILD_DIR}" || die
217 -
218 - emake CPPFLAGS= CFLAGS= LDFLAGS=
219 -
220 - # Work around bug 329499. See also bug 413751 and 457194.
221 - if has_version dev-libs/libffi[pax_kernel]; then
222 - pax-mark E python
223 - else
224 - pax-mark m python
225 - fi
226 -}
227 -
228 -src_test() {
229 - # Tests will not work when cross compiling.
230 - if tc-is-cross-compiler; then
231 - elog "Disabling tests due to crosscompiling."
232 - return
233 - fi
234 -
235 - cd "${BUILD_DIR}" || die
236 -
237 - # Skip failing tests.
238 - local skipped_tests="gdb"
239 -
240 - for test in ${skipped_tests}; do
241 - mv "${S}"/Lib/test/test_${test}.py "${T}"
242 - done
243 -
244 - local -x PYTHONDONTWRITEBYTECODE=
245 - emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
246 - local result=$?
247 -
248 - for test in ${skipped_tests}; do
249 - mv "${T}/test_${test}.py" "${S}"/Lib/test
250 - done
251 -
252 - elog "The following tests have been skipped:"
253 - for test in ${skipped_tests}; do
254 - elog "test_${test}.py"
255 - done
256 -
257 - elog "If you would like to run them, you may:"
258 - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
259 - elog "and run the tests separately."
260 -
261 - if [[ ${result} -ne 0 ]]; then
262 - die "emake test failed"
263 - fi
264 -}
265 -
266 -src_install() {
267 - local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
268 -
269 - cd "${BUILD_DIR}" || die
270 -
271 - emake DESTDIR="${D}" altinstall
272 -
273 - sed \
274 - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
275 - -e "s/\(PY_LDFLAGS=\).*/\1/" \
276 - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
277 -
278 - # Fix collisions between different slots of Python.
279 - rm -f "${ED}usr/$(get_libdir)/libpython3.so"
280 -
281 - # Cheap hack to get version with ABIFLAGS
282 - local abiver=$(cd "${ED}usr/include"; echo python*)
283 - if [[ ${abiver} != python${PYVER} ]]; then
284 - # Replace python3.X with a symlink to python3.Xm
285 - rm "${ED}usr/bin/python${PYVER}" || die
286 - dosym "${abiver}" "/usr/bin/python${PYVER}"
287 - # Create python3.X-config symlink
288 - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
289 - # Create python-3.5m.pc symlink
290 - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
291 - fi
292 -
293 - # python seems to get rebuilt in src_install (bug 569908)
294 - # Work around it for now.
295 - if has_version dev-libs/libffi[pax_kernel]; then
296 - pax-mark E "${ED}usr/bin/${abiver}"
297 - else
298 - pax-mark m "${ED}usr/bin/${abiver}"
299 - fi
300 -
301 - use elibc_uclibc && rm -fr "${libdir}/test"
302 - use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
303 - use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
304 -
305 - use threads || rm -fr "${libdir}/multiprocessing"
306 - use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
307 -
308 - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
309 -
310 - if use examples; then
311 - insinto /usr/share/doc/${PF}/examples
312 - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
313 - doins -r "${S}"/Tools
314 - fi
315 - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
316 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
317 - emake --no-print-directory -s -f - 2>/dev/null)
318 - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
319 -
320 - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
321 - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
322 - sed \
323 - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
324 - -e "s:@PYDOC@:pydoc${PYVER}:" \
325 - -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
326 -
327 - # for python-exec
328 - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
329 -
330 - # if not using a cross-compiler, use the fresh binary
331 - if ! tc-is-cross-compiler; then
332 - local -x PYTHON=./python
333 - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
334 - else
335 - vars=( PYTHON "${vars[@]}" )
336 - fi
337 -
338 - python_export "python${PYVER}" "${vars[@]}"
339 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
340 - python_domodule epython.py
341 -
342 - # python-exec wrapping support
343 - local pymajor=${PYVER%.*}
344 - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
345 - # python and pythonX
346 - ln -s "../../../bin/${abiver}" \
347 - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
348 - ln -s "python${pymajor}" \
349 - "${D}${PYTHON_SCRIPTDIR}/python" || die
350 - # python-config and pythonX-config
351 - # note: we need to create a wrapper rather than symlinking it due
352 - # to some random dirname(argv[0]) magic performed by python-config
353 - cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
354 - #!/bin/sh
355 - exec "${abiver}-config" "\${@}"
356 - EOF
357 - chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
358 - ln -s "python${pymajor}-config" \
359 - "${D}${PYTHON_SCRIPTDIR}/python-config" || die
360 - # 2to3, pydoc, pyvenv
361 - ln -s "../../../bin/2to3-${PYVER}" \
362 - "${D}${PYTHON_SCRIPTDIR}/2to3" || die
363 - ln -s "../../../bin/pydoc${PYVER}" \
364 - "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
365 - ln -s "../../../bin/pyvenv-${PYVER}" \
366 - "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
367 - # idle
368 - if use tk; then
369 - ln -s "../../../bin/idle${PYVER}" \
370 - "${D}${PYTHON_SCRIPTDIR}/idle" || die
371 - fi
372 -}
373 -
374 -pkg_preinst() {
375 - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
376 - python_updater_warning="1"
377 - fi
378 -}
379 -
380 -eselect_python_update() {
381 - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
382 - eselect python update
383 - fi
384 -
385 - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
386 - eselect python update --python${PV%%.*}
387 - fi
388 -}
389 -
390 -pkg_postinst() {
391 - eselect_python_update
392 -
393 - if [[ "${python_updater_warning}" == "1" ]]; then
394 - ewarn "You have just upgraded from an older version of Python."
395 - ewarn
396 - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
397 - fi
398 -}
399 -
400 -pkg_postrm() {
401 - eselect_python_update
402 -}
403
404 diff --git a/dev-lang/python/python-3.6.0.ebuild b/dev-lang/python/python-3.6.0.ebuild
405 deleted file mode 100644
406 index d4a2a2a0c56..00000000000
407 --- a/dev-lang/python/python-3.6.0.ebuild
408 +++ /dev/null
409 @@ -1,340 +0,0 @@
410 -# Copyright 1999-2017 Gentoo Foundation
411 -# Distributed under the terms of the GNU General Public License v2
412 -
413 -EAPI="5"
414 -WANT_LIBTOOL="none"
415 -
416 -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
417 -
418 -MY_P="Python-${PV}"
419 -PATCHSET_VERSION="3.6.0-0"
420 -
421 -DESCRIPTION="An interpreted, interactive, object-oriented programming language"
422 -HOMEPAGE="https://www.python.org/"
423 -SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
424 - https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
425 -
426 -LICENSE="PSF-2"
427 -SLOT="3.6/3.6m"
428 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
429 -IUSE="build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml"
430 -
431 -# Do not add a dependency on dev-lang/python to this ebuild.
432 -# If you need to apply a patch which requires python for bootstrapping, please
433 -# run the bootstrap code on your dev box and include the results in the
434 -# patchset. See bug 447752.
435 -
436 -RDEPEND="app-arch/bzip2:0=
437 - app-arch/xz-utils:0=
438 - >=sys-libs/zlib-1.1.3:0=
439 - virtual/libffi
440 - virtual/libintl
441 - gdbm? ( sys-libs/gdbm:0=[berkdb] )
442 - ncurses? (
443 - >=sys-libs/ncurses-5.2:0=
444 - readline? ( >=sys-libs/readline-4.1:0= )
445 - )
446 - sqlite? ( >=dev-db/sqlite-3.3.8:3= )
447 - ssl? (
448 - !libressl? ( dev-libs/openssl:0= )
449 - libressl? ( dev-libs/libressl:= )
450 - )
451 - tk? (
452 - >=dev-lang/tcl-8.0:0=
453 - >=dev-lang/tk-8.0:0=
454 - dev-tcltk/blt:0=
455 - dev-tcltk/tix
456 - )
457 - xml? ( >=dev-libs/expat-2.1:0= )
458 - !!<sys-apps/sandbox-2.6-r1"
459 -DEPEND="${RDEPEND}
460 - virtual/pkgconfig
461 - !sys-devel/gcc[libffi(-)]"
462 -RDEPEND+=" !build? ( app-misc/mime-types )"
463 -PDEPEND=">=app-eselect/eselect-python-20140125-r1"
464 -
465 -S="${WORKDIR}/${MY_P}"
466 -PYVER=${SLOT%/*}
467 -
468 -src_prepare() {
469 - # Ensure that internal copies of expat, libffi and zlib are not used.
470 - rm -fr Modules/expat
471 - rm -fr Modules/_ctypes/libffi*
472 - rm -fr Modules/zlib
473 -
474 - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
475 -
476 - epatch_user
477 -
478 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
479 - Lib/distutils/command/install.py \
480 - Lib/distutils/sysconfig.py \
481 - Lib/site.py \
482 - Lib/sysconfig.py \
483 - Lib/test/test_site.py \
484 - Makefile.pre.in \
485 - Modules/Setup.dist \
486 - Modules/getpath.c \
487 - configure.ac \
488 - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
489 -
490 - eautoreconf
491 -}
492 -
493 -src_configure() {
494 - local disable
495 - use gdbm || disable+=" gdbm"
496 - use ncurses || disable+=" _curses _curses_panel"
497 - use readline || disable+=" readline"
498 - use sqlite || disable+=" _sqlite3"
499 - use ssl || export PYTHON_DISABLE_SSL="1"
500 - use tk || disable+=" _tkinter"
501 - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
502 - export PYTHON_DISABLE_MODULES="${disable}"
503 -
504 - if ! use xml; then
505 - ewarn "You have configured Python without XML support."
506 - ewarn "This is NOT a recommended configuration as you"
507 - ewarn "may face problems parsing any XML documents."
508 - fi
509 -
510 - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
511 - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
512 - fi
513 -
514 - if [[ "$(gcc-major-version)" -ge 4 ]]; then
515 - append-flags -fwrapv
516 - fi
517 -
518 - filter-flags -malign-double
519 -
520 - # https://bugs.gentoo.org/show_bug.cgi?id=50309
521 - if is-flagq -O3; then
522 - is-flagq -fstack-protector-all && replace-flags -O3 -O2
523 - use hardened && replace-flags -O3 -O2
524 - fi
525 -
526 - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
527 - tc-export CXX
528 -
529 - # Set LDFLAGS so we link modules with -lpython3.2 correctly.
530 - # Needed on FreeBSD unless Python 3.2 is already installed.
531 - # Please query BSD team before removing this!
532 - append-ldflags "-L."
533 -
534 - local dbmliborder
535 - if use gdbm; then
536 - dbmliborder+="${dbmliborder:+:}gdbm"
537 - fi
538 -
539 - local myeconfargs=(
540 - --with-fpectl
541 - --enable-shared
542 - $(use_enable ipv6)
543 - $(use_with threads)
544 - --infodir='${prefix}/share/info'
545 - --mandir='${prefix}/share/man'
546 - --with-computed-gotos
547 - --with-dbmliborder="${dbmliborder}"
548 - --with-libc=
549 - --enable-loadable-sqlite-extensions
550 - --without-ensurepip
551 - --with-system-expat
552 - --with-system-ffi
553 - )
554 -
555 - OPT="" econf "${myeconfargs[@]}"
556 -
557 - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
558 - eerror "configure has detected that the sem_open function is broken."
559 - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
560 - die "Broken sem_open function (bug 496328)"
561 - fi
562 -}
563 -
564 -src_compile() {
565 - # Ensure sed works as expected
566 - # https://bugs.gentoo.org/594768
567 - local -x LC_ALL=C
568 -
569 - emake CPPFLAGS= CFLAGS= LDFLAGS=
570 -
571 - # Work around bug 329499. See also bug 413751 and 457194.
572 - if has_version dev-libs/libffi[pax_kernel]; then
573 - pax-mark E python
574 - else
575 - pax-mark m python
576 - fi
577 -}
578 -
579 -src_test() {
580 - # Tests will not work when cross compiling.
581 - if tc-is-cross-compiler; then
582 - elog "Disabling tests due to crosscompiling."
583 - return
584 - fi
585 -
586 - # Skip failing tests.
587 - local skipped_tests="gdb"
588 -
589 - for test in ${skipped_tests}; do
590 - mv "${S}"/Lib/test/test_${test}.py "${T}"
591 - done
592 -
593 - local -x PYTHONDONTWRITEBYTECODE=
594 -
595 - emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
596 - local result=$?
597 -
598 - for test in ${skipped_tests}; do
599 - mv "${T}/test_${test}.py" "${S}"/Lib/test
600 - done
601 -
602 - elog "The following tests have been skipped:"
603 - for test in ${skipped_tests}; do
604 - elog "test_${test}.py"
605 - done
606 -
607 - elog "If you would like to run them, you may:"
608 - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
609 - elog "and run the tests separately."
610 -
611 - if [[ ${result} -ne 0 ]]; then
612 - die "emake test failed"
613 - fi
614 -}
615 -
616 -src_install() {
617 - local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
618 -
619 - emake DESTDIR="${D}" altinstall
620 -
621 - sed \
622 - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
623 - -e "s/\(PY_LDFLAGS=\).*/\1/" \
624 - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
625 -
626 - # Fix collisions between different slots of Python.
627 - rm -f "${ED}usr/$(get_libdir)/libpython3.so"
628 -
629 - # Cheap hack to get version with ABIFLAGS
630 - local abiver=$(cd "${ED}usr/include"; echo python*)
631 - if [[ ${abiver} != python${PYVER} ]]; then
632 - # Replace python3.X with a symlink to python3.Xm
633 - rm "${ED}usr/bin/python${PYVER}" || die
634 - dosym "${abiver}" "/usr/bin/python${PYVER}"
635 - # Create python3.X-config symlink
636 - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
637 - # Create python-3.5m.pc symlink
638 - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
639 - fi
640 -
641 - # python seems to get rebuilt in src_install (bug 569908)
642 - # Work around it for now.
643 - if has_version dev-libs/libffi[pax_kernel]; then
644 - pax-mark E "${ED}usr/bin/${abiver}"
645 - else
646 - pax-mark m "${ED}usr/bin/${abiver}"
647 - fi
648 -
649 - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
650 - use tk || rm -r "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
651 -
652 - use threads || rm -r "${libdir}/multiprocessing" || die
653 - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
654 -
655 - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
656 -
657 - if use examples; then
658 - insinto /usr/share/doc/${PF}/examples
659 - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
660 - doins -r "${S}"/Tools
661 - fi
662 - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
663 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
664 - emake --no-print-directory -s -f - 2>/dev/null)
665 - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
666 -
667 - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
668 - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
669 - sed \
670 - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
671 - -e "s:@PYDOC@:pydoc${PYVER}:" \
672 - -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
673 -
674 - # for python-exec
675 - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
676 -
677 - # if not using a cross-compiler, use the fresh binary
678 - if ! tc-is-cross-compiler; then
679 - local -x PYTHON=./python
680 - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
681 - else
682 - vars=( PYTHON "${vars[@]}" )
683 - fi
684 -
685 - python_export "python${PYVER}" "${vars[@]}"
686 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
687 - python_domodule epython.py
688 -
689 - # python-exec wrapping support
690 - local pymajor=${PYVER%.*}
691 - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
692 - # python and pythonX
693 - ln -s "../../../bin/${abiver}" \
694 - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
695 - ln -s "python${pymajor}" \
696 - "${D}${PYTHON_SCRIPTDIR}/python" || die
697 - # python-config and pythonX-config
698 - # note: we need to create a wrapper rather than symlinking it due
699 - # to some random dirname(argv[0]) magic performed by python-config
700 - cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
701 - #!/bin/sh
702 - exec "${abiver}-config" "\${@}"
703 - EOF
704 - chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
705 - ln -s "python${pymajor}-config" \
706 - "${D}${PYTHON_SCRIPTDIR}/python-config" || die
707 - # 2to3, pydoc, pyvenv
708 - ln -s "../../../bin/2to3-${PYVER}" \
709 - "${D}${PYTHON_SCRIPTDIR}/2to3" || die
710 - ln -s "../../../bin/pydoc${PYVER}" \
711 - "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
712 - ln -s "../../../bin/pyvenv-${PYVER}" \
713 - "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
714 - # idle
715 - if use tk; then
716 - ln -s "../../../bin/idle${PYVER}" \
717 - "${D}${PYTHON_SCRIPTDIR}/idle" || die
718 - fi
719 -}
720 -
721 -pkg_preinst() {
722 - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
723 - python_updater_warning="1"
724 - fi
725 -}
726 -
727 -eselect_python_update() {
728 - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
729 - eselect python update
730 - fi
731 -
732 - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
733 - eselect python update --python${PV%%.*}
734 - fi
735 -}
736 -
737 -pkg_postinst() {
738 - eselect_python_update
739 -
740 - if [[ "${python_updater_warning}" == "1" ]]; then
741 - ewarn "You have just upgraded from an older version of Python."
742 - ewarn
743 - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
744 - fi
745 -}
746 -
747 -pkg_postrm() {
748 - eselect_python_update
749 -}