File python.spec of Package python (Revision 3bda1ccaa1dd671047c148f3d211138f)
Currently displaying revision 3bda1ccaa1dd671047c148f3d211138f , Show latest
635
1
#
2
# spec file for package python
3
#
4
# Copyright (c) 2023 SUSE LLC
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via https://bugs.opensuse.org/
16
#
17
18
Name: python
19
Version: 2.7.18
20
Release: 0
21
Summary: Python Interpreter
22
License: Python-2.0
23
Group: Development/Languages/Python
24
URL: https://www.python.org/
25
%define tarversion %{version}
26
%define tarname Python-%{tarversion}
27
Source0: https://www.python.org/ftp/python/%{version}/%{tarname}.tar.xz
28
Source1: README.SUSE
29
Source8: sle_tls_checks_policy.py
30
#Source11: testfiles.tar.bz2
31
Source50: idle.appdata.xml
32
Source51: idle.desktop
33
# issues with copyrighted Unicode testing files
34
# For Patch 66
35
Source66: recursion.tar
36
37
# !!!!!!!!!!!!!!
38
# do not add or edit patches here. please edit python-base.spec
39
# instead and run pre_checkin.sh
40
# !!!!!!!!!!!!!!
41
# COMMON-PATCH-BEGIN
42
Patch1: python-2.7-dirs.patch
43
Patch2: python-distutils-rpm-8.patch
44
Patch3: python-2.7.5-multilib.patch
45
Patch4: python-2.5.1-sqlite.patch
46
Patch5: python-2.7.4-canonicalize2.patch
47
Patch7: python-2.6-gettext-plurals.patch
48
Patch8: python-2.6b3-curses-panel.patch
49
Patch10: sparc_longdouble.patch
50
Patch13: python-2.7.2-fix_date_time_compiler.patch
51
Patch17: remove-static-libpython.patch
52
# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar@opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle.
53
Patch20: python-bundle-lang.patch
54
# PATCH-FIX-UPSTREAM Fix argument passing in libffi for aarch64
55
Patch22: python-2.7-libffi-aarch64.patch
56
Patch24: python-bsddb6.patch
57
# PATCH-FIX-UPSTREAM accept directory-based CA paths as well
58
Patch33: python-2.7.9-ssl_ca_path.patch
59
# PATCH-FEATURE-SLE disable SSL verification-by-default in http clients
60
Patch34: python-2.7.9-sles-disable-verification-by-default.patch
61
# PATCH-FIX-UPSTREAM do not use non-ASCII filename in test_ssl.py
62
Patch35: do-not-use-non-ascii-in-test_ssl.patch
63
# PATCH-FIX-UPSTREAM bmwiedemann@suse.de -- allow python packages to build reproducibly
64
Patch38: reproducible.patch
65
# bypass boo#1078485 random failing tests
66
Patch40: python-skip_random_failing_tests.patch
67
# PATCH-FIX-UPSTREAM sorted tar https://github.com/python/cpython/pull/2263
68
Patch41: python-sorted_tar.patch
69
# https://github.com/python/cpython/pull/9624 (https://bugs.python.org/issue34834)
70
Patch47: openssl-111-middlebox-compat.patch
71
# PATCH-FIX-SUSE python default SSLContext doesn't contain OP_CIPHER_SERVER_PREFERENCE
72
Patch48: openssl-111-ssl_options.patch
73
# PATCH-FIX-UPSTREAM CVE-2019-5010-null-defer-x509-cert-DOS.patch bnc#1122191 mcepl@suse.com
74
# gh#python/cpython#11569
75
# Fix segfault in ssl's cert parser
76
Patch49: CVE-2019-5010-null-defer-x509-cert-DOS.patch
77
# PATCH-FIX-UPSTREAM bpo36160-init-sysconfig_vars.patch gh#python/cpython#12131 mcepl@suse.com
78
# Initialize sysconfig variables in test_site.
79
Patch50: bpo36160-init-sysconfig_vars.patch
80
# PATCH-FIX-UPSTREAM CVE-2017-18207.patch gh#python/cpython#4437 psimons@suse.com
81
# Add check for channels of wav file in Lib/wave.py
82
Patch51: CVE-2017-18207.patch
83
# PATCH-FIX-UPSTREAM gh#python/cpython#12341
84
Patch55: bpo36302-sort-module-sources.patch
85
# Fix installation in /usr/local (boo#1071941), adapted from Fedora
86
# https://src.fedoraproject.org/rpms/python3/blob/master/f/00251-change-user-install-location.patch
87
# Set values of prefix and exec_prefix in distutils install command
88
# to /usr/local if executable is /usr/bin/python* and RPM build
89
# is not detected to make pip and distutils install into separate location
90
Patch56: adapted-from-F00251-change-user-install-location.patch
91
# Switch couple of tests failing on acient SLE-12
92
Patch57: python-2.7.17-switch-off-failing-SSL-tests.patch
93
# PATCH-FIX-UPSTREAM CVE-2020-8492-urllib-ReDoS.patch bsc#1162367 mcepl@suse.com
94
# Fixes Python urrlib allowed an HTTP server to conduct Regular
95
# Expression Denial of Service (ReDoS)
96
Patch58: CVE-2020-8492-urllib-ReDoS.patch
97
# PATCH-FIX-UPSTREAM CVE-2019-9674-zip-bomb.patch bsc#1162825 mcepl@suse.com
98
# Improve documentation warning against the possible zip bombs
99
Patch59: CVE-2019-9674-zip-bomb.patch
100
# PATCH-FIX-UPSTREAM configure_PYTHON_FOR_REGEN.patch bsc#1078326 mcepl@suse.com
101
# PYTHON_FOR_REGEN value is set very weird upstream
102
Patch60: configure_PYTHON_FOR_REGEN.patch
103
# PATCH-FIX-SLE CVE-2021-3177-buf_ovrfl_PyCArg_repr.patch bsc#1181126 mcepl@suse.com
104
# buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution
105
Patch61: CVE-2021-3177-buf_ovrfl_PyCArg_repr.patch
106
# PATCH-FIX-UPSTREAM CVE-2021-23336-only-amp-as-query-sep.patch bsc#[0-9]+ mcepl@suse.com
107
# this patch makes things totally awesome
108
Patch62: CVE-2021-23336-only-amp-as-query-sep.patch
109
# PATCH-FIX-UPSTREAM CVE-2021-3737-fix-HTTP-client-infinite-line-reading-after-a-HTTP-100-Continue.patch boo#1189241 gh#python/cpython#25916
110
Patch63: CVE-2021-3737-fix-HTTP-client-infinite-line-reading-after-a-HTTP-100-Continue.patch
111
# PATCH-FIX-UPSTREAM CVE-2021-3733-fix-ReDoS-in-request.patch boo#1189287 gh#python/cpython#24391
112
Patch64: CVE-2021-3733-fix-ReDoS-in-request.patch
113
# PATCH-FIX-UPSTREAM sphinx-update-removed-function.patch bpo#35293 gh#python/cpython#22198 -- fix doc build
114
Patch65: sphinx-update-removed-function.patch
115
# PATCH-FIX-UPSTREAM CVE-2019-20907_tarfile-inf-loop.patch bsc#1174091 mcepl@suse.com
116
# avoid possible infinite loop in specifically crafted tarball (CVE-2019-20907)
117
# REQUIRES SOURCE 66
118
Patch66: CVE-2019-20907_tarfile-inf-loop.patch
119
# PATCH-FIX-UPSTREAM CVE-2020-26116-httplib-header-injection.patch bsc#1177211
120
# Fixes httplib to disallow control characters in method to avoid header
121
# injection
122
Patch67: CVE-2020-26116-httplib-header-injection.patch
123
# PATCH-FIX-UPSTREAM CVE-2021-4189-ftplib-trust-PASV-resp.patch bsc#1194146 mcepl@suse.com
124
# Make ftplib not trust the PASV response. (gh#python/cpython#24838)
125
Patch68: CVE-2021-4189-ftplib-trust-PASV-resp.patch
126
# PATCH-FIX-UPSTREAM CVE-2022-0391-urllib_parse-newline-parsing.patch bsc#1195396 mcepl@suse.com
127
# whole long discussion is on bpo#43882
128
# fix for santization URLs containing ASCII newline and tabs in urllib.parse
129
Patch69: CVE-2022-0391-urllib_parse-newline-parsing.patch
130
# PATCH-FIX-UPSTREAM CVE-2015-20107-mailcap-unsafe-filenames.patch bsc#1198511 mcepl@suse.com
131
# avoid the command injection in the mailcap module.
132
Patch70: CVE-2015-20107-mailcap-unsafe-filenames.patch
133
# PATCH-FIX-UPSTREAM CVE-2021-28861 bsc#1202624
134
# Coerce // to / in Lib/BaseHTTPServer.py
135
Patch71: CVE-2021-28861-double-slash-path.patch
136
Patch72: bpo34990-2038-problem-compileall.patch
137
# PATCH-FIX-UPSTREAM CVE-2022-45061-DoS-by-IDNA-decode.patch bsc#1205244 mcepl@suse.com
138
# Avoid DoS by decoding IDNA for too long domain names
139
Patch73: CVE-2022-45061-DoS-by-IDNA-decode.patch
140
# PATCH-FIX-UPSTREAM skip_unverified_test.patch mcepl@suse.com
141
# switching verification off on the old SLE doesn't work
142
Patch74: skip_unverified_test.patch
143
# PATCH-FIX-UPSTREAM CVE-2023-24329-blank-URL-bypass.patch bsc#1208471 mcepl@suse.com
144
# blocklist bypass via the urllib.parse component when supplying
145
# a URL that starts with blank characters
146
Patch75: CVE-2023-24329-blank-URL-bypass.patch
147
# PATCH-FIX-OPENSUSE PygmentsBridge-trime_doctest_flags.patch mcepl@suse.com
148
# Build documentation even without PygmentsBridge.trim_doctest_flags
149
Patch76: PygmentsBridge-trime_doctest_flags.patch
150
# PATCH-FIX-UPSTREAM CVE-2023-27043-email-parsing-errors.patch bsc#1210638 mcepl@suse.com
151
# Detect email address parsing errors and return empty tuple to
152
# indicate the parsing error (old API)
153
Patch77: CVE-2023-27043-email-parsing-errors.patch
154
# PATCH-FIX-UPSTREAM CVE-2022-48565-plistlib-XML-vulns.patch bsc#1214685 mcepl@suse.com
155
# Reject entity declarations in plists
156
Patch78: CVE-2022-48565-plistlib-XML-vulns.patch
157
# PATCH-FIX-UPSTREAM CVE-2023-40217-avoid-ssl-pre-close.patch gh#python/cpython#108315
158
Patch79: CVE-2023-40217-avoid-ssl-pre-close.patch
159
# PATCH-FIX-UPSTREAM CVE-2022-48566-compare_digest-more-constant.patch bsc#1214691 mcepl@suse.com
160
# Make compare_digest more constant-time
161
Patch80: CVE-2022-48566-compare_digest-more-constant.patch
162
# COMMON-PATCH-END
163
BuildRequires: automake
164
BuildRequires: db-devel
165
BuildRequires: fdupes
166
BuildRequires: gdbm-devel
167
BuildRequires: gmp-devel
168
BuildRequires: libbz2-devel
169
# This is NOT switching off NIS support on SLE < 15,
170
# support for NIS used to be in the glibc itself
171
%if 0%{?suse_version} >= 1500 && 0%{?suse_version} < 1599
172
BuildRequires: libnsl-devel
173
%endif
174
%if 0%{?suse_version} >= 1500
175
BuildRequires: libopenssl-1_1-devel
176
%else
177
BuildRequires: libopenssl-devel
178
%endif
179
BuildRequires: ncurses-devel
180
BuildRequires: readline-devel
181
BuildRequires: sqlite-devel
182
BuildRequires: tk-devel
183
BuildRequires: xz
184
BuildRequires: pkgconfig(x11)
185
# for %%{_datadir}/application and %%{_datadir}/mime/packages
186
BuildRequires: filesystem
187
BuildRequires: update-desktop-files
188
# for %%{_datadir}/icons/hicolor directories
189
BuildRequires: hicolor-icon-theme
190
%define python_version %(echo %{tarversion} | head -c 3)
191
%define idle_name idle
192
Requires: python-base = %{version}
193
%if %{suse_version} == 1315 && !0%{?is_opensuse}
194
Recommends: python-strict-tls-check
195
%endif
196
Provides: %{name} = %{python_version}
197
Provides: python2 = %{version}
198
# To make older versions of this package to conflict with
199
# shared-python-startup I need a symbol to conflict with
200
Provides: python2_split_startup
201
Obsoletes: python-elementtree
202
Obsoletes: python-nothreads
203
Obsoletes: python-sqlite
204
Obsoletes: python21
205
# bug437293
206
%ifarch ppc64
207
Obsoletes: python-64bit
208
%endif
209
BuildRoot: %{_tmppath}/%{name}-%{version}-build
210
211
%description
212
Python is an interpreted, object-oriented programming language, and is
213
often compared to Tcl, Perl, Scheme, or Java. You can find an overview
214
of Python in the documentation and tutorials included in the python-doc
215
(HTML) or python-doc-pdf (PDF) packages.
216
217
If you want to install third party modules using distutils, you need to
218
install python-devel package.
219
220
%package idle
221
Summary: An Integrated Development Environment for Python
222
Group: Development/Languages/Python
223
Requires: python-base = %{version}
224
Requires: python-tk
225
Provides: python2-idle = %{version}
226
227
%description idle
228
IDLE is a Tkinter based integrated development environment for Python.
229
It features a multi-window text editor with multiple undo, Python
230
colorizing, and many other things, as well as a Python shell window and
231
a debugger.
232
233
%package demo
234
Summary: Python Demonstration Scripts
235
Group: Development/Languages/Python
236
Requires: python-base = %{version}
237
Provides: pyth_dmo
238
Obsoletes: pyth_dmo
239
Provides: python2-demo = %{version}
240
241
%description demo
242
Various demonstrations of what you can do with Python and a number of
243
programs that are useful for building or extending Python.
244
245
%package tk
246
Summary: TkInter - Python Tk Interface
247
Group: Development/Libraries/Python
248
Requires: python-base = %{version}
249
Provides: pyth_tk
250
Provides: pyth_tkl
251
Provides: python-tkinter
252
Provides: python_tkinter_lib
253
#%ifarch %ix86
254
#Provides: _tkinter.so
255
#%endif
256
Obsoletes: pyth_tk
257
Obsoletes: pyth_tkl
258
Obsoletes: python-tkinter
259
Provides: python2-tk = %{version}
260
261
%description tk
262
Python interface to Tk. Tk is the GUI toolkit that comes with Tcl.
263
264
%package curses
265
Summary: Python Interface to the (N)Curses Library
266
Group: Development/Libraries/Python
267
Requires: python-base = %{version}
268
Obsoletes: pyth_cur
269
Provides: pyth_cur
270
Provides: python2-curses = %{version}
271
272
%description curses
273
An easy to use interface to the (n)curses CUI library. CUI stands for
274
Console User Interface.
275
276
%package gdbm
277
Summary: Python Interface to the GDBM Library
278
Group: Development/Libraries/Python
279
Requires: python-base = %{version}
280
Obsoletes: pygdmod
281
Provides: pygdmod
282
Provides: python2-gdbm = %{version}
283
# Compat to allow BR on python_module dbm and have it properly
284
# pull in gdbm on py2 and dbm on py3
285
Provides: python-dbm = %{version}
286
Provides: python2-dbm = %{version}
287
288
%description gdbm
289
An easy to use interface for GDBM databases. GDBM is the GNU
290
implementation of the standard Unix DBM databases.
291
292
%if %{suse_version} == 1315 && !0%{?is_opensuse}
293
%package strict-tls-check
294
Summary: Enable secure verification of TLS certificates
295
Group: Development/Libraries/Python
296
Requires: %{name} = %{version}
297
Supplements: %{name}
298
299
%description strict-tls-check
300
When this package is present, Python performs strict verification of
301
TLS certificates, including hostname check, by default. This is
302
the preferred secure setting.
303
304
It is distributed as a separate package, because this behavior
305
can cause verification errors in improperly written legacy scripts
306
that rely on earlier non-verification behavior.
307
%endif
308
309
%prep
310
%setup -q -n %{tarname}
311
# COMMON-PREP-BEGIN
312
%patch1 -p1
313
%patch2 -p1
314
%patch3 -p1
315
%patch4 -p1
316
%patch5 -p1
317
%patch7 -p1
318
%patch8 -p1
319
%patch10 -p1
320
%patch13 -p1
321
%patch17 -p1
322
%patch20 -p1
323
%patch22 -p1
324
%patch24 -p1
325
%patch33 -p1
326
%if %{suse_version} < 1500 && !0%{?is_opensuse}
327
%patch34 -p1
328
%endif
329
%patch35 -p1
330
%patch38 -p1
331
%ifarch ppc ppc64 ppc64le
332
%patch40 -p1
333
%endif
334
%patch41 -p1
335
%if %{suse_version} >= 1500 || (0%{?sle_version} && 0%{?sle_version} >= 120400)
336
%patch47 -p1
337
%patch48 -p1
338
%endif
339
# SLE-12 needs to skip more
340
%if %{suse_version} == 1315
341
%patch57 -p1
342
%endif
343
%patch49 -p1
344
%patch50 -p1
345
%patch51 -p1
346
%patch55 -p1
347
%patch56 -p1
348
%patch58 -p1
349
%patch59 -p1
350
%patch60 -p1
351
%patch61 -p1
352
%patch62 -p1
353
%patch63 -p1
354
%patch64 -p1
355
%patch65 -p1
356
%patch66 -p1
357
%patch67 -p1
358
%patch68 -p1
359
%patch69 -p1
360
%patch70 -p1
361
%patch71 -p1
362
%patch72 -p1
363
%patch73 -p1
364
%if 0%{?sle_version} && 0%{?sle_version} < 150000
365
%patch74 -p1
366
%endif
367
%patch75 -p1
368
%patch76 -p1
369
%patch77 -p1
370
%patch78 -p1
371
%patch79 -p1
372
%patch80 -p1
373
374
# For patch 66
375
cp -v %{SOURCE66} Lib/test/recursion.tar
376
377
# drop Autoconf version requirement
378
sed -i 's/^version_required/dnl version_required/' configure.ac
379
# COMMON-PREP-END
380
381
%if %{suse_version} == 1315 && !0%{?is_opensuse}
382
cp %{SOURCE8} Lib/
383
%endif
384
385
%build
386
%define _lto_cflags %{nil}
387
export OPT="%{optflags} -DOPENSSL_LOAD_CONF -fwrapv"
388
389
autoreconf -f -i . # Modules/_ctypes/libffi
390
# prevent make from trying to rebuild asdl stuff, which requires existing
391
# python installation
392
touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
393
394
%configure \
395
--docdir=%{_docdir}/python \
396
--enable-ipv6 \
397
--with-fpectl \
398
--enable-shared \
399
--enable-unicode=ucs4
400
401
LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH \
402
make %{?_smp_mflags}
403
404
%check
405
# on hppa, the threading of glibc is quite broken. The tests just stop
406
# at some point, and the machine does not build anything more until a
407
# timeout several hours later.
408
%ifnarch hppa
409
# Limit virtual memory to avoid spurious failures
410
if test $(ulimit -v) = unlimited || test $(ulimit -v) -gt 10000000; then
411
ulimit -v 10000000 || :
412
fi
413
LIST="test_urllib test_ssl test_hashlib test_hmac test_unicodedata test_tarfile test_sqlite test_tcl test_dbm test_anydbm test_dumbdbm test_gdbm test_whichdb test_tk test_ttk_textonly test_bsddb test_bsddb3 test_readline"
414
make test TESTOPTS="-w $LIST" TESTPYTHONOPTS="-R"
415
%endif
416
417
%install
418
# replace rest of /usr/local/bin/python or /usr/bin/python2.x with /usr/bin/python
419
find . -name '*.py' -type f | grep -vE "^./Parser/|^./Python/" \
420
| xargs grep -lE '^#! *(/usr/.*bin/(env +)?)?python' \
421
| xargs sed -r -i -e '1s@^#![[:space:]]*(/usr/(local/)?bin/(env +)?)?python([0-9]+\.[0-9]+)?@#!/usr/bin/python@'
422
# the grep inbetween makes it much faster
423
########################################
424
# install it
425
########################################
426
%make_install OPT="%{optflags} -fPIC"
427
########################################
428
# some cleanups
429
########################################
430
# remove hard links and replace them with symlinks
431
for dir in bin include %{_lib} ; do
432
rm -f %{buildroot}/%{_prefix}/$dir/python
433
ln -s python%{python_version} %{buildroot}/%{_prefix}/$dir/python
434
done
435
# kill imageop.so, it's insecure
436
rm -f %{buildroot}/%{_libdir}/python%{python_version}/lib-dynload/imageop.so
437
#cleanup for -base
438
rm %{buildroot}%{_bindir}/python%{python_version}
439
rm %{buildroot}%{_bindir}/python2
440
rm %{buildroot}%{_bindir}/python
441
rm %{buildroot}%{_bindir}/smtpd.py
442
rm %{buildroot}%{_bindir}/pydoc
443
rm %{buildroot}%{_bindir}/2to3
444
rm %{buildroot}%{_mandir}/man1/python*
445
rm %{buildroot}%{_libdir}/libpython*.so.*
446
rm %{buildroot}%{_libdir}/python
447
find %{buildroot}%{_libdir}/python%{python_version} -maxdepth 1 \
448
! \( -name "ssl.py*" -o -name "sle_tls_checks_policy.py*" \) \
449
-exec rm {} ";"
450
rm %{buildroot}%{_bindir}/python%{python_version}-config
451
rm %{buildroot}%{_bindir}/python2-config
452
rm %{buildroot}%{_bindir}/python-config
453
rm %{buildroot}%{_libdir}/pkgconfig/*
454
rm -r %{buildroot}%{_includedir}/python
455
rm -r %{buildroot}%{_includedir}/python%{python_version}
456
rm -r %{buildroot}%{_libdir}/python%{python_version}/compiler
457
rm -r %{buildroot}%{_libdir}/python%{python_version}/config
458
rm -r %{buildroot}%{_libdir}/python%{python_version}/ctypes
459
rm -r %{buildroot}%{_libdir}/python%{python_version}/distutils
460
rm -r %{buildroot}%{_libdir}/python%{python_version}/email
461
rm -r %{buildroot}%{_libdir}/python%{python_version}/encodings
462
rm -r %{buildroot}%{_libdir}/python%{python_version}/ensurepip
463
rm -r %{buildroot}%{_libdir}/python%{python_version}/hotshot
464
rm -r %{buildroot}%{_libdir}/python%{python_version}/importlib
465
rm -r %{buildroot}%{_libdir}/python%{python_version}/json
466
rm -r %{buildroot}%{_libdir}/python%{python_version}/lib2to3
467
rm -r %{buildroot}%{_libdir}/python%{python_version}/logging
468
rm -r %{buildroot}%{_libdir}/python%{python_version}/multiprocessing
469
rm -r %{buildroot}%{_libdir}/python%{python_version}/plat-*
470
rm -r %{buildroot}%{_libdir}/python%{python_version}/pydoc_data
471
rm -r %{buildroot}%{_libdir}/python%{python_version}/test
472
rm -r %{buildroot}%{_libdir}/python%{python_version}/unittest
473
rm -r %{buildroot}%{_libdir}/python%{python_version}/wsgiref
474
rm -r %{buildroot}%{_libdir}/python%{python_version}/xml
475
rm %{buildroot}%{_libdir}/libpython%{python_version}.so
476
rm %{buildroot}%{_libdir}/python%{python_version}/site-packages/README
477
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_bisect.so
478
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_csv.so
479
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_collections.so
480
rm -f %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_ctypes.so
481
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_ctypes_test.so
482
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_elementtree.so
483
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_functools.so
484
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_heapq.so
485
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_hotshot.so
486
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_io.so
487
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_json.so
488
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_locale.so
489
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_lsprof.so
490
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_multiprocessing.so
491
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_random.so
492
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_socket.so
493
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_struct.so
494
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_testcapi.so
495
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/array.so
496
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/binascii.so
497
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/bz2.so
498
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/cPickle.so
499
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/cStringIO.so
500
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/cmath.so
501
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/crypt.so
502
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/datetime.so
503
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/fcntl.so
504
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/future_builtins.so
505
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/grp.so
506
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/itertools.so
507
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/linuxaudiodev.so
508
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/math.so
509
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/mmap.so
510
rm -f %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/nis.so
511
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/operator.so
512
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/ossaudiodev.so
513
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/parser.so
514
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/pyexpat.so
515
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/resource.so
516
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/select.so
517
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/spwd.so
518
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/strop.so
519
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/syslog.so
520
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/termios.so
521
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/time.so
522
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/unicodedata.so
523
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/zlib.so
524
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_codecs*.so
525
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/_multibytecodec.so
526
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/audioop.so
527
rm -f %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/dl.so
528
rm %{buildroot}%{_libdir}/python%{python_version}/lib-dynload/Python-%{tarversion}-py%{python_version}.egg-info
529
# replace duplicate .pyo/.pyc with hardlinks
530
%fdupes %{buildroot}/%{_libdir}/python%{python_version}
531
########################################
532
# documentation
533
########################################
534
export PDOCS=%{buildroot}%{_docdir}/%{name}
535
install -d -m 755 $PDOCS
536
install -c -m 644 %{SOURCE1} $PDOCS/
537
install -c -m 644 LICENSE $PDOCS/
538
install -c -m 644 README $PDOCS/
539
########################################
540
# tools and demos
541
########################################
542
find Tools/ Demo/ -type d \( -regex ".*/.cvsignore" \) -exec rm -f \{\} \;
543
for x in `find Tools/ Demo/ \( -not -name Makefile \) -print | sort` ; do
544
test -d $x && ( install -c -m 755 -d $PDOCS/$x ) \
545
|| ( install -c -m 644 $x $PDOCS/$x )
546
done
547
########################################
548
# idle
549
########################################
550
# move idle config into /etc
551
install -d -m755 %{buildroot}%{_sysconfdir}/%{idle_name}
552
(
553
cd %{buildroot}/%{_libdir}/python%{python_version}/idlelib/
554
for file in *.def ; do
555
mv $file %{buildroot}%{_sysconfdir}/%{idle_name}/
556
ln -sf /etc/%{idle_name}/$file %{buildroot}/%{_libdir}/python%{python_version}/idlelib/
557
done
558
)
559
560
# Install .desktop, mime and appdata files from upstream tarball
561
%if 0%{?suse_version} >= 1500
562
install -Dm0644 %{SOURCE50} %{buildroot}/%{_datadir}/mime/packages/idle.appdata.xml
563
%endif
564
install -D -m 0644 Lib/idlelib/Icons/idle_16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/idle.png
565
install -D -m 0644 Lib/idlelib/Icons/idle_32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/idle.png
566
install -D -m 0644 Lib/idlelib/Icons/idle_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/idle.png
567
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE51}
568
569
%post -p /sbin/ldconfig
570
571
%postun -p /sbin/ldconfig
572
573
%files idle
574
%defattr(644, root, root, 755)
575
%dir %{_sysconfdir}/%{idle_name}
576
%config %{_sysconfdir}/%{idle_name}/*
577
%doc Lib/idlelib/NEWS.txt
578
%doc Lib/idlelib/README.txt
579
%doc Lib/idlelib/TODO.txt
580
%doc Lib/idlelib/extend.txt
581
%doc Lib/idlelib/ChangeLog
582
%{_libdir}/python%{python_version}/idlelib
583
%attr(755, root, root) %{_bindir}/%{idle_name}
584
%if 0%{?suse_version} >= 1500
585
%{_datadir}/mime/packages/idle.appdata.xml
586
%endif
587
%{_datadir}/applications/idle.desktop
588
%{_datadir}/icons/hicolor/*/apps/idle.png
589
590
%files demo
591
%defattr(644, root, root, 755)
592
%doc %{_docdir}/%{name}/Demo
593
%doc %{_docdir}/%{name}/Tools
594
595
%files tk
596
%defattr(644, root, root, 755)
597
%{_libdir}/python%{python_version}/lib-tk/
598
%{_libdir}/python%{python_version}/lib-dynload/_tkinter.so
599
600
%files curses
601
%defattr(644, root, root, 755)
602
%{_libdir}/python%{python_version}/curses
603
%{_libdir}/python%{python_version}/lib-dynload/_curses.so
604
%{_libdir}/python%{python_version}/lib-dynload/_curses_panel.so
605
606
%files gdbm
607
%defattr(644, root, root, 755)
608
%{_libdir}/python%{python_version}/lib-dynload/gdbm.so
609
%{_libdir}/python%{python_version}/lib-dynload/dbm.so
610
611
%if %{suse_version} == 1315 && !0%{?is_opensuse}
612
%files strict-tls-check
613
%defattr(644, root, root, 755)
614
%{_libdir}/python%{python_version}/sle_tls_checks_policy.py*
615
%endif
616
617
%files
618
%defattr(644, root, root, 755)
619
%dir %{_docdir}/%{name}
620
%doc %{_docdir}/%{name}/README
621
%doc %{_docdir}/%{name}/LICENSE
622
%doc %{_docdir}/%{name}/README.SUSE
623
%dir %{_libdir}/python%{python_version}
624
%{_libdir}/python%{python_version}/ssl.py*
625
%{_libdir}/python%{python_version}/bsddb
626
%{_libdir}/python%{python_version}/sqlite3
627
%dir %{_libdir}/python%{python_version}/lib-dynload
628
%{_libdir}/python%{python_version}/lib-dynload/_bsddb.so
629
%{_libdir}/python%{python_version}/lib-dynload/_hashlib.so
630
%{_libdir}/python%{python_version}/lib-dynload/_sqlite3.so
631
%{_libdir}/python%{python_version}/lib-dynload/_ssl.so
632
%{_libdir}/python%{python_version}/lib-dynload/readline.so
633
634
%changelog
635