1 |
# NOTES ON BOOTSTRAPING PYTHON 3.x: |
2 |
# |
3 |
# Due to a dependency cycle between Python, rpm, pip, setuptools, wheel, |
4 |
# and other packages, in order to rebase Python 3 one has to build in the |
5 |
# following order: |
6 |
# |
7 |
# 1. gdb %%bcond_with python |
8 |
# 2. rpm-mageia-setup %%bcond_without bootstrap |
9 |
# 3. python-rpm-generators %%define bootstrapping_python 1 |
10 |
# 4 python3 (if python3 is build to core/udpates_testing there's no need to use %bcond_with rpmwheels) |
11 |
# 5. python-setuptools %%bcond_without bootstrap |
12 |
# 6. python-rpm-generators %%define bootstrapping_python 0 |
13 |
# 7. python-pip %%bcond_without bootstrap |
14 |
# 8. python-wheel %%bcond_without bootstrap |
15 |
# 9. python-setuptools %%bcond_with bootstrap |
16 |
# 10. python-pip %%bcond_with bootstrap |
17 |
# 11. python-wheel %%bcond_with bootstrap |
18 |
# 12. rpm |
19 |
# 13. gdb %%bcond_without python |
20 |
# 14. meson |
21 |
# 15. python-coverage |
22 |
# 16. python-nose |
23 |
# 17. python-cython |
24 |
# 18. python-yaml |
25 |
# 19. python-markdown |
26 |
# 20. python-markupsafe |
27 |
# 21. python-beaker |
28 |
# 22. python-six |
29 |
# 23. python-pbr |
30 |
# 24. python-argparse |
31 |
# 25. python-traceback2 |
32 |
# 26. python-linecache2 |
33 |
# 27. python-unittest2 |
34 |
# 28. python-funcsigs |
35 |
# 29. python-mock |
36 |
# 30. python-mako |
37 |
# 31. gobject-introspection |
38 |
# 32. python-enchant |
39 |
# 33. file |
40 |
# 34. rpmlint |
41 |
# 35. rpm-mageia-setup %%bcond_with bootstrap |
42 |
|
43 |
# Then the most important packages have to be built, starting from their |
44 |
# various leaf dependencies recursively. After these have been built, a |
45 |
# targeted rebuild should be requested for the rest. |
46 |
# |
47 |
# Currently these packages are recommended to have been built before a targeted |
48 |
# rebuild after a python abi change: |
49 |
# python-sphinx, python-pytest, python-requests |
50 |
|
51 |
%global docver 3.7.4 |
52 |
|
53 |
%global pybasever 3.7 |
54 |
%global familyver 3 |
55 |
|
56 |
#pybasever without the dot: |
57 |
%global pyshortver 37 |
58 |
|
59 |
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package |
60 |
# Uses upstream bundled prebuilt wheels otherwise |
61 |
%bcond_without rpmwheels |
62 |
|
63 |
# Run the test suite in %%check |
64 |
%bcond_without tests |
65 |
|
66 |
# Support for the GDB debugger |
67 |
%bcond_without gdb_hooks |
68 |
|
69 |
# The dbm.gnu module (key-value database) |
70 |
%bcond_without gdbm |
71 |
|
72 |
# Support for the Valgrind debugger/profiler |
73 |
%ifarch %{valgrind_arches} |
74 |
%bcond_without valgrind |
75 |
%else |
76 |
%bcond_with valgrind |
77 |
%endif |
78 |
|
79 |
# Some defines to ease files list |
80 |
%global pylibdir %{_libdir}/python%{pybasever} |
81 |
%global dynload_dir %{pylibdir}/lib-dynload |
82 |
%global site_packages %{pylibdir}/site-packages |
83 |
|
84 |
# ABIFLAGS, LDVERSION and SOABI are in the upstream configure.ac |
85 |
# See PEP 3149 for some background: http://www.python.org/dev/peps/pep-3149/ |
86 |
%global ABIFLAGS_optimized m |
87 |
|
88 |
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized} |
89 |
|
90 |
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{_arch}-linux%{_gnu} |
91 |
|
92 |
# All bytecode files are in a __pycache__ subdirectory, with a name |
93 |
# reflecting the version of the bytecode. |
94 |
# See PEP 3147: http://www.python.org/dev/peps/pep-3147/ |
95 |
# For example, |
96 |
# foo/bar.py |
97 |
# has bytecode at: |
98 |
# foo/__pycache__/bar.cpython-%%{pyshortver}.pyc |
99 |
# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-1.pyc |
100 |
# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-2.pyc |
101 |
%global bytecode_suffixes .cpython-%{pyshortver}*.py? |
102 |
|
103 |
# Disable automatic bytecompilation. The python3 binary is not yet be |
104 |
# available in /usr/bin when Python is built. Also, the bytecompilation fails |
105 |
# on files that test invalid syntax. |
106 |
%global __brp_python_bytecompile %nil |
107 |
|
108 |
%define lib_major %{pybasever} |
109 |
%define lib_name_orig libpython%{familyver} |
110 |
%define lib_name %mklibname python %{lib_major} |
111 |
%define develname %mklibname python3 -d |
112 |
|
113 |
Summary: An interpreted, interactive object-oriented programming language |
114 |
Name: python3 |
115 |
Version: 3.7.4 |
116 |
Release: %mkrel 3 |
117 |
License: Modified CNRI Open Source License |
118 |
Group: Development/Python |
119 |
|
120 |
BuildRequires: automake |
121 |
BuildRequires: gcc-c++ |
122 |
BuildRequires: blt |
123 |
BuildRequires: db-devel |
124 |
BuildRequires: pkgconfig(expat) |
125 |
BuildRequires: gdbm-devel |
126 |
BuildRequires: gmp-devel |
127 |
BuildRequires: pkgconfig(libffi) |
128 |
BuildRequires: pkgconfig(ncursesw) |
129 |
BuildRequires: pkgconfig(openssl) >= 1.1 |
130 |
BuildRequires: readline-devel |
131 |
BuildRequires: termcap-devel |
132 |
BuildRequires: tcl |
133 |
BuildRequires: pkgconfig(tcl) |
134 |
BuildRequires: tk |
135 |
BuildRequires: pkgconfig(tk) |
136 |
BuildRequires: autoconf |
137 |
BuildRequires: pkgconfig(bzip2) |
138 |
BuildRequires: pkgconfig(sqlite3) |
139 |
BuildRequires: pkgconfig(liblzma) |
140 |
# uncomment once the emacs part no longer conflict with python 2.X |
141 |
#BuildRequires: emacs |
142 |
#BuildRequires: emacs-bin |
143 |
%if %{with valgrind} |
144 |
BuildRequires: pkgconfig(valgrind) |
145 |
%endif |
146 |
|
147 |
%if %{with rpmwheels} |
148 |
BuildRequires: python-setuptools-wheel |
149 |
BuildRequires: python-pip-wheel |
150 |
%endif |
151 |
|
152 |
Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz |
153 |
Source1: https://docs.python.org/%{pybasever}/archives/python-%{docver}-docs-html.tar.bz2 |
154 |
|
155 |
# A simple script to check timestamps of bytecode files |
156 |
# Run in check section with Python that is currently being built |
157 |
# Originally written by bkabrda |
158 |
Source8: check-pyc-timestamps.py |
159 |
|
160 |
# |
161 |
# Upstream patches |
162 |
# |
163 |
|
164 |
# |
165 |
# Fedora patches |
166 |
# |
167 |
|
168 |
# 00001 # |
169 |
# Fixup distutils/unixccompiler.py to remove standard library path from rpath: |
170 |
# Was Patch0 in ivazquez' python3000 specfile: |
171 |
Patch1: 00001-rpath.patch |
172 |
|
173 |
# 00102 # |
174 |
# Change the various install paths to use /usr/lib64/ instead or /usr/lib |
175 |
# Only used when "%%{_lib}" == "lib64" |
176 |
# Not yet sent upstream. |
177 |
Patch102: 00102-lib64.patch |
178 |
|
179 |
# 00111 # |
180 |
# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build |
181 |
# a libpythonMAJOR.MINOR.a |
182 |
# See https://bugzilla.redhat.com/show_bug.cgi?id=556092 |
183 |
# Downstream only: not appropriate for upstream |
184 |
Patch111: 00111-no-static-lib.patch |
185 |
|
186 |
# 00132 # |
187 |
# Add non-standard hooks to unittest for use in the "check" phase below, when |
188 |
# running selftests within the build: |
189 |
# @unittest._skipInRpmBuild(reason) |
190 |
# for tests that hang or fail intermittently within the build environment, and: |
191 |
# @unittest._expectedFailureInRpmBuild |
192 |
# for tests that always fail within the build environment |
193 |
# |
194 |
# The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the |
195 |
# environment, which we set manually in the appropriate portion of the "check" |
196 |
# phase below (and which potentially other python-* rpms could set, to reuse |
197 |
# these unittest hooks in their own "check" phases) |
198 |
Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch |
199 |
|
200 |
# 00155 # |
201 |
# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid |
202 |
# generating SELinux denials on "import ctypes" and "import uuid" when |
203 |
# embedding Python within httpd |
204 |
# See https://bugzilla.redhat.com/show_bug.cgi?id=814391 |
205 |
Patch155: 00155-avoid-ctypes-thunks.patch |
206 |
|
207 |
# 00160 # |
208 |
# Python 3.3 added os.SEEK_DATA and os.SEEK_HOLE, which may be present in the |
209 |
# header files in the build chroot, but may not be supported in the running |
210 |
# kernel, hence we disable this test in an rpm build. |
211 |
# Adding these was upstream issue http://bugs.python.org/issue10142 |
212 |
# Not yet sent upstream |
213 |
Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch |
214 |
|
215 |
# 00163 # |
216 |
# Some tests within test_socket fail intermittently when run inside Koji; |
217 |
# disable them using unittest._skipInRpmBuild |
218 |
# Not yet sent upstream |
219 |
Patch163: 00163-disable-parts-of-test_socket-in-rpm-build.patch |
220 |
|
221 |
# 00170 # |
222 |
# In debug builds, try to print repr() when a C-level assert fails in the |
223 |
# garbage collector (typically indicating a reference-counting error |
224 |
# somewhere else e.g in an extension module) |
225 |
# The new macros/functions within gcmodule.c are hidden to avoid exposing |
226 |
# them within the extension API. |
227 |
# Sent upstream: http://bugs.python.org/issue9263 |
228 |
# See https://bugzilla.redhat.com/show_bug.cgi?id=614680 |
229 |
Patch170: 00170-gc-assertions.patch |
230 |
|
231 |
# 00178 # |
232 |
# Don't duplicate various FLAGS in sysconfig values |
233 |
# http://bugs.python.org/issue17679 |
234 |
# Does not affect python2 AFAICS (different sysconfig values initialization) |
235 |
Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch |
236 |
|
237 |
# 00189 # |
238 |
# Instead of bundled wheels, use our RPM packaged wheels from |
239 |
# /usr/share/python-wheels |
240 |
Patch189: 00189-use-rpm-wheels.patch |
241 |
|
242 |
# 00205 # |
243 |
# LIBPL variable in makefile takes LIBPL from configure.ac |
244 |
# but the LIBPL variable defined there doesn't respect libdir macro |
245 |
Patch205: 00205-make-libpl-respect-lib64.patch |
246 |
|
247 |
# 00251 |
248 |
# Set values of prefix and exec_prefix in distutils install command |
249 |
# to /usr/local if executable is /usr/bin/python* and RPM build |
250 |
# is not detected to make pip and distutils install into separate location |
251 |
# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe |
252 |
Patch251: 00251-change-user-install-location.patch |
253 |
|
254 |
# 00316 # |
255 |
# We remove the exe files from distutil's bdist_wininst |
256 |
# So we mark the command as unsupported - and the tests are skipped |
257 |
Patch316: 00316-mark-bdist_wininst-unsupported.patch |
258 |
|
259 |
# |
260 |
# Mageia patches |
261 |
# |
262 |
Patch500: python3-3.7.1-module-linkage.patch |
263 |
Patch501: python3-3.5.2-skip-distutils-tests-that-fail-in-rpmbuild.patch |
264 |
Patch502: python3-3.7.1-uid-gid-overflows.patch |
265 |
Patch503: python3-3.5.2-dont-raise-from-py_compile.patch |
266 |
Patch504: python3-3.5.2-remove-hf-from-arm-triplet.patch |
267 |
Patch506: python3-3.6.2-python3-config-LIBPLUSED-cmp0004-error.patch |
268 |
|
269 |
|
270 |
Provides: python(abi) = %{pybasever} |
271 |
Provides: /usr/bin/python%{LDVERSION_optimized} |
272 |
Provides: /usr/bin/python%{pybasever} |
273 |
Requires: python-rpm-macros |
274 |
Requires: python3-rpm-macros |
275 |
|
276 |
Conflicts: tkinter3 < %{version} |
277 |
Conflicts: python < 2.7.16-3 |
278 |
Requires: %{lib_name} = %{version}-%{release} |
279 |
|
280 |
%description |
281 |
Python is an interpreted, interactive, object-oriented programming |
282 |
language often compared to Tcl, Perl, Scheme or Java. Python includes |
283 |
modules, classes, exceptions, very high level dynamic data types and |
284 |
dynamic typing. Python supports interfaces to many system calls and |
285 |
libraries, as well as to various windowing systems (X11, Motif, Tk, |
286 |
Mac and MFC). |
287 |
|
288 |
Programmers can write new built-in modules for Python in C or C++. |
289 |
Python can be used as an extension language for applications that |
290 |
need a programmable interface. This package contains most of the |
291 |
standard Python modules, as well as modules for interfacing to the |
292 |
Tix widget set for Tk and RPM. |
293 |
|
294 |
Note that documentation for Python is provided in the python-docs |
295 |
package. |
296 |
|
297 |
%package -n %{lib_name} |
298 |
Summary: Shared libraries for Python %{version} |
299 |
Group: System/Libraries |
300 |
Requires: %{lib_name}-stdlib = %{version}-%{release} |
301 |
|
302 |
%description -n %{lib_name} |
303 |
This packages contains Python shared object library. Python is an |
304 |
interpreted, interactive, object-oriented programming language often |
305 |
compared to Tcl, Perl, Scheme or Java. |
306 |
|
307 |
%package -n %{lib_name}-stdlib |
308 |
Summary: Python %{version} standard library |
309 |
Group: Development/Python |
310 |
%if %{with rpmwheels} |
311 |
Requires: python-setuptools-wheel |
312 |
Requires: python-pip-wheel |
313 |
%else |
314 |
Provides: bundled(python3-pip) = 19.0.3 |
315 |
Provides: bundled(python3-setuptools) = 40.8.0 |
316 |
%endif |
317 |
|
318 |
%description -n %{lib_name}-stdlib |
319 |
This package contains Python 3's standard library. |
320 |
It is normally not used on its own, but as a dependency of Python %{version}. |
321 |
|
322 |
%package -n %{lib_name}-testsuite |
323 |
Summary: Testsuite for the Python %{version} standard library |
324 |
Group: Development/Python |
325 |
Provides: python3-testsuite = %{version}-%{release} |
326 |
Requires: %{lib_name}-stdlib = %{version}-%{release} |
327 |
Requires: %{lib_name} = %{version}-%{release} |
328 |
Recommends: tkinter3 |
329 |
|
330 |
%description -n %{lib_name}-testsuite |
331 |
The complete testsuite for the Python standard library. |
332 |
It is normally not used on its own, but as a dependency of Python %{version}. |
333 |
|
334 |
%package -n %{develname} |
335 |
Summary: The libraries and header files needed for Python development |
336 |
Group: Development/Python |
337 |
Requires: %{name} = %version |
338 |
Requires: %{lib_name} = %{version}-%{release} |
339 |
Provides: %{name}-devel = %{version}-%{release} |
340 |
Provides: %{lib_name_orig}-devel = %{version}-%{release} |
341 |
Conflicts: %{_lib}python-devel < 2.7.16-3 |
342 |
Recommends: %{lib_name}-testsuite |
343 |
Recommends: %{name}-docs |
344 |
|
345 |
%description -n %{develname} |
346 |
The Python programming language's interpreter can be extended with |
347 |
dynamically loaded extensions and can be embedded in other programs. |
348 |
This package contains the header files and libraries needed to do |
349 |
these types of tasks. |
350 |
|
351 |
Install %{develname} if you want to develop Python extensions. The |
352 |
python package will also need to be installed. You'll probably also |
353 |
want to install the python-docs package, which contains Python |
354 |
documentation. |
355 |
|
356 |
%package docs |
357 |
Summary: Documentation for the Python programming language |
358 |
Requires: %{name} >= %{version} |
359 |
Requires: xdg-utils |
360 |
Group: Development/Python |
361 |
BuildArch: noarch |
362 |
|
363 |
%description docs |
364 |
The python-docs package contains documentation on the Python |
365 |
programming language and interpreter. The documentation is provided |
366 |
in ASCII text files and in LaTeX source files. |
367 |
|
368 |
Install the python-docs package if you'd like to use the documentation |
369 |
for the Python language. |
370 |
|
371 |
%package -n tkinter3 |
372 |
Summary: A graphical user interface for the Python scripting language |
373 |
Group: Development/Python |
374 |
Requires: %{name} = %{version}-%{release} |
375 |
Requires: tcl tk |
376 |
Provides: python3-tkinter |
377 |
|
378 |
%description -n tkinter3 |
379 |
The Tkinter (Tk interface) program is an graphical user interface for |
380 |
the Python scripting language. |
381 |
|
382 |
You should install the tkinter package if you'd like to use a graphical |
383 |
user interface for Python programming. |
384 |
|
385 |
%package -n tkinter3-apps |
386 |
Summary: Various applications written using tkinter |
387 |
Group: Development/Python |
388 |
Requires: tkinter3 |
389 |
|
390 |
%description -n tkinter3-apps |
391 |
Various applications written using tkinter |
392 |
|
393 |
%prep |
394 |
%setup -qn Python-%{version} |
395 |
# Remove all exe files to ensure we are not shipping prebuilt binaries |
396 |
# note that those are only used to create Microsoft Windows installers |
397 |
# and that functionality is broken on Linux anyway |
398 |
find -name '*.exe' -print -delete |
399 |
|
400 |
# Remove bundled libraries to ensure that we're using the system copy. |
401 |
rm -r Modules/expat |
402 |
|
403 |
# Fedora patches |
404 |
%patch1 -p1 |
405 |
|
406 |
%if "%{_lib}" == "lib64" |
407 |
%patch102 -p1 |
408 |
%endif |
409 |
%patch111 -p1 |
410 |
%patch132 -p1 |
411 |
%patch155 -p1 |
412 |
%patch160 -p1 |
413 |
%patch163 -p1 |
414 |
%patch170 -p1 |
415 |
%patch178 -p1 |
416 |
|
417 |
%if %{with rpmwheels} |
418 |
%patch189 -p1 |
419 |
rm Lib/ensurepip/_bundled/*.whl |
420 |
%endif |
421 |
|
422 |
%patch205 -p1 |
423 |
%patch251 -p1 |
424 |
%patch316 -p1 |
425 |
|
426 |
# Mageia patches |
427 |
%patch500 -p1 |
428 |
%patch501 -p1 |
429 |
%patch502 -p1 |
430 |
%patch503 -p1 |
431 |
%patch504 -p1 |
432 |
%patch506 -p1 |
433 |
|
434 |
# Remove files that should be generated by the build |
435 |
# (This is after patching, so that we can use patches directly from upstream) |
436 |
rm configure pyconfig.h.in |
437 |
|
438 |
# drop Autoconf version requirement |
439 |
sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac |
440 |
|
441 |
# docs |
442 |
mkdir html |
443 |
bzcat %{SOURCE1} | tar x -C html |
444 |
|
445 |
find . -type f -print0 | xargs -0 perl -p -i -e 's@/usr/local/bin/python@/usr/bin/python3@' |
446 |
|
447 |
%build |
448 |
autoreconf -vfi |
449 |
|
450 |
# We need -fwrapv |
451 |
# https://bugs.python.org/issue34096 |
452 |
export OPT="%{optflags} -D_GNU_SOURCE -fPIC -fwrapv" |
453 |
export CFLAGS="%{optflags} -D_GNU_SOURCE -fPIC -fwrapv" |
454 |
export CXXFLAGS="%{optflags} -D_GNU_SOURCE -fPIC -fwrapv" |
455 |
|
456 |
# to fix curses module build |
457 |
# https://bugs.mageia.org/show_bug.cgi?id=6702 |
458 |
export CPPFLAGS="-I/usr/include/ncursesw" |
459 |
|
460 |
# Remove -Wl,--no-undefined in accordance with MGA #9395 : |
461 |
# https://bugs.mageia.org/show_bug.cgi?id=9395 |
462 |
%define _disable_ld_no_undefined 1 |
463 |
|
464 |
%configure2_5x \ |
465 |
--enable-ipv6 \ |
466 |
--enable-shared \ |
467 |
--with-dbmliborder=gdbm \ |
468 |
--with-system-expat \ |
469 |
--with-system-ffi \ |
470 |
--enable-loadable-sqlite-extensions \ |
471 |
--without-dtrace \ |
472 |
--with-lto \ |
473 |
--with-ssl-default-suites=openssl \ |
474 |
%if %{with valgrind} |
475 |
--with-valgrind \ |
476 |
%endif |
477 |
--with-threads \ |
478 |
--without-ensurepip |
479 |
|
480 |
# (misc) if the home is nfs mounted, rmdir fails due to delay |
481 |
export TMP="/tmp" TMPDIR="/tmp" |
482 |
|
483 |
make EXTRA_CFLAGS="$CFLAGS" LN="ln -sf" |
484 |
|
485 |
%install |
486 |
|
487 |
%if %{with gdb_hooks} |
488 |
DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir} |
489 |
mkdir -p %{buildroot}$DirHoldingGdbPy |
490 |
%endif # with gdb_hooks |
491 |
|
492 |
# fix Makefile to get rid of reference to distcc |
493 |
perl -pi -e "/^CC=/ and s/distcc/gcc/" Makefile |
494 |
|
495 |
# set the install path |
496 |
echo '[install_scripts]' >setup.cfg |
497 |
echo 'install_dir='"${RPM_BUILD_ROOT}/usr/bin" >>setup.cfg |
498 |
|
499 |
%make_install LN="ln -sf" |
500 |
|
501 |
%if %{with gdb_hooks} |
502 |
# See comment on $DirHoldingGdbPy above |
503 |
PathOfGdbPy=$DirHoldingGdbPy/libpython%{pybasever}%{ABIFLAGS_optimized}-%{version}-%{release}.%{_arch}.debug-gdb.py |
504 |
cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy |
505 |
%endif # with gdb_hooks |
506 |
|
507 |
# Install directories for additional packages |
508 |
install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__ |
509 |
%if "%{_lib}" == "lib64" |
510 |
# The 64-bit version needs to create "site-packages" in /usr/lib/ (for |
511 |
# pure-Python modules) as well as in /usr/lib64/ (for packages with extension |
512 |
# modules). |
513 |
# Note that rpmlint will complain about hardcoded library path; |
514 |
# this is intentional. |
515 |
install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__ |
516 |
%endif |
517 |
|
518 |
# overwrite the copied binary with a link |
519 |
pushd %{buildroot}%{_bindir} |
520 |
ln -sf python%{LDVERSION_optimized} python%{pybasever} |
521 |
ln -sf python%{pybasever} python%{familyver} |
522 |
popd |
523 |
|
524 |
pushd %{buildroot}%{_libdir} |
525 |
ln -sf $(ls libpython%{lib_major}*.so.*) libpython%{lib_major}.so |
526 |
popd |
527 |
|
528 |
# make python3 as default one |
529 |
ln -s ./python3 %{buildroot}%{_bindir}/python |
530 |
ln -s ./pydoc3 %{buildroot}%{_bindir}/pydoc |
531 |
ln -s ./python3-config %{buildroot}%{_bindir}/python-config |
532 |
ln -s ./python3.1 %{buildroot}%{_mandir}/man1/python.1 |
533 |
ln -s ./python3.pc %{buildroot}%{_libdir}/pkgconfig/python.pc |
534 |
|
535 |
# install pynche as pynche3 |
536 |
cat << EOF > %{buildroot}%{_bindir}/pynche3 |
537 |
#!/usr/bin/bash |
538 |
exec %{_libdir}/python%{pybasever}/site-packages/pynche/pynche |
539 |
EOF |
540 |
rm -f Tools/pynche/*.pyw |
541 |
cp -r Tools/pynche %{buildroot}%{_libdir}/python%{pybasever}/site-packages/ |
542 |
|
543 |
chmod 755 %{buildroot}%{_bindir}/{idle3,pynche3} |
544 |
|
545 |
ln -f Tools/pynche/README Tools/pynche/README.pynche |
546 |
|
547 |
%if %{with valgrind} |
548 |
install Misc/valgrind-python.supp -D %{buildroot}%{_libdir}/valgrind/valgrind-python3.supp |
549 |
%endif |
550 |
|
551 |
mkdir -p %{buildroot}%{_datadir}/applications |
552 |
cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-tkinter3.desktop << EOF |
553 |
[Desktop Entry] |
554 |
Name=IDLE |
555 |
Comment=IDE for Python3 |
556 |
Exec=%{_bindir}/idle3 |
557 |
Icon=development_environment_section |
558 |
Terminal=false |
559 |
Type=Application |
560 |
Categories=Development;IDE; |
561 |
EOF |
562 |
|
563 |
cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}-docs.desktop << EOF |
564 |
[Desktop Entry] |
565 |
Name=Python documentation |
566 |
Comment=Python complete reference |
567 |
Exec=%{_bindir}/xdg-open %_defaultdocdir/%{name}-docs/index.html |
568 |
Icon=documentation_section |
569 |
Terminal=false |
570 |
Type=Application |
571 |
Categories=Documentation; |
572 |
EOF |
573 |
|
574 |
# fix non real scripts |
575 |
#chmod 644 %{buildroot}%{_libdir}/python*/test/test_{binascii,grp,htmlparser}.py* |
576 |
find %{buildroot} -type f \( -name "test_binascii.py*" -o -name "test_grp.py*" -o -name "test_htmlparser.py*" \) -exec chmod 644 {} \; |
577 |
|
578 |
# fix python library not stripped |
579 |
chmod u+w %{buildroot}%{_libdir}/libpython%{lib_major}*.so.1.0 $RPM_BUILD_ROOT%{_libdir}/libpython3.so |
580 |
|
581 |
# Make python3-devel multilib-ready |
582 |
mv %{buildroot}%{_includedir}/python%{LDVERSION_optimized}/pyconfig.h \ |
583 |
%{buildroot}%{_includedir}/python%{LDVERSION_optimized}/pyconfig-%{__isa_bits}.h |
584 |
cat > %{buildroot}%{_includedir}/python%{LDVERSION_optimized}/pyconfig.h << EOF |
585 |
#include <bits/wordsize.h> |
586 |
|
587 |
#if __WORDSIZE == 32 |
588 |
#include "pyconfig-32.h" |
589 |
#elif __WORDSIZE == 64 |
590 |
#include "pyconfig-64.h" |
591 |
#else |
592 |
#error "Unknown word size" |
593 |
#endif |
594 |
EOF |
595 |
|
596 |
# Make sure distutils looks at the right pyconfig.h file |
597 |
# See https://bugzilla.redhat.com/show_bug.cgi?id=201434 |
598 |
# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate |
599 |
# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py |
600 |
# when python starts up (see https://bugzilla.redhat.com/show_bug.cgi?id=653058) |
601 |
# |
602 |
# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h |
603 |
# variants: |
604 |
sed -i -e "s/'pyconfig.h'/'pyconfig-%{__isa_bits}.h'/" \ |
605 |
%{buildroot}%{pylibdir}/distutils/sysconfig.py \ |
606 |
%{buildroot}%{pylibdir}/sysconfig.py |
607 |
|
608 |
# Install pathfix.py to bindir |
609 |
# See https://github.com/fedora-python/python-rpm-porting/issues/24 |
610 |
cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/ |
611 |
|
612 |
# Switch all shebangs to refer to the specific Python version. |
613 |
# This currently only covers files matching ^[a-zA-Z0-9_]+\.py$, |
614 |
# so handle files named using other naming scheme separately. |
615 |
LD_LIBRARY_PATH=./ ./python \ |
616 |
Tools/scripts/pathfix.py \ |
617 |
-i "%{_bindir}/python%{pybasever}" -pn \ |
618 |
%{buildroot} \ |
619 |
%{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py} |
620 |
|
621 |
# Remove shebang lines from .py files that aren't executable, and |
622 |
# remove executability from .py files that don't have a shebang line: |
623 |
find %{buildroot} -name \*.py \ |
624 |
\( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \ |
625 |
-print -exec sed -i '1d' {} \; \) -o \( \ |
626 |
-perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \ |
627 |
-exec chmod a-x {} \; \) \) |
628 |
|
629 |
# .xpm and .xbm files should not be executable: |
630 |
find %{buildroot} \ |
631 |
\( -name \*.xbm -o -name \*.xpm -o -name \*.xpm.1 \) \ |
632 |
-exec chmod a-x {} \; |
633 |
|
634 |
# Get rid of DOS batch files: |
635 |
find %{buildroot} -name \*.bat -exec rm {} \; |
636 |
|
637 |
# Get rid of backup files: |
638 |
find %{buildroot}/ -name "*~" -exec rm -f {} \; |
639 |
find . -name "*~" -exec rm -f {} \; |
640 |
|
641 |
# Get rid of a stray copy of the license: |
642 |
rm -f %{buildroot}%{pylibdir}/LICENSE.txt |
643 |
|
644 |
# Do bytecompilation with the newly installed interpreter. |
645 |
# This is similar to the script in macros.pybytecompile |
646 |
# compile *.pyc |
647 |
find %{buildroot}%{_libdir}/python%{pybasever} -type f -a -name "*.py" -print0 | \ |
648 |
LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \ |
649 |
PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \ |
650 |
xargs -0 %{buildroot}%{_bindir}/python%{pybasever} -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("%{buildroot}")[2], optimize=opt) for opt in range(3) for f in sys.argv[1:]]' || : |
651 |
|
652 |
# Since we have pathfix.py in bindir, this is created, but we don't want it |
653 |
rm -rf %{buildroot}%{_bindir}/__pycache__ |
654 |
|
655 |
# Fixup permissions for shared libraries from non-standard 555 to standard 755: |
656 |
find %{buildroot} -perm 555 -exec chmod 755 {} \; |
657 |
|
658 |
# make man python3.Xm work https://bugzilla.redhat.com/show_bug.cgi?id=1612241 |
659 |
ln -s ./python%{pybasever}.1 %{buildroot}%{_mandir}/man1/python%{pybasever}m.1 |
660 |
|
661 |
%if %{with tests} |
662 |
%check |
663 |
# (misc) if the home is nfs mounted, rmdir fails |
664 |
export TMP="/tmp" TMPDIR="/tmp" |
665 |
|
666 |
# Exclude some tests that hangs on the BS |
667 |
EXCLUDE="test_ssl test_socket test_epoll" |
668 |
%ifarch x86_64 |
669 |
EXCLUDE="$EXCLUDE test_faulthandler" |
670 |
%endif |
671 |
%ifarch %arm |
672 |
EXCLUDE="$EXCLUDE test_float test_asyncio test_cmath" |
673 |
%endif |
674 |
# Local aarch64 tests succeeds, but fails on BS |
675 |
%ifarch aarch64 |
676 |
EXCLUDE="$EXCLUDE test_posix test_asyncio" |
677 |
%endif |
678 |
# json test pass on local build but fail on BS |
679 |
EXCLUDE="$EXCLUDE test_json" |
680 |
# to investigate why it fails on local build |
681 |
EXCLUDE="$EXCLUDE test_site" |
682 |
# all tests must pass |
683 |
# but we disable network on BS |
684 |
WITHIN_PYTHON_RPM_BUILD= \ |
685 |
make test TESTOPTS="-j1 -wW -u none -x $EXCLUDE" |
686 |
# consider use network on local build |
687 |
#EXCLUDE="" |
688 |
#WITHIN_PYTHON_RPM_BUILD= make test TESTOPTS="-u network -x $EXCLUDE" |
689 |
%endif |
690 |
|
691 |
%files |
692 |
%{_bindir}/pydoc |
693 |
%{_bindir}/pydoc%{familyver} |
694 |
%{_bindir}/pydoc%{pybasever} |
695 |
%{_bindir}/python |
696 |
%{_bindir}/python%{familyver} |
697 |
%{_bindir}/python%{pybasever} |
698 |
%{_bindir}/python%{LDVERSION_optimized} |
699 |
%{_bindir}/pyvenv |
700 |
%{_bindir}/pyvenv-%{pybasever} |
701 |
%{_bindir}/2to3 |
702 |
%{_bindir}/2to3-%{pybasever} |
703 |
%{_mandir}/man*/* |
704 |
|
705 |
%files -n %{lib_name}-stdlib |
706 |
%license LICENSE |
707 |
%doc README.rst |
708 |
%{_includedir}/python%{LDVERSION_optimized}/pyconfig-%{__isa_bits}.h |
709 |
%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile |
710 |
%if "%{_lib}" == "lib64" |
711 |
%dir %{_prefix}/lib/python%{pybasever} |
712 |
%dir %{_prefix}/lib/python%{pybasever}/site-packages |
713 |
%dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/ |
714 |
%endif |
715 |
%dir %{pylibdir} |
716 |
%dir %{dynload_dir} |
717 |
%dir %{site_packages} |
718 |
%dir %{site_packages}/__pycache__/ |
719 |
%{site_packages}/README.txt |
720 |
%{pylibdir}/*.py |
721 |
%dir %{pylibdir}/__pycache__/ |
722 |
%{pylibdir}/__pycache__/*%{bytecode_suffixes} |
723 |
|
724 |
%dir %{pylibdir}/unittest/ |
725 |
%dir %{pylibdir}/unittest/__pycache__/ |
726 |
%{pylibdir}/unittest/*.py |
727 |
%{pylibdir}/unittest/__pycache__/*%{bytecode_suffixes} |
728 |
|
729 |
%dir %{pylibdir}/asyncio/ |
730 |
%dir %{pylibdir}/asyncio/__pycache__/ |
731 |
%{pylibdir}/asyncio/*.py |
732 |
%{pylibdir}/asyncio/__pycache__/*%{bytecode_suffixes} |
733 |
|
734 |
%dir %{pylibdir}/venv/ |
735 |
%dir %{pylibdir}/venv/__pycache__/ |
736 |
%{pylibdir}/venv/*.py |
737 |
%{pylibdir}/venv/__pycache__/*%{bytecode_suffixes} |
738 |
%{pylibdir}/venv/scripts |
739 |
|
740 |
%{pylibdir}/wsgiref |
741 |
%{pylibdir}/xml |
742 |
%{pylibdir}/xmlrpc |
743 |
|
744 |
%dir %{pylibdir}/ensurepip/ |
745 |
%dir %{pylibdir}/ensurepip/__pycache__/ |
746 |
%{pylibdir}/ensurepip/*.py |
747 |
%{pylibdir}/ensurepip/__pycache__/*%{bytecode_suffixes} |
748 |
|
749 |
%if %{with rpmwheels} |
750 |
%exclude %{pylibdir}/ensurepip/_bundled |
751 |
%else |
752 |
%dir %{pylibdir}/ensurepip/_bundled |
753 |
%{pylibdir}/ensurepip/_bundled/*.whl |
754 |
%endif |
755 |
|
756 |
%dir %{pylibdir}/concurrent/ |
757 |
%dir %{pylibdir}/concurrent/__pycache__/ |
758 |
%{pylibdir}/concurrent/*.py |
759 |
%{pylibdir}/concurrent/__pycache__/*%{bytecode_suffixes} |
760 |
|
761 |
%dir %{pylibdir}/concurrent/futures/ |
762 |
%dir %{pylibdir}/concurrent/futures/__pycache__/ |
763 |
%{pylibdir}/concurrent/futures/*.py |
764 |
%{pylibdir}/concurrent/futures/__pycache__/*%{bytecode_suffixes} |
765 |
|
766 |
%{pylibdir}/pydoc_data |
767 |
|
768 |
%dir %{pylibdir}/collections/ |
769 |
%dir %{pylibdir}/collections/__pycache__/ |
770 |
%{pylibdir}/collections/*.py |
771 |
%{pylibdir}/collections/__pycache__/*%{bytecode_suffixes} |
772 |
|
773 |
%dir %{pylibdir}/ctypes/ |
774 |
%dir %{pylibdir}/ctypes/__pycache__/ |
775 |
%{pylibdir}/ctypes/*.py |
776 |
%{pylibdir}/ctypes/__pycache__/*%{bytecode_suffixes} |
777 |
%{pylibdir}/ctypes/macholib |
778 |
|
779 |
%{pylibdir}/curses |
780 |
|
781 |
%dir %{pylibdir}/dbm/ |
782 |
%dir %{pylibdir}/dbm/__pycache__/ |
783 |
%{pylibdir}/dbm/*.py |
784 |
%{pylibdir}/dbm/__pycache__/*%{bytecode_suffixes} |
785 |
|
786 |
%dir %{pylibdir}/distutils/ |
787 |
%dir %{pylibdir}/distutils/__pycache__/ |
788 |
%{pylibdir}/distutils/*.py |
789 |
%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes} |
790 |
%{pylibdir}/distutils/README |
791 |
%{pylibdir}/distutils/command |
792 |
|
793 |
%dir %{pylibdir}/email/ |
794 |
%dir %{pylibdir}/email/__pycache__/ |
795 |
%{pylibdir}/email/*.py |
796 |
%{pylibdir}/email/__pycache__/*%{bytecode_suffixes} |
797 |
%{pylibdir}/email/mime |
798 |
%doc %{pylibdir}/email/architecture.rst |
799 |
|
800 |
%{pylibdir}/encodings |
801 |
|
802 |
%{pylibdir}/html |
803 |
%{pylibdir}/http |
804 |
|
805 |
%dir %{pylibdir}/importlib/ |
806 |
%dir %{pylibdir}/importlib/__pycache__/ |
807 |
%{pylibdir}/importlib/*.py |
808 |
%{pylibdir}/importlib/__pycache__/*%{bytecode_suffixes} |
809 |
|
810 |
%dir %{pylibdir}/json/ |
811 |
%dir %{pylibdir}/json/__pycache__/ |
812 |
%{pylibdir}/json/*.py |
813 |
%{pylibdir}/json/__pycache__/*%{bytecode_suffixes} |
814 |
|
815 |
%{pylibdir}/lib2to3 |
816 |
%exclude %{pylibdir}/lib2to3/tests |
817 |
|
818 |
%{pylibdir}/logging |
819 |
%{pylibdir}/multiprocessing |
820 |
|
821 |
%dir %{pylibdir}/sqlite3/ |
822 |
%dir %{pylibdir}/sqlite3/__pycache__/ |
823 |
%{pylibdir}/sqlite3/*.py |
824 |
%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes} |
825 |
|
826 |
%exclude %{pylibdir}/turtle.py |
827 |
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes} |
828 |
|
829 |
%{pylibdir}/urllib |
830 |
|
831 |
%{dynload_dir}/_bisect.%{SOABI_optimized}.so |
832 |
%{dynload_dir}/_bz2.%{SOABI_optimized}.so |
833 |
%{dynload_dir}/_codecs_cn.%{SOABI_optimized}.so |
834 |
%{dynload_dir}/_codecs_hk.%{SOABI_optimized}.so |
835 |
%{dynload_dir}/_codecs_iso2022.%{SOABI_optimized}.so |
836 |
%{dynload_dir}/_codecs_jp.%{SOABI_optimized}.so |
837 |
%{dynload_dir}/_codecs_kr.%{SOABI_optimized}.so |
838 |
%{dynload_dir}/_codecs_tw.%{SOABI_optimized}.so |
839 |
%{dynload_dir}/_contextvars.%{SOABI_optimized}.so |
840 |
%{dynload_dir}/_crypt.%{SOABI_optimized}.so |
841 |
%{dynload_dir}/_csv.%{SOABI_optimized}.so |
842 |
%{dynload_dir}/_ctypes.%{SOABI_optimized}.so |
843 |
%{dynload_dir}/_curses.%{SOABI_optimized}.so |
844 |
%{dynload_dir}/_curses_panel.%{SOABI_optimized}.so |
845 |
%{dynload_dir}/_dbm.%{SOABI_optimized}.so |
846 |
%{dynload_dir}/_decimal.%{SOABI_optimized}.so |
847 |
%{dynload_dir}/_elementtree.%{SOABI_optimized}.so |
848 |
%{dynload_dir}/_gdbm.%{SOABI_optimized}.so |
849 |
%{dynload_dir}/_hashlib.%{SOABI_optimized}.so |
850 |
%{dynload_dir}/_heapq.%{SOABI_optimized}.so |
851 |
%{dynload_dir}/_json.%{SOABI_optimized}.so |
852 |
%{dynload_dir}/_lsprof.%{SOABI_optimized}.so |
853 |
%{dynload_dir}/_lzma.%{SOABI_optimized}.so |
854 |
%{dynload_dir}/_multibytecodec.%{SOABI_optimized}.so |
855 |
%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so |
856 |
%{dynload_dir}/_opcode.%{SOABI_optimized}.so |
857 |
%{dynload_dir}/_pickle.%{SOABI_optimized}.so |
858 |
%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so |
859 |
%{dynload_dir}/_queue.%{SOABI_optimized}.so |
860 |
%{dynload_dir}/_random.%{SOABI_optimized}.so |
861 |
%{dynload_dir}/_socket.%{SOABI_optimized}.so |
862 |
%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so |
863 |
%{dynload_dir}/_ssl.%{SOABI_optimized}.so |
864 |
%{dynload_dir}/_struct.%{SOABI_optimized}.so |
865 |
%{dynload_dir}/_md5.%{SOABI_optimized}.so |
866 |
%{dynload_dir}/_sha1.%{SOABI_optimized}.so |
867 |
%{dynload_dir}/_sha256.%{SOABI_optimized}.so |
868 |
%{dynload_dir}/_sha512.%{SOABI_optimized}.so |
869 |
%{dynload_dir}/array.%{SOABI_optimized}.so |
870 |
%{dynload_dir}/audioop.%{SOABI_optimized}.so |
871 |
%{dynload_dir}/binascii.%{SOABI_optimized}.so |
872 |
%{dynload_dir}/cmath.%{SOABI_optimized}.so |
873 |
%{dynload_dir}/_datetime.%{SOABI_optimized}.so |
874 |
%{dynload_dir}/fcntl.%{SOABI_optimized}.so |
875 |
%{dynload_dir}/grp.%{SOABI_optimized}.so |
876 |
%{dynload_dir}/math.%{SOABI_optimized}.so |
877 |
%{dynload_dir}/mmap.%{SOABI_optimized}.so |
878 |
%{dynload_dir}/nis.%{SOABI_optimized}.so |
879 |
%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so |
880 |
%{dynload_dir}/parser.%{SOABI_optimized}.so |
881 |
%{dynload_dir}/pyexpat.%{SOABI_optimized}.so |
882 |
%{dynload_dir}/readline.%{SOABI_optimized}.so |
883 |
%{dynload_dir}/resource.%{SOABI_optimized}.so |
884 |
%{dynload_dir}/select.%{SOABI_optimized}.so |
885 |
%{dynload_dir}/spwd.%{SOABI_optimized}.so |
886 |
%{dynload_dir}/syslog.%{SOABI_optimized}.so |
887 |
%{dynload_dir}/termios.%{SOABI_optimized}.so |
888 |
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so |
889 |
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so |
890 |
%{dynload_dir}/_uuid.%{SOABI_optimized}.so |
891 |
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so |
892 |
%{dynload_dir}/zlib.%{SOABI_optimized}.so |
893 |
%{dynload_dir}/_asyncio.%{SOABI_optimized}.so |
894 |
%{dynload_dir}/_blake2.%{SOABI_optimized}.so |
895 |
%{dynload_dir}/_sha3.%{SOABI_optimized}.so |
896 |
|
897 |
%files -n %{lib_name}-testsuite |
898 |
%{pylibdir}/ctypes/test |
899 |
%{pylibdir}/distutils/tests |
900 |
%{pylibdir}/lib2to3/tests |
901 |
%{pylibdir}/sqlite3/test |
902 |
%{pylibdir}/test/* |
903 |
%{pylibdir}/unittest/test |
904 |
# These two are shipped in the main subpackage: |
905 |
%exclude %{pylibdir}/test/test_support.py* |
906 |
%exclude %{pylibdir}/test/__init__.py* |
907 |
%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so |
908 |
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so |
909 |
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so |
910 |
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so |
911 |
%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so |
912 |
|
913 |
%files -n %{lib_name} |
914 |
%{_libdir}/libpython%{LDVERSION_optimized}.so.1* |
915 |
|
916 |
%files -n %{develname} |
917 |
%{_bindir}/pathfix.py |
918 |
%{_libdir}/libpython%{LDVERSION_optimized}.so |
919 |
%{_libdir}/libpython%{pybasever}.so |
920 |
%{_libdir}/libpython%{familyver}.so |
921 |
%{_includedir}/python%{LDVERSION_optimized} |
922 |
%exclude %{_includedir}/python%{LDVERSION_optimized}/pyconfig-%{__isa_bits}.h |
923 |
%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu} |
924 |
%{_bindir}/python-config |
925 |
%{_bindir}/python%{pybasever}-config |
926 |
%{_bindir}/python%{LDVERSION_optimized}-config |
927 |
%{_bindir}/python%{familyver}-config |
928 |
%{_libdir}/pkgconfig/python.pc |
929 |
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc |
930 |
%{_libdir}/pkgconfig/python-%{pybasever}.pc |
931 |
%{_libdir}/pkgconfig/python%{familyver}.pc |
932 |
|
933 |
%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile |
934 |
%if %{with valgrind} |
935 |
%{_libdir}/valgrind/valgrind-python3.supp |
936 |
%endif |
937 |
|
938 |
%files docs |
939 |
%doc html/*/* |
940 |
%{_datadir}/applications/%{_real_vendor}-%{name}-docs.desktop |
941 |
|
942 |
%files -n tkinter3 |
943 |
%{pylibdir}/tkinter/ |
944 |
%{dynload_dir}/_tkinter.%{SOABI_optimized}.so |
945 |
%{pylibdir}/idlelib |
946 |
%{site_packages}/pynche |
947 |
%{pylibdir}/turtle.py |
948 |
%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes} |
949 |
%dir %{pylibdir}/turtledemo |
950 |
%{pylibdir}/turtledemo/*.py |
951 |
%{pylibdir}/turtledemo/*.cfg |
952 |
%dir %{pylibdir}/turtledemo/__pycache__/ |
953 |
%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes} |
954 |
|
955 |
%files -n tkinter3-apps |
956 |
%{_bindir}/idle%{familyver} |
957 |
%{_bindir}/idle%{pybasever} |
958 |
%{_bindir}/pynche%{familyver} |
959 |
%{_datadir}/applications/%{_real_vendor}-tkinter3.desktop |
960 |
|
961 |
# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from ldconfig |
962 |
# See https://bugzilla.redhat.com/show_bug.cgi?id=562980 |
963 |
# |
964 |
# The /usr/lib/rpm/redhat/macros defines %%__debug_package to use |
965 |
# debugfiles.list, and it appears that everything below /usr/lib/debug and |
966 |
# (/usr/src/debug) gets added to this file (via LISTFILES) in |
967 |
# /usr/lib/rpm/find-debuginfo.sh |
968 |
# |
969 |
# Hence by installing it below /usr/lib/debug we ensure it is added to the |
970 |
# -debuginfo subpackage |
971 |
# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py |
972 |
# payload file would be unpackaged) |
973 |
|
974 |
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1476593 |
975 |
%undefine _debuginfo_subpackages |