X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=python3.spec;h=3da5ed6b3c1dcdd438d7b8c9034c9786ebb0ba60;hb=5d4906318e56be0bf7cf8a348787c983b19cadb7;hp=d0c442a852d6e7cfe17b28a0924149526ff0d6fb;hpb=c7fcbc4e0d06ff058fb1d0ee497f01ecd5a40a5a;p=packages%2Fpython3.git diff --git a/python3.spec b/python3.spec index d0c442a..3da5ed6 100644 --- a/python3.spec +++ b/python3.spec @@ -3,21 +3,26 @@ %bcond_with info # info pages (requires emacs) %bcond_without system_mpdecimal # system libmpdec library %bcond_without tkinter # disables tkinter module building -%bcond_with tests # disables Python testing +%bcond_without tests # disables Python testing %bcond_with verbose_tests # runs tests in verbose mode # # 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 +%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 empty) +# 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_httpservers test_distutils test_cmd_line test_pydoc test_telnetlib test_zlib 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_ssl %{?broken_tests_x32} -%define py_ver 3.5 +%define py_ver 3.6 %define py_abi %{py_ver}m +%define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_gnu} %define py_prefix %{_prefix} %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver} %define py_incdir %{_includedir}/python%{py_abi} @@ -33,24 +38,28 @@ 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: 6.3 +Version: %{py_ver}.5 +Release: 3 Epoch: 1 License: PSF -Group: Applications -Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: d149d2812f10cbe04c042232e7964171 +Group: Development/Languages/Python +Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz +# Source0-md5: 9f49654a4d6f733ff3284ab9d227e9fd 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 -Patch5: python3-atomic.patch Patch6: python-distro.patch Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch -URL: http://www.python.org/ +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 +URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake BuildRequires: bluez-libs-devel @@ -205,7 +214,9 @@ Group: Libraries/Python Provides: python(abi) = %{py_ver} # for compatibility with existing Ac packages Provides: python(bytecode) = %{py_ver} -%{!?with_info:Obsoletes: python3-doc-info} +Provides: python3-enum +Obsoletes: python3-enum +%{!?with_info:Obsoletes: python3-doc-info} %description libs Python shared library and very essental modules for Python binary. @@ -221,8 +232,7 @@ Group: Libraries/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} %{?with_system_mpdecimal:Requires: mpdecimal >= 2.4.1} Obsoletes: python3-modules-sqlite -Obsoletes: python3-enum -Provides: python3-enum +%requires_ge_to openssl openssl-devel %description modules Python officially distributed modules. @@ -346,7 +356,7 @@ debugger. %package 2to3 Summary: Automated Python 2 to 3 code translation Summary(pl.UTF-8): Automatyczne tłumaczenie kodu Pythona 2 do 3 -Group: Development/Languages/Pythona +Group: Development/Languages/Python %description 2to3 2to3 is a Python program that reads Python 2.x source code and applies @@ -469,15 +479,18 @@ Moduły testowe dla Pythona. %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 %{__rm} -r Modules/zlib %{__rm} -r Modules/expat -for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx; do +for SUBDIR in darwin libffi libffi_msvc libffi_osx; do %{__rm} -r Modules/_ctypes/$SUBDIR/* done @@ -510,28 +523,24 @@ 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 -%endif + --with-threads %{__make} 2>&1 | awk ' BEGIN { fail = 0; logmsg = ""; } { - if ($0 ~ /\*\*\* WARNING:/) { - fail = 1; - logmsg = logmsg $0; - } - print $0; + if ($0 ~ /\*\*\* WARNING:/) { + fail = 1; + logmsg = logmsg $0; + } + print $0; } END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }' @@ -540,7 +549,7 @@ 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 -%{__make} test \ +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" %endif @@ -604,12 +613,12 @@ install -p Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext%{py_ver} install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ver} # just to cut the noise, as they are not packaged (now) -%{__rm} $RPM_BUILD_ROOT%{py_libdir}/plat-*/regen %{__rm} $RPM_BUILD_ROOT%{py_libdir}/ctypes/macholib/fetch_macholib* -%{__rm} $RPM_BUILD_ROOT%{py_libdir}/site-packages/README %{__rm} $RPM_BUILD_ROOT%{py_libdir}/distutils/command/wininst*.exe %{__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.txt # currently provided by python-2to3, consider switching to this one %{__rm} $RPM_BUILD_ROOT%{_bindir}/2to3 @@ -621,8 +630,8 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve # already in %%doc %{__rm} $RPM_BUILD_ROOT%{py_libdir}/LICENSE.txt -mv $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config-%{py_abi}/pyconfig.h -sed -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g;s#@PY_ABI@#%{py_abi}#g' %{SOURCE1} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h +%{__mv} $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config-%{py_platform}/pyconfig.h +%{__sed} -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g;s#@PY_ABI@#%{py_platform}#g' %{SOURCE1} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h %clean rm -rf $RPM_BUILD_ROOT @@ -667,12 +676,13 @@ rm -rf $RPM_BUILD_ROOT # modules required by python library %{py_libdir}/_collections_abc.py %{py_libdir}/_sitebuiltins.py -%{py_libdir}/_sysconfigdata.py +%{py_libdir}/_sysconfigdata_*.py %{py_libdir}/_weakrefset.py %{py_libdir}/abc.py %{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 @@ -680,6 +690,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 @@ -695,13 +706,14 @@ rm -rf $RPM_BUILD_ROOT # needed by the dynamic sys.lib patch %{py_libdir}/types.py %{py_libdir}/__pycache__/_sitebuiltins.cpython-*.py[co] -%{py_libdir}/__pycache__/_sysconfigdata.cpython-*.py[co] +%{py_libdir}/__pycache__/_sysconfigdata_*.cpython-*.py[co] %{py_libdir}/__pycache__/_weakrefset.cpython-*.py[co] %{py_libdir}/__pycache__/abc.cpython-*.py[co] %{py_libdir}/__pycache__/bisect.cpython-*.py[co] %{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] @@ -709,6 +721,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] @@ -730,16 +743,16 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/encodings/__pycache__ %{py_libdir}/encodings/*.py -%dir %{py_libdir}/config-%{py_abi} -%{py_libdir}/config-%{py_abi}/Makefile -%{py_libdir}/config-%{py_abi}/Setup -%{py_libdir}/config-%{py_abi}/Setup.config -%{py_libdir}/config-%{py_abi}/Setup.local -%{py_libdir}/config-%{py_abi}/pyconfig.h +%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 @@ -785,7 +798,6 @@ rm -rf $RPM_BUILD_ROOT %{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 @@ -817,7 +829,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 @@ -836,6 +847,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/random.py %{py_libdir}/rlcompleter.py %{py_libdir}/runpy.py +%{py_libdir}/secrets.py %{py_libdir}/signal.py %{py_libdir}/sched.py %{py_libdir}/selectors.py @@ -919,7 +931,6 @@ rm -rf $RPM_BUILD_ROOT %{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] @@ -951,7 +962,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] @@ -971,6 +981,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/rlcompleter.cpython-*.py[co] %{py_libdir}/__pycache__/runpy.cpython-*.py[co] %{py_libdir}/__pycache__/sched.cpython-*.py[co] +%{py_libdir}/__pycache__/secrets.cpython-*.py[co] %{py_libdir}/__pycache__/selectors.cpython-*.py[co] %{py_libdir}/__pycache__/shelve.cpython-*.py[co] %{py_libdir}/__pycache__/shlex.cpython-*.py[co] @@ -1015,7 +1026,9 @@ rm -rf $RPM_BUILD_ROOT # list .so modules to be sure that all of them are built # +%attr(755,root,root) %{py_dyndir}/_asyncio.cpython-*.so %attr(755,root,root) %{py_dyndir}/_bisect.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_blake2.cpython-*.so %attr(755,root,root) %{py_dyndir}/_bz2.cpython-*.so %attr(755,root,root) %{py_dyndir}/_codecs_cn.cpython-*.so %attr(755,root,root) %{py_dyndir}/_codecs_hk.cpython-*.so @@ -1048,6 +1061,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_posixsubprocess.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 %attr(755,root,root) %{py_dyndir}/_socket.cpython-*.so %attr(755,root,root) %{py_dyndir}/_ssl.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testbuffer.cpython-*.so @@ -1082,10 +1096,6 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/unicodedata.cpython-*.so %attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so -%dir %{py_libdir}/plat-* -%{py_libdir}/plat-*/__pycache__ -%{py_libdir}/plat-*/*.py - %dir %{py_libdir}/asyncio %{py_libdir}/asyncio/__pycache__ %{py_libdir}/asyncio/*.py @@ -1174,8 +1184,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 @@ -1211,7 +1222,7 @@ rm -rf $RPM_BUILD_ROOT %files -n pydoc3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/pydoc3 -%attr(755,root,root) %{_bindir}/pydoc3.5 +%attr(755,root,root) %{_bindir}/pydoc%{py_ver} %{py_libdir}/pydoc.py %{py_libdir}/__pycache__/pydoc.cpython-*.py[co] %dir %{py_libdir}/pydoc_data @@ -1222,7 +1233,7 @@ rm -rf $RPM_BUILD_ROOT %files -n idle3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/idle3 -%attr(755,root,root) %{_bindir}/idle3.5 +%attr(755,root,root) %{_bindir}/idle%{py_ver} %dir %{py_libdir}/idlelib/Icons %{py_libdir}/idlelib/__pycache__ %{py_libdir}/idlelib/*.py @@ -1241,21 +1252,21 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libpython3.so %{py_incdir}/*.h %exclude %{py_incdir}/pyconfig.h -%attr(755,root,root) %{py_libdir}/config-%{py_abi}/makesetup -%attr(755,root,root) %{py_libdir}/config-%{py_abi}/install-sh -%{py_libdir}/config-%{py_abi}/config.c -%{py_libdir}/config-%{py_abi}/config.c.in -%{py_libdir}/config-%{py_abi}/python.o -%{py_libdir}/config-%{py_abi}/python-config.py -%dir %{py_libdir}/config-%{py_abi}/__pycache__ -%{py_libdir}/config-%{py_abi}/__pycache__/python-config.* +%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 +%{py_libdir}/config-%{py_platform}/config.c.in +%{py_libdir}/config-%{py_platform}/python.o +%{py_libdir}/config-%{py_platform}/python-config.py +%dir %{py_libdir}/config-%{py_platform}/__pycache__ +%{py_libdir}/config-%{py_platform}/__pycache__/python-config.* %{_pkgconfigdir}/python-%{py_ver}.pc %{_pkgconfigdir}/python-%{py_abi}.pc %{_pkgconfigdir}/python3.pc %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 @@ -1268,6 +1279,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/timeit.cpython-*.py[co] %files 2to3 +%defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/2to3-%{py_ver} %dir %{py_libdir}/lib2to3 %{py_libdir}/lib2to3/__pycache__ @@ -1290,6 +1302,7 @@ rm -rf $RPM_BUILD_ROOT %{_examplesdir}/%{name}-%{version} %files test +%defattr(644,root,root,755) %{py_libdir}/idlelib/idle_test %{py_libdir}/test %{py_libdir}/ctypes/test