]> git.pld-linux.org Git - packages/python3.git/blobdiff - python3.spec
- use 'share' not 'lib' for platform independent files
[packages/python3.git] / python3.spec
index 686c8ce4d0deea6a86b684d2133d20775fbdb010..694d20f12921dc2884c11c2a8a8761d71f40c52c 100644 (file)
@@ -3,18 +3,18 @@
 %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
 
-# 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
+%define                broken_tests    test_nntplib test_gdb test_site
 
 %define py_ver         3.5
 %define py_abi         %{py_ver}m
@@ -33,24 +33,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.2
+Version:       %{py_ver}.1
+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: e9ea6f2623fffcdd871b7b19113fde80
 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 +209,7 @@ 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}
+%{!?with_info:Obsoletes: python3-doc-info}
 
 %description libs
 Python shared library and very essental modules for Python binary.
@@ -220,9 +224,10 @@ 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}
-Obsoletes:     python3-modules-sqlite
-Obsoletes:     python3-enum
 Provides:      python3-enum
+Obsoletes:     python3-enum
+Obsoletes:     python3-modules-sqlite
+%requires_eq_to        openssl openssl-devel
 
 %description modules
 Python officially distributed modules.
@@ -346,7 +351,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,10 +474,13 @@ 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
@@ -527,11 +535,11 @@ fi
 %{__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 +548,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 +612,13 @@ 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}/plat-*/regen
+%{__rm} $RPM_BUILD_ROOT%{py_libdir}/site-packages/README
 
 # 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_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
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -1247,6 +1256,8 @@ rm -rf $RPM_BUILD_ROOT
 %{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.*
 %{_pkgconfigdir}/python-%{py_ver}.pc
 %{_pkgconfigdir}/python-%{py_abi}.pc
 %{_pkgconfigdir}/python3.pc
@@ -1266,6 +1277,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__
@@ -1288,6 +1300,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
This page took 0.079695 seconds and 4 git commands to generate.