1 |
commit: a08ae41292ac073d36ddaf4e8274dc0346f484a5 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 31 17:43:48 2017 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 31 17:43:48 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a08ae412 |
7 |
|
8 |
dev-lang/python: remove old |
9 |
|
10 |
Package-Manager: Portage-2.3.12_p5, Repoman-2.3.3_p75 |
11 |
|
12 |
dev-lang/python/Manifest | 6 - |
13 |
dev-lang/python/python-2.7.13.ebuild | 365 --------------------------------- |
14 |
dev-lang/python/python-3.5.3.ebuild | 362 -------------------------------- |
15 |
dev-lang/python/python-3.6.1-r1.ebuild | 343 ------------------------------- |
16 |
4 files changed, 1076 deletions(-) |
17 |
|
18 |
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest |
19 |
index 17f4aa16e20..888d2d7ea0f 100644 |
20 |
--- a/dev-lang/python/Manifest |
21 |
+++ b/dev-lang/python/Manifest |
22 |
@@ -1,18 +1,12 @@ |
23 |
DIST Python-2.7.12.tar.xz 12390820 SHA256 d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978 SHA512 6ddbbce47cc49597433d98ca05c2f62f07ed1070807b645602a8e9e9b996adc6fa66fa20a33cd7d23d4e7e925e25071d7301d288149fbe4e8c5f06d5438dda1f WHIRLPOOL fe4224f4c3dc8dc5c49005051da0069922c86f39880a0072c09fac422e1913d924ac695e22be11603a961329dd8c17b1cf7696b31b62ef93398e42745a6446d6 |
24 |
-DIST Python-2.7.13.tar.xz 12495628 SHA256 35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731 SHA512 f37c9a28ce129d01e63c84d7db627a06402854578f62d17927334ea21ede318e04bbf66e890e3f47c85333e6b19f6e5581fb3f3e27efd24be27017d1b6529c4b WHIRLPOOL 6bb6ad867c856bcaea97d5ad85882d990f5c8169a2450685cb77645f674bead83970c67a6a689ce0807856e366f320a0230250d2239f005f2a64cc32505507a5 |
25 |
DIST Python-2.7.14.tar.xz 12576112 SHA256 71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66 SHA512 78310b0be6388ffa15f29a80afb9ab3c03a572cb094e9da00cfe391afadb51696e41f592eb658d6a31a2f422fdac8a55214a382cbb8cfb43d4a127d5b35ea7f9 WHIRLPOOL c604d747daa874de926abb8ec142a7824f2706b79fd828aa189895ba0e7d4df044b9be58d49ab70a245e9e7abd5da4340abe54fa0ff9eab32a4dee7db7ee9d29 |
26 |
DIST Python-3.4.5.tar.xz 14516820 SHA256 ee64b1c8a47461009abf25252332d29a4e587cb4f0c1c96aa793a3732e9d898a SHA512 b548a5338d141b3086dea372fa2cc245ba5350ee9f0d1304ef6222dc45380b66d380b092e547d54206d56ca68563b95036f445f97f72bb0ef1d48f81a74a3d4c WHIRLPOOL 43e0aed0177d46148964447b4fb24475c4c736afb2ba84ec393fbf55db3da3f192308f9c8f236deaa7a608dac56946ee7755970fadaa82bf406c910a05f36883 |
27 |
DIST Python-3.4.6.tar.xz 14473592 SHA256 f13428bbe6aa9e3b9b6499502dc488c26096349ed7a21f7a0c1db90911115f40 SHA512 f6785cf6a99a8a27823baefe59cc20e34cbec01bb444c8600e7f49b5437159d5137f9d80fce26e219846d71bfe98f68bc6f0c87719a34db0050a4eaca95959ac WHIRLPOOL d76c18cd247a953ff836cea1ead6f9fb71637938f8bdc91376f06841069944863ac3f6fa536fd0102279e828149c3280b48a48c8d0eaca70df2941a3f38a18ed |
28 |
-DIST Python-3.5.3.tar.xz 15213396 SHA256 eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0 SHA512 bbcc20e315c63dbc8901d7e7bfa29d4dbdad9335720757d8d679730319fd1d9fcfdb55cf62d620c9b052134170f162c28d653a8af60923185b8932524d827864 WHIRLPOOL 8aecc4dd97342d23b61cbef686f8324d4e9ee970e40745f88027bca63cf144cfa454e4d88ac52d508126c26f1ddb18617d0ff37f036438f08842998ed9e06066 |
29 |
DIST Python-3.5.4.tar.xz 15332320 SHA256 94d93bfabb3b109f8a10365a325f920f9ec98c6e2380bf228f9700a14054c84c SHA512 dbbe2740ee1cce5404b7b6436a9b3887e15f415a1006efa22014ec7e5b1e48c43eed0ff98f6f5b365c527b8d2525be4ce72bbe404ce71c0835529fcd6f0267ff WHIRLPOOL 63bca2b7b6f5da024c30f84d7e4152a37232e3b277fc5ec58ede9a1da57a44e31bb5f2e5ee33874328526f8d7fdd05dc12df5c69fb827394d5b57907671d3dd3 |
30 |
-DIST Python-3.6.1.tar.xz 16872064 SHA256 a01810ddfcec216bcdb357a84bfaafdfaa0ca42bbdaa4cb7ff74f5a9961e4041 SHA512 8605fb7019386fec227d4b06d06f00ae500a8a89df289bfe6141bb56196c75483a60cc0ee553930742b31cefce68add5ccf226e0f27b7b915f5026d597e1ac29 WHIRLPOOL 94309888496431e974463c42375df5eb067321687d47e81efebd36aac322d44bb76f274c0595c7e9de2ea35ead594d0b261e1be2ec31914a812e654c71fff105 |
31 |
DIST Python-3.6.3.tar.xz 16974296 SHA256 cda7d967c9a4bfa52337cdf551bcc5cff026b6ac50a8834e568ce4a794ca81da SHA512 32f24a3adcb7880003c7ecdc5e53e838e774adda76b308961d8215e28db630b2fa2828097817924c76afa4212b2df3362eb64d4e10f37c0147f512ec5aa8662b WHIRLPOOL cdd04d265568d577e97ce921bef63e78c493f05426adcc8bc2bb1e5dbf02e35c3a4361ff467b7021e917e5056cd12d75cb038e5977093649881f8c2c5aabcc28 |
32 |
DIST python-gentoo-patches-2.7.12-0.tar.xz 13576 SHA256 cd842eec7202df57c153adc1fbb81e70b26ef651f8e9346e065d8577b93f343b SHA512 8bf530fca15c47fa5d9bc958e433b35943a12c98e4172806a45aa60dc85ec92f8ab6ffcd90f752dc5bf8ffc711414894c15820c4b6ef72dbcedc2808119fb1f6 WHIRLPOOL 54b8ca6a4371d460dadccfdffcc096c12930d58714eef95117a658d7a1337ea89c45c69553b5b993017211faaa0f8d670e09a8452e53c0fb176be3e908524ee6 |
33 |
-DIST python-gentoo-patches-2.7.13-0.tar.xz 13292 SHA256 271835eb36125d09cc5e904ef23a5263acd8e5f513202a8d4f8a9a0f64fc80a8 SHA512 d70f6baba1a465a752c515e33dfdee2a5cc75400fadfb8ea0bd1e82d50089abdf02d7726c697850dc47de2054aa494bbdc08de2673c260b54e609f29dab259ad WHIRLPOOL 6a6d8b099fa814839bf5b3455b3889205c649ef522b35c3a501831d63d0e916d7747b83ac9b8991f8f8c34b328478d84cf7a12a32161ce0fec37204f9c019e2d |
34 |
DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 SHA256 3567feeb8f0c66161efaea1922bbfe4e71f6051533ef5f54a74b6ccf9e0359b6 SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1 WHIRLPOOL ab77023ac66def132d1dce72f98add3108fd7be303ef5b167a2374df3a94949c75f089dcfdd84ed05a5eb813d6c22cfecd0de03b5819817a20b04f30030f5f6d |
35 |
DIST python-gentoo-patches-3.4.5-0.tar.xz 12044 SHA256 84ee7630670a1dac4bbbc55fabf5f99b5b29007de4f140ad956e93d2e7aba8fa SHA512 108a4845667ecdf4001fcbeffab0cfbbac87439a449a7351428b0f3e2f159e3848ee0c0dfa45c9fba893b9f9584b33722fc8bb0bd7485a1d0909c3a35ede6ed8 WHIRLPOOL f0248faa0b4ce5679e37381bba90f8a4d361a49db792787bffc06a54a4bc82fea4d53255120f10e6dbf51b99e12417fc1b469be9624e73508fa3a212a38e7352 |
36 |
DIST python-gentoo-patches-3.4.6-0.tar.xz 11728 SHA256 93e7c8487deefc36c612403fb6c82e495c46846a1952f9ed85f82af41840be4a SHA512 41c22dc8f1db8800fc0b97eed2b27bf1873e5de1369bd4aecf7a7a91e609a78e45a4b56fc89d575317f33a7704c0c1cad1494e8a993415a198f256e8338f49ab WHIRLPOOL 851945e7ccea985a88bcbd71bc404bc34c27a0e335386e9ed15fa9876aab3285ff559936fb2dcadf7ac0594a7cb03ac3a9e4135b67b350c5fdf33e9a44ca0654 |
37 |
-DIST python-gentoo-patches-3.5.3-0.tar.xz 11740 SHA256 34e83921697c31a5470afc09b8601b4f54466ac75b3b8ed3ed71af218af10d1c SHA512 16357e49573ea6abe6f106327c0f733312653c68726c4c3f0d1ec21df6d22bc69e512a28131b3a81eb2261e32376811a839b16604e72c7fb5abb7a692840228d WHIRLPOOL 99d3eb0a132f674b998e467a5d89e73d26cf547613034938ad255ccad9d34852b6b18a3da39659c8164b196788bdc90bf2e8ebc5c8c0c4f6fb6fc45fcdd406f5 |
38 |
DIST python-gentoo-patches-3.5.4-0.tar.xz 11704 SHA256 30c9dbcd5c11ed025b9d8dd201da84c5b9f9756f9b6ba77ccaebc6b79a91e320 SHA512 d395a87695f700598026038d6929ea5038abd7d494294037a4dfa02d5262203dbbaa6ae258a5a7f35ff5542f6266dcf69cc0b9c3df2a047cd2f6699a87e182ec WHIRLPOOL 2191dc89805c1bc11d125005a5c5dd0e5fe635eb0a3d6698bef8b55f54741edc3b3e2588bb21f5eda517963489c15296cd5fd265c8a548d78be6093698e6b002 |
39 |
-DIST python-gentoo-patches-3.6.0-0.tar.xz 10680 SHA256 ecf78d292f2fef1116b41c3884f492d41ea716a14f0a21755ba2f8d76aefe1a7 SHA512 f340643cf338c693ce315fab705ba888040a2989b0887686d43886319419245c24bb46ebb71cea422644f1f3beaf64289b773e72db3377187bf11a83f9313a90 WHIRLPOOL 4a4d12ea0dbb03b5d2730db40b5aebe4c1c937cfe63341c775431dc06a3b60552b9390fdf9b7fff5e50024a93d11b269ef80a95afcf308327943f7003dd4c379 |
40 |
DIST python-gentoo-patches-3.6.2-0.tar.xz 10744 SHA256 56729f9848557c52361c71404e5583368f6a0e93b5b6c2e643b59cb079e253d9 SHA512 2aac1700c541202aa4f43bff4cb521b996d52ab350133318abaddb43f4b6e20548f37de472ace8024ef325ebf63fdfff0d43f8aa1f717d3c56f974b7aa1764e3 WHIRLPOOL 90d1f12bee812f350ca0330a97290ce0d5c5fa9ccd816441944f042ef561d9023f4b79239f6d559f38a486fea458e48bf11d33d5bd6fa605875b686a2a845bd1 |
41 |
|
42 |
diff --git a/dev-lang/python/python-2.7.13.ebuild b/dev-lang/python/python-2.7.13.ebuild |
43 |
deleted file mode 100644 |
44 |
index 18e0186ada1..00000000000 |
45 |
--- a/dev-lang/python/python-2.7.13.ebuild |
46 |
+++ /dev/null |
47 |
@@ -1,365 +0,0 @@ |
48 |
-# Copyright 1999-2017 Gentoo Foundation |
49 |
-# Distributed under the terms of the GNU General Public License v2 |
50 |
- |
51 |
-EAPI="5" |
52 |
-WANT_LIBTOOL="none" |
53 |
- |
54 |
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing |
55 |
- |
56 |
-MY_P="Python-${PV}" |
57 |
-PATCHSET_VERSION="2.7.13-0" |
58 |
- |
59 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
60 |
-HOMEPAGE="https://www.python.org/" |
61 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
62 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
63 |
- |
64 |
-LICENSE="PSF-2" |
65 |
-SLOT="2.7" |
66 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
67 |
-IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" |
68 |
- |
69 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
70 |
-# If you need to apply a patch which requires python for bootstrapping, please |
71 |
-# run the bootstrap code on your dev box and include the results in the |
72 |
-# patchset. See bug 447752. |
73 |
- |
74 |
-RDEPEND="app-arch/bzip2:0= |
75 |
- >=sys-libs/zlib-1.1.3:0= |
76 |
- virtual/libffi |
77 |
- virtual/libintl |
78 |
- berkdb? ( || ( |
79 |
- sys-libs/db:5.3 |
80 |
- sys-libs/db:5.2 |
81 |
- sys-libs/db:5.1 |
82 |
- sys-libs/db:5.0 |
83 |
- sys-libs/db:4.8 |
84 |
- sys-libs/db:4.7 |
85 |
- sys-libs/db:4.6 |
86 |
- sys-libs/db:4.5 |
87 |
- sys-libs/db:4.4 |
88 |
- sys-libs/db:4.3 |
89 |
- sys-libs/db:4.2 |
90 |
- ) ) |
91 |
- gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
92 |
- ncurses? ( |
93 |
- >=sys-libs/ncurses-5.2:0= |
94 |
- readline? ( >=sys-libs/readline-4.1:0= ) |
95 |
- ) |
96 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
97 |
- ssl? ( |
98 |
- !libressl? ( dev-libs/openssl:0= ) |
99 |
- libressl? ( dev-libs/libressl:= ) |
100 |
- ) |
101 |
- tk? ( |
102 |
- >=dev-lang/tcl-8.0:0= |
103 |
- >=dev-lang/tk-8.0:0= |
104 |
- dev-tcltk/blt:0= |
105 |
- dev-tcltk/tix |
106 |
- ) |
107 |
- xml? ( >=dev-libs/expat-2.1 ) |
108 |
- !!<sys-apps/portage-2.1.9" |
109 |
-DEPEND="${RDEPEND} |
110 |
- virtual/pkgconfig |
111 |
- >=sys-devel/autoconf-2.65 |
112 |
- !sys-devel/gcc[libffi(-)]" |
113 |
-RDEPEND+=" !build? ( app-misc/mime-types ) |
114 |
- doc? ( dev-python/python-docs:${SLOT} )" |
115 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
116 |
- |
117 |
-S="${WORKDIR}/${MY_P}" |
118 |
- |
119 |
-pkg_setup() { |
120 |
- if use berkdb; then |
121 |
- ewarn "'bsddb' module is out-of-date and no longer maintained inside" |
122 |
- ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" |
123 |
- ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" |
124 |
- ewarn "is provided by dev-python/bsddb3." |
125 |
- else |
126 |
- if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then |
127 |
- ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" |
128 |
- ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." |
129 |
- ewarn "You might need to migrate your databases." |
130 |
- fi |
131 |
- fi |
132 |
-} |
133 |
- |
134 |
-src_prepare() { |
135 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
136 |
- rm -r Modules/expat || die |
137 |
- rm -r Modules/_ctypes/libffi* || die |
138 |
- rm -r Modules/zlib || die |
139 |
- |
140 |
- if tc-is-cross-compiler; then |
141 |
- local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" |
142 |
- fi |
143 |
- |
144 |
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
145 |
- |
146 |
- # Fix for cross-compiling. |
147 |
- epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch" |
148 |
- epatch "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch" |
149 |
- epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch" |
150 |
- epatch "${FILESDIR}/python-2.7.10-system-libffi.patch" |
151 |
- |
152 |
- epatch_user |
153 |
- |
154 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
155 |
- Lib/distutils/command/install.py \ |
156 |
- Lib/distutils/sysconfig.py \ |
157 |
- Lib/site.py \ |
158 |
- Lib/sysconfig.py \ |
159 |
- Lib/test/test_site.py \ |
160 |
- Makefile.pre.in \ |
161 |
- Modules/Setup.dist \ |
162 |
- Modules/getpath.c \ |
163 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
164 |
- |
165 |
- eautoreconf |
166 |
-} |
167 |
- |
168 |
-src_configure() { |
169 |
- # dbm module can be linked against berkdb or gdbm. |
170 |
- # Defaults to gdbm when both are enabled, #204343. |
171 |
- local disable |
172 |
- use berkdb || use gdbm || disable+=" dbm" |
173 |
- use berkdb || disable+=" _bsddb" |
174 |
- use gdbm || disable+=" gdbm" |
175 |
- use ncurses || disable+=" _curses _curses_panel" |
176 |
- use readline || disable+=" readline" |
177 |
- use sqlite || disable+=" _sqlite3" |
178 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
179 |
- use tk || disable+=" _tkinter" |
180 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
181 |
- export PYTHON_DISABLE_MODULES="${disable}" |
182 |
- |
183 |
- if ! use xml; then |
184 |
- ewarn "You have configured Python without XML support." |
185 |
- ewarn "This is NOT a recommended configuration as you" |
186 |
- ewarn "may face problems parsing any XML documents." |
187 |
- fi |
188 |
- |
189 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
190 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
191 |
- fi |
192 |
- |
193 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
194 |
- append-flags -fwrapv |
195 |
- fi |
196 |
- |
197 |
- filter-flags -malign-double |
198 |
- |
199 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
200 |
- if is-flagq -O3; then |
201 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
202 |
- use hardened && replace-flags -O3 -O2 |
203 |
- fi |
204 |
- |
205 |
- if tc-is-cross-compiler; then |
206 |
- # Force some tests that try to poke fs paths. |
207 |
- export ac_cv_file__dev_ptc=no |
208 |
- export ac_cv_file__dev_ptmx=yes |
209 |
- fi |
210 |
- |
211 |
- # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. |
212 |
- tc-export CXX |
213 |
- # The configure script fails to use pkg-config correctly. |
214 |
- # http://bugs.python.org/issue15506 |
215 |
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
216 |
- |
217 |
- # Set LDFLAGS so we link modules with -lpython2.7 correctly. |
218 |
- # Needed on FreeBSD unless Python 2.7 is already installed. |
219 |
- # Please query BSD team before removing this! |
220 |
- append-ldflags "-L." |
221 |
- |
222 |
- local dbmliborder |
223 |
- if use gdbm; then |
224 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
225 |
- fi |
226 |
- if use berkdb; then |
227 |
- dbmliborder+="${dbmliborder:+:}bdb" |
228 |
- fi |
229 |
- |
230 |
- BUILD_DIR="${WORKDIR}/${CHOST}" |
231 |
- mkdir -p "${BUILD_DIR}" || die |
232 |
- cd "${BUILD_DIR}" || die |
233 |
- |
234 |
- ECONF_SOURCE="${S}" OPT="" \ |
235 |
- econf \ |
236 |
- --with-fpectl \ |
237 |
- --enable-shared \ |
238 |
- $(use_enable ipv6) \ |
239 |
- $(use_with threads) \ |
240 |
- $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ |
241 |
- --infodir='${prefix}/share/info' \ |
242 |
- --mandir='${prefix}/share/man' \ |
243 |
- --with-computed-gotos \ |
244 |
- --with-dbmliborder="${dbmliborder}" \ |
245 |
- --with-libc="" \ |
246 |
- --enable-loadable-sqlite-extensions \ |
247 |
- --with-system-expat \ |
248 |
- --with-system-ffi \ |
249 |
- --without-ensurepip |
250 |
- |
251 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
252 |
- eerror "configure has detected that the sem_open function is broken." |
253 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
254 |
- die "Broken sem_open function (bug 496328)" |
255 |
- fi |
256 |
-} |
257 |
- |
258 |
-src_compile() { |
259 |
- # Avoid invoking pgen for cross-compiles. |
260 |
- touch Include/graminit.h Python/graminit.c |
261 |
- |
262 |
- cd "${BUILD_DIR}" || die |
263 |
- emake |
264 |
- |
265 |
- # Work around bug 329499. See also bug 413751 and 457194. |
266 |
- if has_version dev-libs/libffi[pax_kernel]; then |
267 |
- pax-mark E python |
268 |
- else |
269 |
- pax-mark m python |
270 |
- fi |
271 |
-} |
272 |
- |
273 |
-src_test() { |
274 |
- # Tests will not work when cross compiling. |
275 |
- if tc-is-cross-compiler; then |
276 |
- elog "Disabling tests due to crosscompiling." |
277 |
- return |
278 |
- fi |
279 |
- |
280 |
- cd "${BUILD_DIR}" || die |
281 |
- |
282 |
- # Skip failing tests. |
283 |
- local skipped_tests="distutils gdb" |
284 |
- |
285 |
- for test in ${skipped_tests}; do |
286 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
287 |
- done |
288 |
- |
289 |
- # Daylight saving time problem |
290 |
- # https://bugs.python.org/issue22067 |
291 |
- # https://bugs.gentoo.org/610628 |
292 |
- local -x TZ=UTC |
293 |
- |
294 |
- # Rerun failed tests in verbose mode (regrtest -w). |
295 |
- emake test EXTRATESTOPTS="-w" < /dev/tty |
296 |
- local result="$?" |
297 |
- |
298 |
- for test in ${skipped_tests}; do |
299 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
300 |
- done |
301 |
- |
302 |
- elog "The following tests have been skipped:" |
303 |
- for test in ${skipped_tests}; do |
304 |
- elog "test_${test}.py" |
305 |
- done |
306 |
- |
307 |
- elog "If you would like to run them, you may:" |
308 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" |
309 |
- elog "and run the tests separately." |
310 |
- |
311 |
- if [[ "${result}" -ne 0 ]]; then |
312 |
- die "emake test failed" |
313 |
- fi |
314 |
-} |
315 |
- |
316 |
-src_install() { |
317 |
- local libdir=${ED}/usr/$(get_libdir)/python${SLOT} |
318 |
- |
319 |
- cd "${BUILD_DIR}" || die |
320 |
- emake DESTDIR="${D}" altinstall |
321 |
- |
322 |
- sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" |
323 |
- |
324 |
- # Fix collisions between different slots of Python. |
325 |
- mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" |
326 |
- mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" |
327 |
- mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" |
328 |
- rm -f "${ED}usr/bin/smtpd.py" |
329 |
- |
330 |
- use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die |
331 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
332 |
- use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die |
333 |
- use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} |
334 |
- |
335 |
- use threads || rm -r "${libdir}/multiprocessing" || die |
336 |
- use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die |
337 |
- |
338 |
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
339 |
- |
340 |
- if use examples; then |
341 |
- insinto /usr/share/doc/${PF}/examples |
342 |
- doins -r "${S}"/Tools |
343 |
- fi |
344 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
345 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
346 |
- emake --no-print-directory -s -f - 2>/dev/null) |
347 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
348 |
- |
349 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} |
350 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} |
351 |
- sed \ |
352 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ |
353 |
- -e "s:@PYDOC@:pydoc${SLOT}:" \ |
354 |
- -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" |
355 |
- |
356 |
- # for python-exec |
357 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
358 |
- |
359 |
- # if not using a cross-compiler, use the fresh binary |
360 |
- if ! tc-is-cross-compiler; then |
361 |
- local -x PYTHON=./python |
362 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. |
363 |
- else |
364 |
- vars=( PYTHON "${vars[@]}" ) |
365 |
- fi |
366 |
- |
367 |
- python_export "python${SLOT}" "${vars[@]}" |
368 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
369 |
- python_domodule epython.py |
370 |
- |
371 |
- # python-exec wrapping support |
372 |
- local pymajor=${SLOT%.*} |
373 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
374 |
- # python and pythonX |
375 |
- ln -s "../../../bin/python${SLOT}" \ |
376 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
377 |
- ln -s "python${pymajor}" \ |
378 |
- "${D}${PYTHON_SCRIPTDIR}/python" || die |
379 |
- # python-config and pythonX-config |
380 |
- ln -s "../../../bin/python${SLOT}-config" \ |
381 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
382 |
- ln -s "python${pymajor}-config" \ |
383 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
384 |
- # 2to3, pydoc, pyvenv |
385 |
- ln -s "../../../bin/2to3-${SLOT}" \ |
386 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
387 |
- ln -s "../../../bin/pydoc${SLOT}" \ |
388 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
389 |
- # idle |
390 |
- if use tk; then |
391 |
- ln -s "../../../bin/idle${SLOT}" \ |
392 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
393 |
- fi |
394 |
-} |
395 |
- |
396 |
-eselect_python_update() { |
397 |
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
398 |
- eselect python update |
399 |
- fi |
400 |
- |
401 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
402 |
- eselect python update --python${PV%%.*} |
403 |
- fi |
404 |
-} |
405 |
- |
406 |
-pkg_postinst() { |
407 |
- eselect_python_update |
408 |
-} |
409 |
- |
410 |
-pkg_postrm() { |
411 |
- eselect_python_update |
412 |
-} |
413 |
|
414 |
diff --git a/dev-lang/python/python-3.5.3.ebuild b/dev-lang/python/python-3.5.3.ebuild |
415 |
deleted file mode 100644 |
416 |
index 8d1cd282011..00000000000 |
417 |
--- a/dev-lang/python/python-3.5.3.ebuild |
418 |
+++ /dev/null |
419 |
@@ -1,362 +0,0 @@ |
420 |
-# Copyright 1999-2017 Gentoo Foundation |
421 |
-# Distributed under the terms of the GNU General Public License v2 |
422 |
- |
423 |
-EAPI="5" |
424 |
-WANT_LIBTOOL="none" |
425 |
- |
426 |
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs |
427 |
- |
428 |
-MY_P="Python-${PV/_/}" |
429 |
-PATCHSET_VERSION="3.5.3-0" |
430 |
- |
431 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
432 |
-HOMEPAGE="https://www.python.org/" |
433 |
-SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz |
434 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
435 |
- |
436 |
-LICENSE="PSF-2" |
437 |
-SLOT="3.5/3.5m" |
438 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
439 |
-IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml" |
440 |
- |
441 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
442 |
-# If you need to apply a patch which requires python for bootstrapping, please |
443 |
-# run the bootstrap code on your dev box and include the results in the |
444 |
-# patchset. See bug 447752. |
445 |
- |
446 |
-RDEPEND="app-arch/bzip2:0= |
447 |
- app-arch/xz-utils:0= |
448 |
- >=sys-libs/zlib-1.1.3:0= |
449 |
- virtual/libffi |
450 |
- virtual/libintl |
451 |
- gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
452 |
- ncurses? ( |
453 |
- >=sys-libs/ncurses-5.2:0= |
454 |
- readline? ( >=sys-libs/readline-4.1:0= ) |
455 |
- ) |
456 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
457 |
- ssl? ( |
458 |
- !libressl? ( dev-libs/openssl:0= ) |
459 |
- libressl? ( dev-libs/libressl:= ) |
460 |
- ) |
461 |
- tk? ( |
462 |
- >=dev-lang/tcl-8.0:0= |
463 |
- >=dev-lang/tk-8.0:0= |
464 |
- dev-tcltk/blt:0= |
465 |
- dev-tcltk/tix |
466 |
- ) |
467 |
- xml? ( >=dev-libs/expat-2.1:0= ) |
468 |
- !!<sys-apps/sandbox-2.6-r1" |
469 |
-DEPEND="${RDEPEND} |
470 |
- virtual/pkgconfig |
471 |
- !sys-devel/gcc[libffi(-)]" |
472 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
473 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
474 |
- |
475 |
-S="${WORKDIR}/${MY_P}" |
476 |
- |
477 |
-PYVER=${SLOT%/*} |
478 |
- |
479 |
-src_prepare() { |
480 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
481 |
- rm -fr Modules/expat |
482 |
- rm -fr Modules/_ctypes/libffi* |
483 |
- rm -fr Modules/zlib |
484 |
- |
485 |
- if tc-is-cross-compiler; then |
486 |
- # Invokes BUILDPYTHON, which is built for the host arch |
487 |
- local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" |
488 |
- fi |
489 |
- |
490 |
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
491 |
- epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch" |
492 |
- epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch" |
493 |
- |
494 |
- epatch_user |
495 |
- |
496 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
497 |
- configure.ac \ |
498 |
- Lib/distutils/command/install.py \ |
499 |
- Lib/distutils/sysconfig.py \ |
500 |
- Lib/site.py \ |
501 |
- Lib/sysconfig.py \ |
502 |
- Lib/test/test_site.py \ |
503 |
- Makefile.pre.in \ |
504 |
- Modules/getpath.c \ |
505 |
- Modules/Setup.dist \ |
506 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
507 |
- |
508 |
- eautoreconf |
509 |
-} |
510 |
- |
511 |
-src_configure() { |
512 |
- local disable |
513 |
- use gdbm || disable+=" gdbm" |
514 |
- use ncurses || disable+=" _curses _curses_panel" |
515 |
- use readline || disable+=" readline" |
516 |
- use sqlite || disable+=" _sqlite3" |
517 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
518 |
- use tk || disable+=" _tkinter" |
519 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
520 |
- export PYTHON_DISABLE_MODULES="${disable}" |
521 |
- |
522 |
- if ! use xml; then |
523 |
- ewarn "You have configured Python without XML support." |
524 |
- ewarn "This is NOT a recommended configuration as you" |
525 |
- ewarn "may face problems parsing any XML documents." |
526 |
- fi |
527 |
- |
528 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
529 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
530 |
- fi |
531 |
- |
532 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
533 |
- append-flags -fwrapv |
534 |
- fi |
535 |
- |
536 |
- filter-flags -malign-double |
537 |
- |
538 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
539 |
- if is-flagq -O3; then |
540 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
541 |
- use hardened && replace-flags -O3 -O2 |
542 |
- fi |
543 |
- |
544 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
545 |
- tc-export CXX |
546 |
- |
547 |
- # The configure script fails to use pkg-config correctly. |
548 |
- # http://bugs.python.org/issue15506 |
549 |
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
550 |
- |
551 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
552 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
553 |
- # Please query BSD team before removing this! |
554 |
- append-ldflags "-L." |
555 |
- |
556 |
- local dbmliborder |
557 |
- if use gdbm; then |
558 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
559 |
- fi |
560 |
- |
561 |
- BUILD_DIR="${WORKDIR}/${CHOST}" |
562 |
- mkdir -p "${BUILD_DIR}" || die |
563 |
- cd "${BUILD_DIR}" || die |
564 |
- |
565 |
- local myeconfargs=( |
566 |
- --with-fpectl |
567 |
- --enable-shared |
568 |
- $(use_enable ipv6) |
569 |
- $(use_with threads) |
570 |
- --infodir='${prefix}/share/info' |
571 |
- --mandir='${prefix}/share/man' |
572 |
- --with-computed-gotos |
573 |
- --with-dbmliborder="${dbmliborder}" |
574 |
- --with-libc= |
575 |
- --enable-loadable-sqlite-extensions |
576 |
- --without-ensurepip |
577 |
- --with-system-expat |
578 |
- --with-system-ffi |
579 |
- ) |
580 |
- |
581 |
- ECONF_SOURCE="${S}" OPT="" econf "${myeconfargs[@]}" |
582 |
- |
583 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
584 |
- eerror "configure has detected that the sem_open function is broken." |
585 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
586 |
- die "Broken sem_open function (bug 496328)" |
587 |
- fi |
588 |
-} |
589 |
- |
590 |
-src_compile() { |
591 |
- # Ensure sed works as expected |
592 |
- # https://bugs.gentoo.org/594768 |
593 |
- local -x LC_ALL=C |
594 |
- |
595 |
- cd "${BUILD_DIR}" || die |
596 |
- |
597 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
598 |
- |
599 |
- # Work around bug 329499. See also bug 413751 and 457194. |
600 |
- if has_version dev-libs/libffi[pax_kernel]; then |
601 |
- pax-mark E python |
602 |
- else |
603 |
- pax-mark m python |
604 |
- fi |
605 |
-} |
606 |
- |
607 |
-src_test() { |
608 |
- # Tests will not work when cross compiling. |
609 |
- if tc-is-cross-compiler; then |
610 |
- elog "Disabling tests due to crosscompiling." |
611 |
- return |
612 |
- fi |
613 |
- |
614 |
- cd "${BUILD_DIR}" || die |
615 |
- |
616 |
- # Skip failing tests. |
617 |
- local skipped_tests="gdb" |
618 |
- |
619 |
- for test in ${skipped_tests}; do |
620 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
621 |
- done |
622 |
- |
623 |
- local -x PYTHONDONTWRITEBYTECODE= |
624 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
625 |
- local result=$? |
626 |
- |
627 |
- for test in ${skipped_tests}; do |
628 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
629 |
- done |
630 |
- |
631 |
- elog "The following tests have been skipped:" |
632 |
- for test in ${skipped_tests}; do |
633 |
- elog "test_${test}.py" |
634 |
- done |
635 |
- |
636 |
- elog "If you would like to run them, you may:" |
637 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" |
638 |
- elog "and run the tests separately." |
639 |
- |
640 |
- if [[ ${result} -ne 0 ]]; then |
641 |
- die "emake test failed" |
642 |
- fi |
643 |
-} |
644 |
- |
645 |
-src_install() { |
646 |
- local libdir=${ED}/usr/$(get_libdir)/python${PYVER} |
647 |
- |
648 |
- cd "${BUILD_DIR}" || die |
649 |
- |
650 |
- emake DESTDIR="${D}" altinstall |
651 |
- |
652 |
- sed \ |
653 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
654 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
655 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
656 |
- |
657 |
- # Fix collisions between different slots of Python. |
658 |
- rm -f "${ED}usr/$(get_libdir)/libpython3.so" |
659 |
- |
660 |
- # Cheap hack to get version with ABIFLAGS |
661 |
- local abiver=$(cd "${ED}usr/include"; echo python*) |
662 |
- if [[ ${abiver} != python${PYVER} ]]; then |
663 |
- # Replace python3.X with a symlink to python3.Xm |
664 |
- rm "${ED}usr/bin/python${PYVER}" || die |
665 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
666 |
- # Create python3.X-config symlink |
667 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
668 |
- # Create python-3.5m.pc symlink |
669 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
670 |
- fi |
671 |
- |
672 |
- # python seems to get rebuilt in src_install (bug 569908) |
673 |
- # Work around it for now. |
674 |
- if has_version dev-libs/libffi[pax_kernel]; then |
675 |
- pax-mark E "${ED}usr/bin/${abiver}" |
676 |
- else |
677 |
- pax-mark m "${ED}usr/bin/${abiver}" |
678 |
- fi |
679 |
- |
680 |
- use elibc_uclibc && rm -fr "${libdir}/test" |
681 |
- use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} |
682 |
- use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} |
683 |
- |
684 |
- use threads || rm -fr "${libdir}/multiprocessing" |
685 |
- use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe |
686 |
- |
687 |
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
688 |
- |
689 |
- if use examples; then |
690 |
- insinto /usr/share/doc/${PF}/examples |
691 |
- find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr |
692 |
- doins -r "${S}"/Tools |
693 |
- fi |
694 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
695 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
696 |
- emake --no-print-directory -s -f - 2>/dev/null) |
697 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
698 |
- |
699 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
700 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
701 |
- sed \ |
702 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
703 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
704 |
- -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed" |
705 |
- |
706 |
- # for python-exec |
707 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
708 |
- |
709 |
- # if not using a cross-compiler, use the fresh binary |
710 |
- if ! tc-is-cross-compiler; then |
711 |
- local -x PYTHON=./python |
712 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. |
713 |
- else |
714 |
- vars=( PYTHON "${vars[@]}" ) |
715 |
- fi |
716 |
- |
717 |
- python_export "python${PYVER}" "${vars[@]}" |
718 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
719 |
- python_domodule epython.py |
720 |
- |
721 |
- # python-exec wrapping support |
722 |
- local pymajor=${PYVER%.*} |
723 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
724 |
- # python and pythonX |
725 |
- ln -s "../../../bin/${abiver}" \ |
726 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
727 |
- ln -s "python${pymajor}" \ |
728 |
- "${D}${PYTHON_SCRIPTDIR}/python" || die |
729 |
- # python-config and pythonX-config |
730 |
- # note: we need to create a wrapper rather than symlinking it due |
731 |
- # to some random dirname(argv[0]) magic performed by python-config |
732 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
733 |
- #!/bin/sh |
734 |
- exec "${abiver}-config" "\${@}" |
735 |
- EOF |
736 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
737 |
- ln -s "python${pymajor}-config" \ |
738 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
739 |
- # 2to3, pydoc, pyvenv |
740 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
741 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
742 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
743 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
744 |
- ln -s "../../../bin/pyvenv-${PYVER}" \ |
745 |
- "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die |
746 |
- # idle |
747 |
- if use tk; then |
748 |
- ln -s "../../../bin/idle${PYVER}" \ |
749 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
750 |
- fi |
751 |
-} |
752 |
- |
753 |
-pkg_preinst() { |
754 |
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
755 |
- python_updater_warning="1" |
756 |
- fi |
757 |
-} |
758 |
- |
759 |
-eselect_python_update() { |
760 |
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
761 |
- eselect python update |
762 |
- fi |
763 |
- |
764 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
765 |
- eselect python update --python${PV%%.*} |
766 |
- fi |
767 |
-} |
768 |
- |
769 |
-pkg_postinst() { |
770 |
- eselect_python_update |
771 |
- |
772 |
- if [[ "${python_updater_warning}" == "1" ]]; then |
773 |
- ewarn "You have just upgraded from an older version of Python." |
774 |
- ewarn |
775 |
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
776 |
- fi |
777 |
-} |
778 |
- |
779 |
-pkg_postrm() { |
780 |
- eselect_python_update |
781 |
-} |
782 |
|
783 |
diff --git a/dev-lang/python/python-3.6.1-r1.ebuild b/dev-lang/python/python-3.6.1-r1.ebuild |
784 |
deleted file mode 100644 |
785 |
index ef6e62034cd..00000000000 |
786 |
--- a/dev-lang/python/python-3.6.1-r1.ebuild |
787 |
+++ /dev/null |
788 |
@@ -1,343 +0,0 @@ |
789 |
-# Copyright 1999-2017 Gentoo Foundation |
790 |
-# Distributed under the terms of the GNU General Public License v2 |
791 |
- |
792 |
-EAPI="5" |
793 |
-WANT_LIBTOOL="none" |
794 |
- |
795 |
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs |
796 |
- |
797 |
-MY_P="Python-${PV}" |
798 |
-PATCHSET_VERSION="3.6.0-0" |
799 |
- |
800 |
-DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
801 |
-HOMEPAGE="https://www.python.org/" |
802 |
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
803 |
- https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
804 |
- |
805 |
-LICENSE="PSF-2" |
806 |
-SLOT="3.6/3.6m" |
807 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
808 |
-IUSE="build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml" |
809 |
- |
810 |
-# Do not add a dependency on dev-lang/python to this ebuild. |
811 |
-# If you need to apply a patch which requires python for bootstrapping, please |
812 |
-# run the bootstrap code on your dev box and include the results in the |
813 |
-# patchset. See bug 447752. |
814 |
- |
815 |
-RDEPEND="app-arch/bzip2:0= |
816 |
- app-arch/xz-utils:0= |
817 |
- >=sys-libs/zlib-1.1.3:0= |
818 |
- virtual/libffi |
819 |
- virtual/libintl |
820 |
- gdbm? ( sys-libs/gdbm:0=[berkdb] ) |
821 |
- ncurses? ( |
822 |
- >=sys-libs/ncurses-5.2:0= |
823 |
- readline? ( >=sys-libs/readline-4.1:0= ) |
824 |
- ) |
825 |
- sqlite? ( >=dev-db/sqlite-3.3.8:3= ) |
826 |
- ssl? ( |
827 |
- !libressl? ( dev-libs/openssl:0= ) |
828 |
- libressl? ( dev-libs/libressl:= ) |
829 |
- ) |
830 |
- tk? ( |
831 |
- >=dev-lang/tcl-8.0:0= |
832 |
- >=dev-lang/tk-8.0:0= |
833 |
- dev-tcltk/blt:0= |
834 |
- dev-tcltk/tix |
835 |
- ) |
836 |
- xml? ( >=dev-libs/expat-2.1:0= ) |
837 |
- !!<sys-apps/sandbox-2.6-r1" |
838 |
-DEPEND="${RDEPEND} |
839 |
- virtual/pkgconfig |
840 |
- !sys-devel/gcc[libffi(-)]" |
841 |
-RDEPEND+=" !build? ( app-misc/mime-types )" |
842 |
-PDEPEND=">=app-eselect/eselect-python-20140125-r1" |
843 |
- |
844 |
-S="${WORKDIR}/${MY_P}" |
845 |
-PYVER=${SLOT%/*} |
846 |
- |
847 |
-src_prepare() { |
848 |
- # Ensure that internal copies of expat, libffi and zlib are not used. |
849 |
- rm -fr Modules/expat |
850 |
- rm -fr Modules/_ctypes/libffi* |
851 |
- rm -fr Modules/zlib |
852 |
- |
853 |
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
854 |
- epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch" |
855 |
- epatch "${FILESDIR}/3.6.1-test_socket-AEAD.patch" |
856 |
- epatch "${FILESDIR}/3.6-blake2.patch" |
857 |
- |
858 |
- epatch_user |
859 |
- |
860 |
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
861 |
- Lib/distutils/command/install.py \ |
862 |
- Lib/distutils/sysconfig.py \ |
863 |
- Lib/site.py \ |
864 |
- Lib/sysconfig.py \ |
865 |
- Lib/test/test_site.py \ |
866 |
- Makefile.pre.in \ |
867 |
- Modules/Setup.dist \ |
868 |
- Modules/getpath.c \ |
869 |
- configure.ac \ |
870 |
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
871 |
- |
872 |
- eautoreconf |
873 |
-} |
874 |
- |
875 |
-src_configure() { |
876 |
- local disable |
877 |
- use gdbm || disable+=" gdbm" |
878 |
- use ncurses || disable+=" _curses _curses_panel" |
879 |
- use readline || disable+=" readline" |
880 |
- use sqlite || disable+=" _sqlite3" |
881 |
- use ssl || export PYTHON_DISABLE_SSL="1" |
882 |
- use tk || disable+=" _tkinter" |
883 |
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
884 |
- export PYTHON_DISABLE_MODULES="${disable}" |
885 |
- |
886 |
- if ! use xml; then |
887 |
- ewarn "You have configured Python without XML support." |
888 |
- ewarn "This is NOT a recommended configuration as you" |
889 |
- ewarn "may face problems parsing any XML documents." |
890 |
- fi |
891 |
- |
892 |
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
893 |
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
894 |
- fi |
895 |
- |
896 |
- if [[ "$(gcc-major-version)" -ge 4 ]]; then |
897 |
- append-flags -fwrapv |
898 |
- fi |
899 |
- |
900 |
- filter-flags -malign-double |
901 |
- |
902 |
- # https://bugs.gentoo.org/show_bug.cgi?id=50309 |
903 |
- if is-flagq -O3; then |
904 |
- is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
905 |
- use hardened && replace-flags -O3 -O2 |
906 |
- fi |
907 |
- |
908 |
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
909 |
- tc-export CXX |
910 |
- |
911 |
- # Set LDFLAGS so we link modules with -lpython3.2 correctly. |
912 |
- # Needed on FreeBSD unless Python 3.2 is already installed. |
913 |
- # Please query BSD team before removing this! |
914 |
- append-ldflags "-L." |
915 |
- |
916 |
- local dbmliborder |
917 |
- if use gdbm; then |
918 |
- dbmliborder+="${dbmliborder:+:}gdbm" |
919 |
- fi |
920 |
- |
921 |
- local myeconfargs=( |
922 |
- --with-fpectl |
923 |
- --enable-shared |
924 |
- $(use_enable ipv6) |
925 |
- $(use_with threads) |
926 |
- --infodir='${prefix}/share/info' |
927 |
- --mandir='${prefix}/share/man' |
928 |
- --with-computed-gotos |
929 |
- --with-dbmliborder="${dbmliborder}" |
930 |
- --with-libc= |
931 |
- --enable-loadable-sqlite-extensions |
932 |
- --without-ensurepip |
933 |
- --with-system-expat |
934 |
- --with-system-ffi |
935 |
- ) |
936 |
- |
937 |
- OPT="" econf "${myeconfargs[@]}" |
938 |
- |
939 |
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
940 |
- eerror "configure has detected that the sem_open function is broken." |
941 |
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
942 |
- die "Broken sem_open function (bug 496328)" |
943 |
- fi |
944 |
-} |
945 |
- |
946 |
-src_compile() { |
947 |
- # Ensure sed works as expected |
948 |
- # https://bugs.gentoo.org/594768 |
949 |
- local -x LC_ALL=C |
950 |
- |
951 |
- emake CPPFLAGS= CFLAGS= LDFLAGS= |
952 |
- |
953 |
- # Work around bug 329499. See also bug 413751 and 457194. |
954 |
- if has_version dev-libs/libffi[pax_kernel]; then |
955 |
- pax-mark E python |
956 |
- else |
957 |
- pax-mark m python |
958 |
- fi |
959 |
-} |
960 |
- |
961 |
-src_test() { |
962 |
- # Tests will not work when cross compiling. |
963 |
- if tc-is-cross-compiler; then |
964 |
- elog "Disabling tests due to crosscompiling." |
965 |
- return |
966 |
- fi |
967 |
- |
968 |
- # Skip failing tests. |
969 |
- local skipped_tests="gdb" |
970 |
- |
971 |
- for test in ${skipped_tests}; do |
972 |
- mv "${S}"/Lib/test/test_${test}.py "${T}" |
973 |
- done |
974 |
- |
975 |
- local -x PYTHONDONTWRITEBYTECODE= |
976 |
- |
977 |
- emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
978 |
- local result=$? |
979 |
- |
980 |
- for test in ${skipped_tests}; do |
981 |
- mv "${T}/test_${test}.py" "${S}"/Lib/test |
982 |
- done |
983 |
- |
984 |
- elog "The following tests have been skipped:" |
985 |
- for test in ${skipped_tests}; do |
986 |
- elog "test_${test}.py" |
987 |
- done |
988 |
- |
989 |
- elog "If you would like to run them, you may:" |
990 |
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" |
991 |
- elog "and run the tests separately." |
992 |
- |
993 |
- if [[ ${result} -ne 0 ]]; then |
994 |
- die "emake test failed" |
995 |
- fi |
996 |
-} |
997 |
- |
998 |
-src_install() { |
999 |
- local libdir=${ED}/usr/$(get_libdir)/python${PYVER} |
1000 |
- |
1001 |
- emake DESTDIR="${D}" altinstall |
1002 |
- |
1003 |
- sed \ |
1004 |
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
1005 |
- -e "s/\(PY_LDFLAGS=\).*/\1/" \ |
1006 |
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" |
1007 |
- |
1008 |
- # Fix collisions between different slots of Python. |
1009 |
- rm -f "${ED}usr/$(get_libdir)/libpython3.so" |
1010 |
- |
1011 |
- # Cheap hack to get version with ABIFLAGS |
1012 |
- local abiver=$(cd "${ED}usr/include"; echo python*) |
1013 |
- if [[ ${abiver} != python${PYVER} ]]; then |
1014 |
- # Replace python3.X with a symlink to python3.Xm |
1015 |
- rm "${ED}usr/bin/python${PYVER}" || die |
1016 |
- dosym "${abiver}" "/usr/bin/python${PYVER}" |
1017 |
- # Create python3.X-config symlink |
1018 |
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" |
1019 |
- # Create python-3.5m.pc symlink |
1020 |
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" |
1021 |
- fi |
1022 |
- |
1023 |
- # python seems to get rebuilt in src_install (bug 569908) |
1024 |
- # Work around it for now. |
1025 |
- if has_version dev-libs/libffi[pax_kernel]; then |
1026 |
- pax-mark E "${ED}usr/bin/${abiver}" |
1027 |
- else |
1028 |
- pax-mark m "${ED}usr/bin/${abiver}" |
1029 |
- fi |
1030 |
- |
1031 |
- use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
1032 |
- use tk || rm -r "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die |
1033 |
- |
1034 |
- use threads || rm -r "${libdir}/multiprocessing" || die |
1035 |
- use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die |
1036 |
- |
1037 |
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
1038 |
- |
1039 |
- if use examples; then |
1040 |
- insinto /usr/share/doc/${PF}/examples |
1041 |
- find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr |
1042 |
- doins -r "${S}"/Tools |
1043 |
- fi |
1044 |
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
1045 |
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
1046 |
- emake --no-print-directory -s -f - 2>/dev/null) |
1047 |
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
1048 |
- |
1049 |
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} |
1050 |
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} |
1051 |
- sed \ |
1052 |
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ |
1053 |
- -e "s:@PYDOC@:pydoc${PYVER}:" \ |
1054 |
- -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed" |
1055 |
- |
1056 |
- # for python-exec |
1057 |
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) |
1058 |
- |
1059 |
- # if not using a cross-compiler, use the fresh binary |
1060 |
- if ! tc-is-cross-compiler; then |
1061 |
- local -x PYTHON=./python |
1062 |
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. |
1063 |
- else |
1064 |
- vars=( PYTHON "${vars[@]}" ) |
1065 |
- fi |
1066 |
- |
1067 |
- python_export "python${PYVER}" "${vars[@]}" |
1068 |
- echo "EPYTHON='${EPYTHON}'" > epython.py || die |
1069 |
- python_domodule epython.py |
1070 |
- |
1071 |
- # python-exec wrapping support |
1072 |
- local pymajor=${PYVER%.*} |
1073 |
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die |
1074 |
- # python and pythonX |
1075 |
- ln -s "../../../bin/${abiver}" \ |
1076 |
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die |
1077 |
- ln -s "python${pymajor}" \ |
1078 |
- "${D}${PYTHON_SCRIPTDIR}/python" || die |
1079 |
- # python-config and pythonX-config |
1080 |
- # note: we need to create a wrapper rather than symlinking it due |
1081 |
- # to some random dirname(argv[0]) magic performed by python-config |
1082 |
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die |
1083 |
- #!/bin/sh |
1084 |
- exec "${abiver}-config" "\${@}" |
1085 |
- EOF |
1086 |
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die |
1087 |
- ln -s "python${pymajor}-config" \ |
1088 |
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die |
1089 |
- # 2to3, pydoc, pyvenv |
1090 |
- ln -s "../../../bin/2to3-${PYVER}" \ |
1091 |
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die |
1092 |
- ln -s "../../../bin/pydoc${PYVER}" \ |
1093 |
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die |
1094 |
- ln -s "../../../bin/pyvenv-${PYVER}" \ |
1095 |
- "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die |
1096 |
- # idle |
1097 |
- if use tk; then |
1098 |
- ln -s "../../../bin/idle${PYVER}" \ |
1099 |
- "${D}${PYTHON_SCRIPTDIR}/idle" || die |
1100 |
- fi |
1101 |
-} |
1102 |
- |
1103 |
-pkg_preinst() { |
1104 |
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then |
1105 |
- python_updater_warning="1" |
1106 |
- fi |
1107 |
-} |
1108 |
- |
1109 |
-eselect_python_update() { |
1110 |
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
1111 |
- eselect python update |
1112 |
- fi |
1113 |
- |
1114 |
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
1115 |
- eselect python update --python${PV%%.*} |
1116 |
- fi |
1117 |
-} |
1118 |
- |
1119 |
-pkg_postinst() { |
1120 |
- eselect_python_update |
1121 |
- |
1122 |
- if [[ "${python_updater_warning}" == "1" ]]; then |
1123 |
- ewarn "You have just upgraded from an older version of Python." |
1124 |
- ewarn |
1125 |
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
1126 |
- fi |
1127 |
-} |
1128 |
- |
1129 |
-pkg_postrm() { |
1130 |
- eselect_python_update |
1131 |
-} |