%bcond_without tkinter # disables tkinter module building
%bcond_without tests # disables Python testing
%bcond_with verbose_tests # runs tests in verbose mode
-%bcond_with openssl097
+%bcond_with openssl097 # build for openssl < 0.9.8
#
# 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_urllib2
# tests which fail because of some unknown/unresolved reason (this list should be ideally just %{nil})
-%define broken_tests test_doctest test_pydoc test_distutils
+%define broken_tests test_doctest test_pydoc test_distutils test_gdb
%define beta %{nil}
Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili
Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом
Name: python
-Version: %{py_ver}.10
-Release: 6.3
+Version: %{py_ver}.15
+Release: 4
Epoch: 1
License: PSF
Group: Development/Languages/Python
-Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}%{beta}.tar.xz
-# Source0-md5: c685ef0b8e9f27b5e3db5db12b268ac6
-Source1: http://www.python.org/ftp/python/doc/%{dver}/%{name}-%{dver}-docs-html.tar.bz2
-# Source1-md5: 545fef39b52b15641f6936c623150c63
+Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}%{beta}.tar.xz
+# Source0-md5: a80ae3cc478460b922242f43a1b4094d
+Source1: https://www.python.org/ftp/python/doc/%{dver}/%{name}-%{dver}-docs-html.tar.bz2
+# Source1-md5: e82bf965f5c6da914fb060640310e080
Source2: pyconfig.h.in
Patch0: %{name}-db.patch
Patch1: %{name}-pythonpath.patch
Patch6: %{name}-DNStests.patch
Patch7: %{name}-install_prefix.patch
Patch8: %{name}-bdist_rpm.patch
-URL: http://www.python.org/
+# https://bugs.python.org/issue10496
+Patch9: https://bugs.python.org/file21896/nonexistent_user.patch
+# Patch9-md5: db706fbe6de467c6e4c97c675eddf29a
+URL: https://www.python.org/
BuildRequires: autoconf >= 2.65
BuildRequires: automake
BuildRequires: bluez-libs-devel
%patch6 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p1
tar xjf %{SOURCE1}
}
END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }'
-LC_ALL=C
-export LC_ALL
%if %{with tests}
+LC_ALL=C.UTF-8 \
WITHIN_PYTHON_RPM_BUILD=1 %{__make} -j1 test \
TESTOPTS="%{test_flags} %{test_list}" \
TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:`pwd`/Lib/lib-tk:`pwd`/build/lib.linux-`uname -m`-%{py_ver} ./python -tt"
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}} \
$RPM_BUILD_ROOT{%{py_sitedir},%{_mandir}/man1} \
+ $RPM_BUILD_ROOT%{_prefix}/local/%{_lib}/python%{py_ver}/site-packages \
$RPM_BUILD_ROOT%{py_sitescriptdir} \
$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
$RPM_BUILD_ROOT%{_infodir} \
for script in smtpd webbrowser; do
echo alias $script.py=\"python -m ${script}\"
done > $RPM_BUILD_ROOT/etc/shrc.d/python-modules.sh
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/smtpd.py
sed 's/=/ /' \
< $RPM_BUILD_ROOT/etc/shrc.d/python-modules.sh \
> $RPM_BUILD_ROOT/etc/shrc.d/python-modules.csh
# just to cut the noise, as they are not packaged (now)
-%{__rm} -r $RPM_BUILD_ROOT%{py_libdir}/plat-*/regen
+%{__rm} $RPM_BUILD_ROOT%{py_libdir}/ctypes/macholib/fetch_macholib
+%{__rm} $RPM_BUILD_ROOT%{py_libdir}/distutils/command/command_template
+%{__rm} $RPM_BUILD_ROOT%{py_libdir}/distutils/command/wininst-*.exe
%{__rm} -r $RPM_BUILD_ROOT%{py_libdir}/idlelib/idle_test
+%{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/ChangeLog
+%{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/help.html
+%{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/idle.pyw
+%{__rm} -r $RPM_BUILD_ROOT%{py_libdir}/plat-*/regen
+# packaged as %doc
+%{__rm} $RPM_BUILD_ROOT%{py_libdir}/pdb.doc
find $RPM_BUILD_ROOT%{py_libdir} -name \*.bat -exec rm {} \;
find $RPM_BUILD_ROOT%{py_libdir} -name \*.txt -exec rm {} \;
find $RPM_BUILD_ROOT%{py_libdir} -name README\* -exec rm {} \;
-mv $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config/pyconfig.h
+%{__mv} $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config/pyconfig.h
sed -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g' %{SOURCE2} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h
%clean
%files modules
%defattr(644,root,root,755)
%doc Lib/pdb.doc
-/etc/shrc.d/python-modules*
+%config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python-modules*
%exclude %{py_libdir}/_abcoll.py[co]
%exclude %{py_libdir}/abc.py[co]
%exclude %{py_libdir}/UserDict.py[co]
%dir %{py_sitescriptdir}
%dir %{py_sitedir}
+# for locally installed packages
+%dir %{_prefix}/local/%{_lib}/python%{py_ver}/site-packages
+
# shared modules required by python library
%attr(755,root,root) %{py_dyndir}/_struct.so
%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) %{py_dyndir}/_hotshot.so
%dir %{py_libdir}/hotshot