X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=python3.spec;h=2f1076683773f5d41f5a25a383d21676f1f33276;hb=d47b1d9ad9da6c856ccce3d101714efd1d595e1c;hp=4f828d5b7e1c7c04f0475c779a73cedc1fe5f85c;hpb=9ee43785fae03eec39ed82a1cafdad85fda13848;p=packages%2Fpython3.git diff --git a/python3.spec b/python3.spec index 4f828d5..2f10766 100644 --- a/python3.spec +++ b/python3.spec @@ -5,18 +5,23 @@ %bcond_without tkinter # disables tkinter module building %bcond_without tests # disables Python testing %bcond_with verbose_tests # runs tests in verbose mode +%bcond_without optimizations # optimitations # # tests which will not work on 64-bit platforms %define no64bit_tests test_audioop test_rgbimg 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 +%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 # 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 -%define broken_tests test_nntplib test_gdb test_site +# test_time: test_AsTimeval (test.test_time.TestCPyTime), rounding error +%ifarch x32 +%define broken_tests_x32 test_time +%endif +%define broken_tests test_nntplib test_gdb test_site test_distutils test_bdist_rpm test_ssl %{?broken_tests_x32} -%define py_ver 3.6 +%define py_ver 3.7 %define py_abi %{py_ver}m %define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_gnu} %define py_prefix %{_prefix} @@ -40,7 +45,7 @@ Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 82b143ebbf4514d7e05876bed7a6b1f5 +# Source0-md5: eb8c2a6b1447d50813c02714af4681f3 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -53,8 +58,9 @@ Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch Patch10: %{name}-bdist_rpm.patch Patch11: %{name}-installcompile.patch -Patch12: https://bugs.python.org/file21896/nonexistent_user.patch -# Patch12-md5: db706fbe6de467c6e4c97c675eddf29a +# https://bugs.python.org/file21896/nonexistent_user.patch +Patch12: nonexistent_user.patch +Patch13: python3-no-randomize-tests.patch URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -92,7 +98,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %if %{with verbose_tests} %define test_flags -v -x %else -%define test_flags -w -x +%define test_flags -wW -x %endif %ifarch alpha ia64 ppc64 sparc64 ppc64 %{x8664} @@ -210,6 +216,8 @@ Group: Libraries/Python Provides: python(abi) = %{py_ver} # for compatibility with existing Ac packages Provides: python(bytecode) = %{py_ver} +Provides: python3-enum +Obsoletes: python3-enum %{!?with_info:Obsoletes: python3-doc-info} %description libs @@ -225,8 +233,6 @@ 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} -Provides: python3-enum -Obsoletes: python3-enum Obsoletes: python3-modules-sqlite %requires_ge_to openssl openssl-devel @@ -482,11 +488,11 @@ Moduły testowe dla Pythona. %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 -%{__rm} -r Modules/zlib %{__rm} -r Modules/expat -for SUBDIR in darwin libffi libffi_msvc libffi_osx; do +for SUBDIR in darwin libffi_msvc libffi_osx; do %{__rm} -r Modules/_ctypes/$SUBDIR/* done @@ -519,18 +525,16 @@ fi --enable-ipv6 \ --enable-shared \ --with-computed-gotos \ - --with-dbmliborder=gdbm:bdb \ + --with-dbmliborder=gdbm:ndbm:bdb \ --with-doc-strings \ --without-ensurepip \ - --with-fpectl \ %{?with_debug:--with-pydebug} \ - --with-signal-module \ --with-system-expat \ --with-system-ffi \ %{?with_system_mpdecimal:--with-system-libmpdec} \ - --with-threads \ -%ifarch %{ix86} %{x8664} ppc ppc64 - --with-tsc +%if %{with optimizations} + --enable-optimizations \ + --with-lto %endif %{__make} 2>&1 | awk ' @@ -544,14 +548,11 @@ BEGIN { fail = 0; logmsg = ""; } } END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }' -LC_ALL=C +LC_ALL=C.UTF-8 export LC_ALL %if %{with tests} -binlibdir=`echo build/lib.*` -# -l and -j don't go together! and -j is brought up by Tools/scripts/run_tests.py -WITHIN_PYTHON_RPM_BUILD=1 %{__make} test \ - TESTOPTS="%{test_flags} %{test_list}" \ - TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:`pwd`/$binlibdir ./python -tt" +WITHIN_PYTHON_RPM_BUILD=1 %{__make} -j1 test \ + TESTOPTS="%{test_flags} %{test_list}" %endif %install @@ -618,7 +619,7 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.bat %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.pyw %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/help.html -%{__rm} $RPM_BUILD_ROOT%{py_libdir}/site-packages/README +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/site-packages/README.txt # currently provided by python-2to3, consider switching to this one %{__rm} $RPM_BUILD_ROOT%{_bindir}/2to3 @@ -682,6 +683,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/bisect.py %{py_libdir}/codecs.py %{py_libdir}/copyreg.py +%{py_libdir}/enum.py %{py_libdir}/functools.py %{py_libdir}/genericpath.py %{py_libdir}/heapq.py @@ -689,6 +691,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/linecache.py %{py_libdir}/locale.py %{py_libdir}/io.py +%{py_libdir}/operator.py %{py_libdir}/posixpath.py %{py_libdir}/re.py %{py_libdir}/reprlib.py @@ -711,6 +714,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/codecs.cpython-*.py[co] %{py_libdir}/__pycache__/_collections_abc.cpython-*.py[co] %{py_libdir}/__pycache__/copyreg.cpython-*.py[co] +%{py_libdir}/__pycache__/enum.cpython-*.py[co] %{py_libdir}/__pycache__/functools.cpython-*.py[co] %{py_libdir}/__pycache__/genericpath.cpython-*.py[co] %{py_libdir}/__pycache__/heapq.cpython-*.py[co] @@ -718,6 +722,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/linecache.cpython-*.py[co] %{py_libdir}/__pycache__/locale.cpython-*.py[co] %{py_libdir}/__pycache__/io.cpython-*.py[co] +%{py_libdir}/__pycache__/operator.cpython-*.py[co] %{py_libdir}/__pycache__/posixpath.cpython-*.py[co] %{py_libdir}/__pycache__/re.cpython-*.py[co] %{py_libdir}/__pycache__/reprlib.cpython-*.py[co] @@ -742,13 +747,12 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_libdir}/config-%{py_platform} %{py_libdir}/config-%{py_platform}/Makefile %{py_libdir}/config-%{py_platform}/Setup -%{py_libdir}/config-%{py_platform}/Setup.config %{py_libdir}/config-%{py_platform}/Setup.local %{py_libdir}/config-%{py_platform}/pyconfig.h %files modules %defattr(644,root,root,755) -/etc/shrc.d/python*-modules* +%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 @@ -760,6 +764,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/_markupbase.py %{py_libdir}/_osx_support.py %{py_libdir}/_pydecimal.py +%{py_libdir}/_py_abc.py %{py_libdir}/_pyio.py %{py_libdir}/_strptime.py %{py_libdir}/_threading_local.py @@ -785,16 +790,17 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/compileall.py %{py_libdir}/configparser.py %{py_libdir}/contextlib.py +%{py_libdir}/contextvars.py %{py_libdir}/copy.py %{py_libdir}/crypt.py %{py_libdir}/csv.py +%{py_libdir}/dataclasses.py %{py_libdir}/datetime.py %{py_libdir}/decimal.py %{py_libdir}/difflib.py %{py_libdir}/dis.py %{py_libdir}/doctest.py %{py_libdir}/dummy_threading.py -%{py_libdir}/enum.py %{py_libdir}/filecmp.py %{py_libdir}/fileinput.py %{py_libdir}/fnmatch.py @@ -815,7 +821,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/ipaddress.py %{py_libdir}/lzma.py %{py_libdir}/macpath.py -%{py_libdir}/macurl2path.py %{py_libdir}/mailbox.py %{py_libdir}/mailcap.py %{py_libdir}/mimetypes.py @@ -826,7 +831,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/nturl2path.py %{py_libdir}/numbers.py %{py_libdir}/opcode.py -%{py_libdir}/operator.py %{py_libdir}/optparse.py %{py_libdir}/pathlib.py %{py_libdir}/pickle.py @@ -895,6 +899,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/_markupbase.cpython-*.py[co] %{py_libdir}/__pycache__/_osx_support.cpython-*.py[co] %{py_libdir}/__pycache__/_pydecimal.cpython-*.py[co] +%{py_libdir}/__pycache__/_py_abc.cpython-*.py[co] %{py_libdir}/__pycache__/_pyio.cpython-*.py[co] %{py_libdir}/__pycache__/_strptime.cpython-*.py[co] %{py_libdir}/__pycache__/_threading_local.cpython-*.py[co] @@ -914,6 +919,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/cgitb.cpython-*.py[co] %{py_libdir}/__pycache__/chunk.cpython-*.py[co] %{py_libdir}/__pycache__/cmd.cpython-*.py[co] +%{py_libdir}/__pycache__/contextvars.cpython-*.py[co] %{py_libdir}/__pycache__/code.cpython-*.py[co] %{py_libdir}/__pycache__/codeop.cpython-*.py[co] %{py_libdir}/__pycache__/colorsys.cpython-*.py[co] @@ -923,13 +929,13 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/copy.cpython-*.py[co] %{py_libdir}/__pycache__/crypt.cpython-*.py[co] %{py_libdir}/__pycache__/csv.cpython-*.py[co] +%{py_libdir}/__pycache__/dataclasses.cpython-*.py[co] %{py_libdir}/__pycache__/datetime.cpython-*.py[co] %{py_libdir}/__pycache__/decimal.cpython-*.py[co] %{py_libdir}/__pycache__/difflib.cpython-*.py[co] %{py_libdir}/__pycache__/dis.cpython-*.py[co] %{py_libdir}/__pycache__/doctest.cpython-*.py[co] %{py_libdir}/__pycache__/dummy_threading.cpython-*.py[co] -%{py_libdir}/__pycache__/enum.cpython-*.py[co] %{py_libdir}/__pycache__/filecmp.cpython-*.py[co] %{py_libdir}/__pycache__/fileinput.cpython-*.py[co] %{py_libdir}/__pycache__/fnmatch.cpython-*.py[co] @@ -950,7 +956,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/ipaddress.cpython-*.py[co] %{py_libdir}/__pycache__/lzma.cpython-*.py[co] %{py_libdir}/__pycache__/macpath.cpython-*.py[co] -%{py_libdir}/__pycache__/macurl2path.cpython-*.py[co] %{py_libdir}/__pycache__/mailbox.cpython-*.py[co] %{py_libdir}/__pycache__/mailcap.cpython-*.py[co] %{py_libdir}/__pycache__/mimetypes.cpython-*.py[co] @@ -961,7 +966,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/nturl2path.cpython-*.py[co] %{py_libdir}/__pycache__/numbers.cpython-*.py[co] %{py_libdir}/__pycache__/opcode.cpython-*.py[co] -%{py_libdir}/__pycache__/operator.cpython-*.py[co] %{py_libdir}/__pycache__/optparse.cpython-*.py[co] %{py_libdir}/__pycache__/pathlib.cpython-*.py[co] %{py_libdir}/__pycache__/pickle.cpython-*.py[co] @@ -1036,6 +1040,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_codecs_jp.cpython-*.so %attr(755,root,root) %{py_dyndir}/_codecs_kr.cpython-*.so %attr(755,root,root) %{py_dyndir}/_codecs_tw.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_contextvars.cpython-*.so %attr(755,root,root) %{py_dyndir}/_crypt.cpython-*.so %attr(755,root,root) %{py_dyndir}/_csv.cpython-*.so %attr(755,root,root) %{py_dyndir}/_ctypes*.cpython-*.so @@ -1059,6 +1064,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_opcode.cpython-*.so %attr(755,root,root) %{py_dyndir}/_pickle.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 %attr(755,root,root) %{py_dyndir}/_sha1.cpython-*.so %attr(755,root,root) %{py_dyndir}/_sha3.cpython-*.so @@ -1068,6 +1074,8 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_testcapi.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}/_xxtestfuzz.cpython-*.so # for openssl < 0.9.8 package sha256 and sha512 modules %if "%{pld_release}" != "ac" @@ -1184,8 +1192,9 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/venv/__pycache__ %{py_libdir}/venv/*.py %dir %{py_libdir}/venv/scripts +%dir %{py_libdir}/venv/scripts/common +%{py_libdir}/venv/scripts/common/activate %dir %{py_libdir}/venv/scripts/posix -%{py_libdir}/venv/scripts/posix/activate %{py_libdir}/venv/scripts/posix/activate.csh %{py_libdir}/venv/scripts/posix/activate.fish @@ -1265,7 +1274,7 @@ rm -rf $RPM_BUILD_ROOT %files devel-tools %defattr(644,root,root,755) -/etc/shrc.d/python*-devel* +%config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python*-devel* %attr(755,root,root) %{_bindir}/pygettext%{py_ver} %attr(755,root,root) %{_bindir}/pyreindent%{py_ver} %{py_libdir}/pdb.py