X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=python3.spec;h=be3b221eed8af489af063ba31ac2e95988a6ab7d;hb=bbde3964f186ef4dc9a9e817fc805d095d837dc8;hp=c3bf6d6daf696b751905ce9d2e9e11f93b8aa34e;hpb=bf3ea4a9cf3315facc5de21c77107b1c000858fd;p=packages%2Fpython3.git diff --git a/python3.spec b/python3.spec index c3bf6d6..be3b221 100644 --- a/python3.spec +++ b/python3.spec @@ -9,22 +9,22 @@ %bcond_without optimizations # expensive, stable optimizations (PGO etc.) + LTO # # tests which will not work on 64-bit platforms -%define no64bit_tests test_audioop test_rgbimg test_imageop +%define no64bit_tests -x test_audioop -x test_rgbimg -x test_imageop # tests which may fail because of builder environment limitations (no /proc or /dev/pts) -%define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty test_asyncio test_os test_readline test_normalization +%define nobuilder_tests -x test_resource -x test_openpty -x test_socket -x test_nis -x test_posix -x test_locale -x test_pty -x test_asyncio -x test_os -x test_readline -x test_normalization # tests which fail because of some unknown/unresolved reason (this list should be %{nil}) # test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib... # test_gdb: fails, as the gdb uses old python version # test_time: test_AsTimeval (test.test_time.TestCPyTime), rounding error %ifarch x32 -%define broken_tests_x32 test_time +%define broken_tests_x32 -x test_time %undefine with_optimizations %endif -%define broken_tests test_nntplib test_gdb test_site test_distutils test_bdist_rpm test_ssl %{?broken_tests_x32} +%define broken_tests -x test_embed -x test_nntplib -x test_gdb -x test_site -x test_distutils -x test_bdist_rpm -x test_ssl %{?broken_tests_x32} -%define py_ver 3.7 -%define py_abi %{py_ver}m +%define py_ver 3.8 +%define py_abi %{py_ver} %define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_gnu} %define py_prefix %{_prefix} %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver} @@ -41,20 +41,21 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.0 -Release: 4 +Version: %{py_ver}.6 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: eb8c2a6b1447d50813c02714af4681f3 +# Source0-md5: 69e73c49eeb1a853cefd26d18c9d069d Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch Patch4: %{name}-makefile-location.patch -Patch6: python-distro.patch +Patch5: %{name}-config.patch +Patch6: %{name}-BLDLIBRARY.patch Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch @@ -63,8 +64,8 @@ Patch11: %{name}-installcompile.patch # https://bugs.python.org/file21896/nonexistent_user.patch Patch12: nonexistent_user.patch Patch13: %{name}-no-randomize-tests.patch -# https://github.com/python/cpython/commit/c919252a28f4e9dd326dc2c703b4eee6e247be83.patch -Patch14: %{name}-redundant_declaration.patch +Patch14: python3-profile-tests.patch +Patch15: python3-tests.patch URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -80,8 +81,10 @@ BuildRequires: glibc-localedb-all %endif BuildRequires: gmp-devel >= 4.0 BuildRequires: libffi-devel +BuildRequires: libnsl-devel BuildRequires: libstdc++-devel -%{?with_system_mpdecimal:BuildRequires: mpdecimal-devel >= 2.4.1} +BuildRequires: libtirpc-devel +%{?with_system_mpdecimal:BuildRequires: mpdecimal-devel >= 2.4.2-2} BuildRequires: ncurses-ext-devel >= 5.2 BuildRequires: openssl-devel >= 0.9.7 BuildRequires: pkgconfig @@ -103,9 +106,9 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define specflags_ppc64 -D__ppc64__=1 %if %{with verbose_tests} -%define test_flags -v -x +%define test_flags -v %else -%define test_flags -wW -x +%define test_flags -wW %endif %ifarch alpha ia64 ppc64 sparc64 ppc64 %{x8664} @@ -115,7 +118,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %endif %ifarch sparc -%define test_list %{nobuilder_tests} %{broken_tests} test_fcntl test_ioctl +%define test_list %{nobuilder_tests} %{broken_tests} -x test_fcntl -x test_ioctl %endif %description @@ -239,7 +242,7 @@ Summary: Python modules Summary(pl.UTF-8): Moduły języka Python Group: Libraries/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} -%{?with_system_mpdecimal:Requires: mpdecimal >= 2.4.1} +%{?with_system_mpdecimal:Requires: mpdecimal >= 2.4.2-2} Obsoletes: python3-modules-sqlite %requires_ge_to openssl openssl-devel @@ -488,6 +491,7 @@ Moduły testowe dla Pythona. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 @@ -497,10 +501,11 @@ Moduły testowe dla Pythona. %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 %{__rm} -r Modules/expat -for SUBDIR in darwin libffi_msvc libffi_osx; do +for SUBDIR in darwin libffi_osx; do %{__rm} -r Modules/_ctypes/$SUBDIR/* done @@ -512,6 +517,16 @@ for f in $files; do done %endif +sed -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \ + Tools/gdb/libpython.py \ + Tools/pynche/pynche \ + Tools/pynche/pynche.pyw \ + Tools/scripts/2to3 + +sed -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \ + Tools/scripts/idle3 \ + Tools/scripts/pydoc3 + find . -name '*.py' | xargs -r grep -El '^#! */usr/bin/env python3?' | xargs %{__sed} -i -e '1s,^#! */usr/bin/env python3\?,#!/usr/bin/python3,' %build @@ -545,7 +560,9 @@ fi --with-lto %endif -%{__make} 2>&1 | awk ' +%{__make} \ + TESTOPTS="%{test_list}" \ + 2>&1 | awk ' BEGIN { fail = 0; logmsg = ""; } { if ($0 ~ /\*\*\* WARNING:/) { @@ -569,7 +586,8 @@ install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pkgconfigdir}} \ $RPM_BUILD_ROOT{%{py_sitedir},%{py_sitescriptdir}}/__pycache__ \ $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \ $RPM_BUILD_ROOT{%{_infodir},%{_mandir}/man1} \ - $RPM_BUILD_ROOT/etc/shrc.d + $RPM_BUILD_ROOT/etc/shrc.d \ + $RPM_BUILD_ROOT%{_prefix}/lib/debug/%{_libdir} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT @@ -586,16 +604,20 @@ cp -a Tools $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} %{__rm} $RPM_BUILD_ROOT%{_libdir}/libpython3.so ln -s libpython%{py_abi}.so $RPM_BUILD_ROOT%{_libdir}/libpython3.so +# gdb helper that will end up in -debuginfo package +soname=$(ls -1d $RPM_BUILD_ROOT%{_libdir}/libpython%{py_abi}.so.*.* | sed -e "s#^$RPM_BUILD_ROOT##g") +cp -a Tools/gdb/libpython.py "$RPM_BUILD_ROOT%{_prefix}/lib/debug/$soname-gdb.py" + # # create several useful aliases, such as timeit.py, profile.py, pdb.py, smtpd.py # # for python devel tools for script in timeit profile pdb pstats; do - echo "alias ${script}%{py_ver}.py='python%{py_ver} -m ${script}'" + echo "#alias ${script}%{py_ver}.py='python%{py_ver} -m ${script}'" done > $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-devel.sh -echo "alias pygettext%{py_ver}.py='pygettext%{py_ver}'" \ +echo "#alias pygettext%{py_ver}.py='pygettext%{py_ver}'" \ >> $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-devel.sh sed 's/=/ /' \ @@ -604,7 +626,7 @@ sed 's/=/ /' \ # for python modules for script in smtpd webbrowser; do - echo "alias ${script}%{py_ver}.py='python%{py_ver} -m ${script}'" + echo "#alias ${script}%{py_ver}.py='python%{py_ver} -m ${script}'" done > $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-modules.sh sed 's/=/ /' \ @@ -657,7 +679,9 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/python%{py_ver} +%if "%{py_ver}" != "%{py_abi}" %attr(755,root,root) %{_bindir}/python%{py_abi} +%endif %attr(755,root,root) %{_bindir}/python3 %{_mandir}/man1/python%{py_ver}.1* %{_mandir}/man1/python3.1* @@ -761,8 +785,6 @@ rm -rf $RPM_BUILD_ROOT %files modules %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python*-modules* -%attr(755,root,root) %{_bindir}/pyvenv -%attr(755,root,root) %{_bindir}/pyvenv-%{py_ver} %{py_libdir}/__future__.py %{py_libdir}/__phello__.foo.py %{py_libdir}/_bootlocale.py @@ -828,7 +850,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/inspect.py %{py_libdir}/ipaddress.py %{py_libdir}/lzma.py -%{py_libdir}/macpath.py %{py_libdir}/mailbox.py %{py_libdir}/mailcap.py %{py_libdir}/mimetypes.py @@ -898,6 +919,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/xdrlib.py %{py_libdir}/zipapp.py %{py_libdir}/zipfile.py +%{py_libdir}/zipimport.py %{py_libdir}/__pycache__/__future__.cpython-*.py[co] %{py_libdir}/__pycache__/__phello__.foo.cpython-*.py[co] %{py_libdir}/__pycache__/_bootlocale.cpython-*.py[co] @@ -963,7 +985,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/inspect.cpython-*.py[co] %{py_libdir}/__pycache__/ipaddress.cpython-*.py[co] %{py_libdir}/__pycache__/lzma.cpython-*.py[co] -%{py_libdir}/__pycache__/macpath.cpython-*.py[co] %{py_libdir}/__pycache__/mailbox.cpython-*.py[co] %{py_libdir}/__pycache__/mailcap.cpython-*.py[co] %{py_libdir}/__pycache__/mimetypes.cpython-*.py[co] @@ -1033,6 +1054,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/xdrlib.cpython-*.py[co] %{py_libdir}/__pycache__/zipapp.cpython-*.py[co] %{py_libdir}/__pycache__/zipfile.cpython-*.py[co] +%{py_libdir}/__pycache__/zipimport.cpython-*.py[co] # # list .so modules to be sure that all of them are built @@ -1071,6 +1093,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_multiprocessing.cpython-*.so %attr(755,root,root) %{py_dyndir}/_opcode.cpython-*.so %attr(755,root,root) %{py_dyndir}/_pickle.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_posixshmem.cpython-*.so %attr(755,root,root) %{py_dyndir}/_posixsubprocess.cpython-*.so %attr(755,root,root) %{py_dyndir}/_queue.cpython-*.so %attr(755,root,root) %{py_dyndir}/_random.cpython-*.so @@ -1078,11 +1101,14 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_sha3.cpython-*.so %attr(755,root,root) %{py_dyndir}/_socket.cpython-*.so %attr(755,root,root) %{py_dyndir}/_ssl.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_statistics.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testbuffer.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_testinternalcapi.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testimportmultiple.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testmultiphase.cpython-*.so %attr(755,root,root) %{py_dyndir}/_uuid.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_xxsubinterpreters.cpython-*.so %attr(755,root,root) %{py_dyndir}/_xxtestfuzz.cpython-*.so # for openssl < 0.9.8 package sha256 and sha512 modules @@ -1201,6 +1227,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/venv/*.py %dir %{py_libdir}/venv/scripts %dir %{py_libdir}/venv/scripts/common +%{py_libdir}/venv/scripts/common/Activate.ps1 %{py_libdir}/venv/scripts/common/activate %dir %{py_libdir}/venv/scripts/posix %{py_libdir}/venv/scripts/posix/activate.csh @@ -1262,12 +1289,16 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc Misc/{ACKS,NEWS,README,README.valgrind,valgrind-python.supp} %attr(755,root,root) %{_bindir}/python%{py_ver}-config +%if "%{py_ver}" != "%{py_abi}" %attr(755,root,root) %{_bindir}/python%{py_abi}-config +%endif %attr(755,root,root) %{_bindir}/python3-config %attr(755,root,root) %{_libdir}/libpython%{py_abi}.so %attr(755,root,root) %{_libdir}/libpython3.so %{py_incdir}/*.h %exclude %{py_incdir}/pyconfig.h +%{py_incdir}/cpython +%{py_incdir}/internal %attr(755,root,root) %{py_libdir}/config-%{py_platform}/makesetup %attr(755,root,root) %{py_libdir}/config-%{py_platform}/install-sh %{py_libdir}/config-%{py_platform}/config.c @@ -1277,7 +1308,11 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_libdir}/config-%{py_platform}/__pycache__ %{py_libdir}/config-%{py_platform}/__pycache__/python-config.* %{_pkgconfigdir}/python-%{py_ver}.pc +%{_pkgconfigdir}/python-%{py_ver}-embed.pc +%{_pkgconfigdir}/python3-embed.pc +%if "%{py_ver}" != "%{py_abi}" %{_pkgconfigdir}/python-%{py_abi}.pc +%endif %{_pkgconfigdir}/python3.pc %files devel-tools