2006-12-19 00:17:38 +01:00
#
2011-02-17 18:32:10 +01:00
# spec file for package python-doc
2006-12-19 00:17:38 +01:00
#
2018-01-02 16:34:11 +01:00
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
2006-12-19 00:17:38 +01:00
#
2008-08-08 02:47:35 +02:00
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2018-09-27 16:11:14 +02:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2006-12-19 00:17:38 +01:00
#
2016-06-30 12:50:57 +02:00
2006-12-19 00:17:38 +01:00
Name : python-doc
2018-05-22 10:06:13 +02:00
Version : 2.7.15
2011-12-08 14:04:48 +01:00
Release : 0
Summary : Additional Package Documentation for Python
2013-07-08 15:12:23 +02:00
License : Python-2.0
2006-12-19 00:17:38 +01:00
Group : Development/Languages/Python
2013-07-08 15:12:23 +02:00
Url : http://www.python.org/
2013-11-21 16:55:48 +01:00
%define tarname Python-%{version}
2013-06-03 17:40:08 +02:00
Source0 : %{tarname} .tar.xz
2013-06-04 15:31:26 +02:00
# docs for current version are regenerated every day
# this messes with autobuild "file changed" checks
#Source2: http://docs.python.org/%{version}/archives/python-%{pyver}-docs-pdf-a4.tar.bz2
#Source3: http://docs.python.org/%{version}/archives/python-%{pyver}-docs-pdf-letter.tar.bz2
2013-11-21 16:55:48 +01:00
Source2 : python-%{version} -docs-pdf-a4.tar.bz2
Source3 : python-%{version} -docs-pdf-letter.tar.bz2
2014-12-15 16:06:19 +01:00
BuildRequires : python-Sphinx
2013-06-03 17:40:08 +02:00
BuildRequires : xz
2012-04-17 16:57:13 +02:00
# COMMON-PATCH-BEGIN
Patch1 : python-2.7-dirs.patch
Patch2 : python-distutils-rpm-8.patch
2013-06-03 17:40:08 +02:00
Patch3 : python-2.7.5-multilib.patch
2012-04-17 16:57:13 +02:00
Patch4 : python-2.5.1-sqlite.patch
2013-05-09 18:15:40 +02:00
Patch5 : python-2.7.4-canonicalize2.patch
2012-04-17 16:57:13 +02:00
Patch7 : python-2.6-gettext-plurals.patch
Patch8 : python-2.6b3-curses-panel.patch
Patch10 : sparc_longdouble.patch
Patch13 : python-2.7.2-fix_date_time_compiler.patch
Patch17 : remove-static-libpython.diff
2012-08-06 18:21:50 +02:00
# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar@opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle.
Patch20 : python-bundle-lang.patch
2014-12-22 17:49:53 +01:00
# PATCH-FIX-UPSTREAM Fix argument passing in libffi for aarch64
Patch22 : python-2.7-libffi-aarch64.patch
2013-07-15 10:03:24 +02:00
Patch24 : python-bsddb6.diff
2015-02-25 17:42:06 +01:00
# PATCH-FIX-UPSTREAM accept directory-based CA paths as well
Patch33 : python-2.7.9-ssl_ca_path.patch
2015-05-21 15:58:17 +02:00
# PATCH-FEATURE-SLE disable SSL verification-by-default in http clients
Patch34 : python-2.7.9-sles-disable-verification-by-default.patch
2018-05-22 10:06:13 +02:00
# PATCH-FIX-UPSTREAM do not use non-ASCII filename in test_ssl.py
Patch35 : do-not-use-non-ascii-in-test_ssl.patch
2017-03-24 18:13:29 +01:00
# PATCH-FIX-UPSTREAM bmwiedemann@suse.de -- allow python packages to build reproducibly
Patch38 : reproducible.patch
2018-02-02 13:44:43 +01:00
# bypass boo#1078485 random failing tests
Patch40 : python-skip_random_failing_tests.patch
2018-02-20 14:42:29 +01:00
# PATCH-FIX-UPSTREAM sorted tar https://github.com/python/cpython/pull/2263
Patch41 : python-sorted_tar.patch
2018-10-26 14:53:54 +02:00
# https://github.com/python/cpython/pull/8771
Patch42 : openssl-111.patch
2018-09-27 16:11:14 +02:00
# PATCH-FIX-UPSTREAM CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch mcepl@suse.com
# Suggested in https://github.com/python/cpython/commit/add531a1e55b.patch
2018-10-26 14:53:54 +02:00
Patch43 : CVE-2018-1000802-shutil_use_subprocess_no_spawn.patch
2012-04-17 16:57:13 +02:00
# COMMON-PATCH-END
2011-12-08 14:04:48 +01:00
Provides : pyth_doc
Provides : pyth_ps
Obsoletes : pyth_doc
Obsoletes : pyth_ps
BuildRoot : %{_tmppath} /%{name} -%{version} -build
BuildArch : noarch
2013-11-21 16:55:48 +01:00
Enhances: python = %{version}
2016-12-02 16:37:55 +01:00
Provides : python2-doc = %{version}
2006-12-19 00:17:38 +01:00
%description
Tutorial, Global Module Index, Language Reference, Library Reference,
Extending and Embedding Reference, Python/C API Reference, Documenting
Python, and Macintosh Module Reference in HTML format.
%package pdf
Summary : Python PDF Documentation
Group : Development/Languages/Python
2011-12-08 14:04:48 +01:00
Provides : pyth_pdf
Obsoletes : pyth_pdf
2016-12-02 16:37:55 +01:00
Provides : python2-doc-pdf = %{version}
2006-12-19 00:17:38 +01:00
%description pdf
Tutorial, Global Module Index, Language Reference, Library Reference,
Extending and Embedding Reference, Python/C API Reference, Documenting
Python, and Macintosh Module Reference in PDF format.
%prep
%setup -q -n %{tarname}
2012-04-17 16:57:13 +02:00
# COMMON-PREP-BEGIN
%patch1 -p1
%patch2 -p1
2013-06-03 12:24:54 +02:00
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch7 -p1
%patch8 -p1
2012-04-17 16:57:13 +02:00
%patch10 -p1
2013-06-03 12:24:54 +02:00
%patch13 -p1
%patch17 -p1
2012-08-06 18:21:50 +02:00
%patch20 -p1
2013-06-03 17:40:08 +02:00
%patch22 -p1
2013-08-16 13:26:52 +02:00
%patch24 -p1
2015-02-25 17:42:06 +01:00
%patch33 -p1
2015-09-14 17:36:31 +02:00
%if %{suse_version} == 1315 && !0%{?is_opensuse}
2015-05-21 15:58:17 +02:00
%patch34 -p1
%endif
2015-09-10 16:02:25 +02:00
%patch35 -p1
2017-03-24 18:13:29 +01:00
%patch38 -p1
2018-02-02 13:44:43 +01:00
%ifarch ppc ppc64 ppc64le
%patch40 -p1
%endif
2018-02-20 14:42:29 +01:00
%patch41 -p1
2018-09-27 16:11:14 +02:00
%patch42 -p1
2018-10-26 14:53:54 +02:00
%patch43 -p1
2013-05-09 18:15:40 +02:00
# drop Autoconf version requirement
sed -i 's/^version_required/dnl version_required/' configure.ac
2012-04-17 16:57:13 +02:00
# COMMON-PREP-END
2006-12-19 00:17:38 +01:00
%build
2014-12-17 14:10:23 +01:00
TODAY_DATE=`date -r %{S:0} " + % B % d , % Y " `
# TODO use not date of tarball but date of latest patch
2014-12-15 16:06:19 +01:00
pushd Doc
2014-12-17 14:10:23 +01:00
sed -i " s / ^ t o d a y = . * / t o d a y = ' $ T O D A Y _ D A T E ' / " conf.py
%if 0%{?suse_version} < 1320
# lower sphinx version requirement, docs seem to work fine with 1.1
sed -i " s / ^ n e e d s _ s p h i n x = . * / n e e d s _ s p h i n x = ' 1 . 1 ' / " conf.py
%endif
2014-12-15 16:06:19 +01:00
make html
popd
2006-12-19 00:17:38 +01:00
%install
2011-12-08 14:04:48 +01:00
export PDOCS=%{buildroot} %{_docdir} /python
2006-12-19 00:17:38 +01:00
install -d -m 755 $PDOCS/Misc
2014-12-15 16:06:19 +01:00
rm Doc/build/html/.buildinfo
mv Doc/build/html $PDOCS/html
2011-12-08 14:04:48 +01:00
tar xfj %{SOURCE2} -C $PDOCS
2009-03-11 16:45:20 +01:00
mv $PDOCS/docs-pdf $PDOCS/paper-a4
2011-12-08 14:04:48 +01:00
tar xfj %{SOURCE3} -C $PDOCS
2009-03-11 16:45:20 +01:00
mv $PDOCS/docs-pdf $PDOCS/paper-letter
2013-05-09 18:15:40 +02:00
# this is part of main package
#install -c -m 644 README $PDOCS/README
2006-12-19 00:17:38 +01:00
for i in Misc/* ; do
2011-12-08 14:04:48 +01:00
[ -f $i ] && install -c -m 644 $i $PDOCS/Misc/
2006-12-19 00:17:38 +01:00
done
%files
2011-12-08 14:04:48 +01:00
%defattr (644,root,root,755)
%dir %{_docdir} /python
%doc %{_docdir} /python/Misc
%doc %{_docdir} /python/html
2013-05-09 18:15:40 +02:00
#%doc %{_docdir}/python/README
2006-12-19 00:17:38 +01:00
%files pdf
2011-12-08 14:04:48 +01:00
%defattr (644,root,root,755)
%doc %{_docdir} /python/paper-a4
%doc %{_docdir} /python/paper-letter
2008-03-11 17:57:23 +01:00
2007-03-23 21:32:32 +01:00
%changelog