Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates-src > by-pkgid > ed2fedcf28b75a74432db6ae2151de01 > files > 23

python3-3.5.3-1.2.mga6.src.rpm

# NOTES ON BOOTSTRAPING PYTHON 3.5:
#
# Due to dependency cycle between Python, pip, setuptools and
# wheel caused by the rewheel patch, one has to build in the
# following order:
#
# 1) python3 with with_rewheel set to 0
# 2) python3-setuptools and python3-pip with with_rewheel set to 0
# 3) python3-wheel
# 4) python3-setuptools and python3-pip with with_rewheel set to 1
# 5) python3 with with_rewheel set to 1

%define docver  3.5.3
%define dirver  3.5
%define familyver 3
%define pyshortver 35

%define lib_major       %{dirver}
%define lib_name_orig   libpython%{familyver}
%define lib_name        %mklibname python %{lib_major}
%define develname       %mklibname python3 -d

%ifarch %{ix86} x86_64 ppc
%bcond_without  valgrind
%else
%bcond_with     valgrind
%endif

%define with_rewheel 1

# Some defines to ease files list
%define pylibdir %{_libdir}/python%{dirver}
%define dynload_dir %{pylibdir}/lib-dynload
%define site_packages %{pylibdir}/site-packages
%define ABIFLAGS_optimized m
%define LDVERSION_optimized %{dirver}%{ABIFLAGS_optimized}
%define SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{_arch}-linux%{_gnu}
%define bytecode_suffixes .cpython-%{pyshortver}*.py?

# We want to byte-compile the .py files within the packages using the new
# python3 binary.
#
# Unfortunately, rpmbuild's infrastructure requires us to jump through some
# hoops to avoid byte-compiling with the system python 2 version:
#   /usr/lib/rpm/mageia/macros sets up build policy that (amongst other things)
# defines __os_install_post.  In particular, "brp-python-bytecompile" is
# invoked without an argument thus using the wrong version of python
# (/usr/bin/python, rather than the freshly built python), thus leading to
# numerous syntax errors, and incorrect magic numbers in the .pyc files.  We
# thus remove the invocation of brp-python-bytecompile, whilst keeping the
# invocation of brp-python-hardlink (since this should still work for python3
# pyc/pyo files)
%define _python_bytecompile_build 0


Summary:        An interpreted, interactive object-oriented programming language
Name:           python3
Version:        3.5.3
%define subrel	2
Release:        %mkrel 1
License:        Modified CNRI Open Source License
Group:          Development/Python

Source:         https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
Source1:        https://docs.python.org/%{dirver}/archives/python-%{docver}-docs-html.tar.bz2

Patch0:         python3-3.5.2-module-linkage.patch
Patch1:         python3-3.5.2-fdr-lib64.patch
Patch2:         python3-3.5.2-fdr-lib64-fix-for-test_install.patch
Patch3:         python3-3.5.2-no-static-lib.patch
Patch4:         python3-3.5.2-more-configuration-flags.patch
Patch5:         python3-3.5.2-disable-tests-in-test_io.patch
Patch6:         python3-3.5.2-add-rpmbuild-hooks-to-unittest.patch
Patch7:         python3-3.5.2-skip-distutils-tests-that-fail-in-rpmbuild.patch
Patch10:        python3-3.5.2-uid-gid-overflows.patch
Patch11:        python3-3.5.2-disable-test_fs_holes-in-rpm-build.patch
Patch12:        python3-3.5.2-disable-parts-of-test_socket-in-rpm-build.patch
Patch13:        python3-3.5.2-dont-duplicate-flags-in-sysconfig.patch
Patch15:        python3-3.5.2-dont-raise-from-py_compile.patch
%if 0%{with_rewheel}
Patch16:        python3-3.5.2-add-rewheel-module.patch
%endif
Patch17:        python3-3.5.2-distutils-init.patch
Patch18:        python3-3.5.2-make-libpl-respect-lib64.patch
Patch19:        python3-3.5.2-remove-hf-from-arm-triplet.patch
# (philippem) fix pip version:
Patch200:       python3-3.5.2-pip-version.patch
# (kekepower) Fix python3-config --ldflags whitespace
Patch201:       python3-3.5.3-python3-config-LIBPLUSED-cmp0004-error.patch
# from upstream 

Patch500:	python3-3.5.3-CVE-2017-1000158.patch

URL:            http://www.python.org/
Conflicts:      tkinter3 < %{version}
Conflicts:      %{lib_name}-devel < 3.5
Conflicts:      %{develname} < 3.5
Requires:       %{lib_name} = %{version}-%{release}
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  blt
BuildRequires:  db-devel
BuildRequires:  expat-devel
BuildRequires:  gdbm-devel
BuildRequires:  gmp-devel
BuildRequires:  libffi-devel
BuildRequires:  ncursesw-devel
BuildRequires:  openssl-devel
BuildRequires:  readline-devel
BuildRequires:  termcap-devel
BuildRequires:  tcl
BuildRequires:  tcl-devel
BuildRequires:  tk
BuildRequires:  tk-devel
BuildRequires:  autoconf
BuildRequires:  bzip2-devel
BuildRequires:  sqlite3-devel
BuildRequires:  pkgconfig(liblzma)
# uncomment once the emacs part no longer conflict with python 2.X
#BuildRequires: emacs
#BuildRequires: emacs-bin
%if %{with valgrind}
BuildRequires:  valgrind-devel
%endif
%if 0%{?with_rewheel}
BuildRequires:  python3-setuptools
BuildRequires:  python3-pip
%endif
Provides:       python(abi) = %{dirver}
Provides:       /usr/bin/python%{LDVERSION_optimized}
Provides:       /usr/bin/python%{dirver}
Requires:       python-rpm-macros
Requires:       python3-rpm-macros


%description
Python is an interpreted, interactive, object-oriented programming
language often compared to Tcl, Perl, Scheme or Java. Python includes
modules, classes, exceptions, very high level dynamic data types and
dynamic typing. Python supports interfaces to many system calls and
libraries, as well as to various windowing systems (X11, Motif, Tk,
Mac and MFC).

Programmers can write new built-in modules for Python in C or C++.
Python can be used as an extension language for applications that
need a programmable interface. This package contains most of the
standard Python modules, as well as modules for interfacing to the
Tix widget set for Tk and RPM.

Note that documentation for Python is provided in the python-docs
package.


%package -n     %{lib_name}
Summary:        Shared libraries for Python %{version}
Group:          System/Libraries
Requires:       %{lib_name}-stdlib = %{version}-%{release}

%description -n %{lib_name}
This packages contains Python shared object library.  Python is an
interpreted, interactive, object-oriented programming language often
compared to Tcl, Perl, Scheme or Java.


%package -n     %{lib_name}-stdlib
Summary:        Python %{version} standard library
Group:          Development/Python
Conflicts:      python3 < 3.5.1-14
%if 0%{with_rewheel}
Requires:       python3-setuptools
Requires:       python3-pip
%endif

%description -n %{lib_name}-stdlib
This package contains Python 2.7's standard library. 
It is normally not used on its own, but as a dependency of Python %{version}. 


%package -n     %{lib_name}-testsuite
Summary:        Testsuite for the Python %{version} standard library
Group:          Development/Python
Conflicts:      python3 < 3.5.1-14
Conflicts:      %{develname} < 3.5.1-14
Requires:       %{lib_name}-stdlib = %{version}-%{release}
Requires:       %{lib_name} = %{version}-%{release}
Recommends:     tkinter3

%description -n %{lib_name}-testsuite
The complete testsuite for the Python standard library.
It is normally not used on its own, but as a dependency of Python %{version}. 


%package -n     %{develname}
Summary:        The libraries and header files needed for Python development
Group:          Development/Python
Requires:       %{name} = %version
Requires:       %{lib_name} = %{version}-%{release}
Provides:       %{name}-devel = %{version}-%{release}
Provides:       %{lib_name_orig}-devel = %{version}-%{release}
Obsoletes:      %{_lib}python3.1-devel < %{version}
Obsoletes:      %{_lib}python3.2-devel < %{version}
Obsoletes:      %{_lib}python3.3-devel < %{version}
Recommends:     %{lib_name}-testsuite
Recommends:     %{name}-docs

%description -n %{develname}
The Python programming language's interpreter can be extended with
dynamically loaded extensions and can be embedded in other programs.
This package contains the header files and libraries needed to do
these types of tasks.

Install %{develname} if you want to develop Python extensions.  The
python package will also need to be installed.  You'll probably also
want to install the python-docs package, which contains Python
documentation.


%package        docs
Summary:        Documentation for the Python programming language
Requires:       %{name} = %{version}
Requires:       xdg-utils
Group:          Development/Python
BuildArch:      noarch

%description    docs
The python-docs package contains documentation on the Python
programming language and interpreter.  The documentation is provided
in ASCII text files and in LaTeX source files.

Install the python-docs package if you'd like to use the documentation
for the Python language.


%package -n     tkinter3
Summary:        A graphical user interface for the Python scripting language
Group:          Development/Python
Requires:       %{name} = %{version}-%{release}
Requires:       tcl tk
Provides:       python3-tkinter
Conflicts:      python3 < 3.5.1-14

%description -n tkinter3
The Tkinter (Tk interface) program is an graphical user interface for
the Python scripting language.

You should install the tkinter package if you'd like to use a graphical
user interface for Python programming.


%package -n     tkinter3-apps
Summary:        Various applications written using tkinter
Group:          Development/Python
Requires:       tkinter3

%description -n tkinter3-apps
Various applications written using tkinter


%prep
%setup -qn Python-%{version}
%patch0 -p1

%if "%{_lib}" == "lib64"
%patch1 -p1
%patch2 -p1
%endif

%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch15 -p1

%if 0%{with_rewheel}
%patch16 -p1
%endif
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch200 -p1
%patch201 -p1
%patch500 -p1
# drop Autoconf version requirement
sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac

# docs
mkdir html
bzcat %{SOURCE1} | tar x  -C html

find . -type f -print0 | xargs -0 perl -p -i -e 's@/usr/local/bin/python@/usr/bin/python3@'

%build
rm -f Modules/Setup.local

export OPT="%{optflags} -g"

# to fix curses module build
# https://bugs.mageia.org/show_bug.cgi?id=6702
export CFLAGS="%{optflags} -I/usr/include/ncursesw"
export CPPFLAGS="%{optflags} -I/usr/include/ncursesw"

autoreconf -vfi
# Remove -Wl,--no-undefined in accordance with MGA #9395 :
# https://bugs.mageia.org/show_bug.cgi?id=9395
%define _disable_ld_no_undefined 1
%configure2_5x  --with-threads \
                --enable-ipv6 \
                --with-dbmliborder=gdbm \
                --with-system-expat \
                --with-system-ffi \
                --enable-shared \
                --without-ensurepip \
%if %{with valgrind}
                --with-valgrind
%endif

# fix build
#perl -pi -e 's/^(LDFLAGS=.*)/$1 -lstdc++/' Makefile
# (misc) if the home is nfs mounted, rmdir fails due to delay
export TMP="/tmp" TMPDIR="/tmp"
#%make LN="ln -sf"
make EXTRA_CFLAGS="$CFLAGS" LN="ln -sf"

%install
mkdir -p %{buildroot}%{site_packages}/__pycache__
mkdir -p %{buildroot}%{pylibdir}/__pycache__

%if "%{_lib}" == "lib64"
mkdir -p %{buildroot}%{_prefix}/lib/python%{dirver}/site-packages
mkdir -p %{buildroot}%{_prefix}/lib/python%{dirver}/site-packages/__pycache__
%endif

# fix Makefile to get rid of reference to distcc
perl -pi -e "/^CC=/ and s/distcc/gcc/" Makefile

# set the install path
echo '[install_scripts]' >setup.cfg
echo 'install_dir='"${RPM_BUILD_ROOT}/usr/bin" >>setup.cfg

# python is not GNU and does not know fsstd
mkdir -p %{buildroot}%{_mandir}
%makeinstall_std LN="ln -sf"

# overwrite the copied binary with a link
pushd %{buildroot}%{_bindir}
ln -sf python%{LDVERSION_optimized} python%{dirver}
ln -sf python%{dirver} python%{familyver}
popd

(cd %{buildroot}%{_libdir}; ln -sf `ls libpython%{lib_major}*.so.*` libpython%{lib_major}.so)

# fix files conflicting with python2.6
mv %{buildroot}/%{_bindir}/2to3 %{buildroot}/%{_bindir}/python3-2to3


# install pynche as pynche3
cat << EOF > %{buildroot}%{_bindir}/pynche3
#!/bin/bash
exec %{_libdir}/python%{dirver}/site-packages/pynche/pynche
EOF
rm -f Tools/pynche/*.pyw
cp -r Tools/pynche %{buildroot}%{_libdir}/python%{dirver}/site-packages/

chmod 755 %{buildroot}%{_bindir}/{idle3,pynche3}

ln -f Tools/pynche/README Tools/pynche/README.pynche

%if %{with valgrind}
install Misc/valgrind-python.supp -D %{buildroot}%{_libdir}/valgrind/valgrind-python3.supp
%endif

mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-tkinter3.desktop << EOF
[Desktop Entry]
Name=IDLE
Comment=IDE for Python3
Exec=%{_bindir}/idle3
Icon=development_environment_section
Terminal=false
Type=Application
Categories=Development;IDE;
EOF


cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}-docs.desktop << EOF
[Desktop Entry]
Name=Python documentation
Comment=Python complete reference
Exec=%{_bindir}/xdg-open %_defaultdocdir/%{name}-docs/index.html
Icon=documentation_section
Terminal=false
Type=Application
Categories=Documentation;
EOF


# fix non real scripts
#chmod 644 %{buildroot}%{_libdir}/python*/test/test_{binascii,grp,htmlparser}.py*
find %{buildroot} -type f \( -name "test_binascii.py*" -o -name "test_grp.py*" -o -name "test_htmlparser.py*" \) -exec chmod 644 {} \;
# fix python library not stripped
chmod u+w %{buildroot}%{_libdir}/libpython%{lib_major}*.so.1.0 $RPM_BUILD_ROOT%{_libdir}/libpython3.so


%multiarch_includes %{buildroot}/usr/include/python*/pyconfig.h


# Switch shebangs to refer to Python3.
find %{buildroot} -type f -print0 | xargs -0 perl -p -i -e 's@/usr/bin/env python@/usr/bin/python3@'

# Remove shebang lines from .py files that aren't executable, and
# remove executability from .py files that don't have a shebang line:
find %{buildroot} -name \*.py \
  \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \
  -print -exec sed -i '1d' {} \; \) -o \( \
  -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \
  -exec chmod a-x {} \; \) \)

# .xpm and .xbm files should not be executable:
find %{buildroot} \
  \( -name \*.xbm -o -name \*.xpm -o -name \*.xpm.1 \) \
  -exec chmod a-x {} \;

# Get rid of DOS batch files:
find %{buildroot} -name \*.bat -exec rm {} \;

# Get rid of backup files:
find %{buildroot}/ -name "*~" -exec rm -f {} \;
find . -name "*~" -exec rm -f {} \;
rm -f %{buildroot}%{pylibdir}/LICENSE.txt


%check
# (misc) if the home is nfs mounted, rmdir fails
export TMP="/tmp" TMPDIR="/tmp"

# Exclude some tests that hangs on the BS
EXCLUDE="test_ssl test_socket"
%ifarch x86_64
EXCLUDE="$EXCLUDE test_faulthandler"
%endif
%ifarch %arm
EXCLUDE="$EXCLUDE test_float test_asyncio test_cmath"
%endif
# json test pass on local build but fail on BS
EXCLUDE="$EXCLUDE test_json"

# all tests must pass
# but we disable network on BS
WITHIN_PYTHON_RPM_BUILD= make test TESTOPTS="-j1 -u none -x $EXCLUDE"
# consider use network on local build
#EXCLUDE=""
#WITHIN_PYTHON_RPM_BUILD= make test TESTOPTS="-u network -x $EXCLUDE"


%files
%{_bindir}/pydoc%{familyver}
%{_bindir}/pydoc%{dirver}
%{_bindir}/python%{familyver}
%{_bindir}/python%{dirver}
%{_bindir}/python%{LDVERSION_optimized}
%{_bindir}/pyvenv
%{_bindir}/pyvenv-%{dirver}
%{_bindir}/2to3-%{dirver}
%{_bindir}/python3-2to3
%{_mandir}/man*/*


%files -n %{lib_name}-stdlib
%license LICENSE
%{_includedir}/python%{LDVERSION_optimized}/pyconfig.h
%multiarch %{multiarch_includedir}/python%{LDVERSION_optimized}/pyconfig.h
%{pylibdir}/config-%{LDVERSION_optimized}/Makefile
%if "%{_lib}" == "lib64"
%dir %{_prefix}/lib/python%{dirver}
%dir %{_prefix}/lib/python%{dirver}/site-packages
%dir %{_prefix}/lib/python%{dirver}/site-packages/__pycache__/
%endif
%dir %{pylibdir}
%dir %{dynload_dir}
%dir %{site_packages}
%dir %{site_packages}/__pycache__/
%{site_packages}/README
%{pylibdir}/*.py
%dir %{pylibdir}/__pycache__/
%{pylibdir}/__pycache__/*%{bytecode_suffixes}

%dir %{pylibdir}/unittest/
%dir %{pylibdir}/unittest/__pycache__/
%{pylibdir}/unittest/*.py
%{pylibdir}/unittest/__pycache__/*%{bytecode_suffixes}

%dir %{pylibdir}/asyncio/
%dir %{pylibdir}/asyncio/__pycache__/
%{pylibdir}/asyncio/*.py
%{pylibdir}/asyncio/__pycache__/*%{bytecode_suffixes}

%dir %{pylibdir}/venv/
%dir %{pylibdir}/venv/__pycache__/
%{pylibdir}/venv/*.py
%{pylibdir}/venv/__pycache__/*%{bytecode_suffixes}
%{pylibdir}/venv/scripts

%{pylibdir}/wsgiref
%{pylibdir}/xml
%{pylibdir}/xmlrpc

%dir %{pylibdir}/ensurepip/
%dir %{pylibdir}/ensurepip/__pycache__/
%{pylibdir}/ensurepip/*.py
%{pylibdir}/ensurepip/__pycache__/*%{bytecode_suffixes}
%exclude %{pylibdir}/ensurepip/_bundled

%if 0%{?with_rewheel}
%dir %{pylibdir}/ensurepip/rewheel/
%dir %{pylibdir}/ensurepip/rewheel/__pycache__/
%{pylibdir}/ensurepip/rewheel/*.py
%{pylibdir}/ensurepip/rewheel/__pycache__/*%{bytecode_suffixes}
%endif

%dir %{pylibdir}/concurrent/
%dir %{pylibdir}/concurrent/__pycache__/
%{pylibdir}/concurrent/*.py
%{pylibdir}/concurrent/__pycache__/*%{bytecode_suffixes}

%dir %{pylibdir}/concurrent/futures/
%dir %{pylibdir}/concurrent/futures/__pycache__/
%{pylibdir}/concurrent/futures/*.py
%{pylibdir}/concurrent/futures/__pycache__/*%{bytecode_suffixes}

%{pylibdir}/pydoc_data

%dir %{pylibdir}/collections/
%dir %{pylibdir}/collections/__pycache__/
%{pylibdir}/collections/*.py
%{pylibdir}/collections/__pycache__/*%{bytecode_suffixes}

%dir %{pylibdir}/ctypes/
%dir %{pylibdir}/ctypes/__pycache__/
%{pylibdir}/ctypes/*.py
%{pylibdir}/ctypes/__pycache__/*%{bytecode_suffixes}
%{pylibdir}/ctypes/macholib

%{pylibdir}/curses

%dir %{pylibdir}/dbm/
%dir %{pylibdir}/dbm/__pycache__/
%{pylibdir}/dbm/*.py
%{pylibdir}/dbm/__pycache__/*%{bytecode_suffixes}

%dir %{pylibdir}/distutils/
%dir %{pylibdir}/distutils/__pycache__/
%{pylibdir}/distutils/*.py
%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes}
%{pylibdir}/distutils/README
%{pylibdir}/distutils/command

%dir %{pylibdir}/email/
%dir %{pylibdir}/email/__pycache__/
%{pylibdir}/email/*.py
%{pylibdir}/email/__pycache__/*%{bytecode_suffixes}
%{pylibdir}/email/mime
%doc %{pylibdir}/email/architecture.rst

%{pylibdir}/encodings

%{pylibdir}/html
%{pylibdir}/http

%dir %{pylibdir}/importlib/
%dir %{pylibdir}/importlib/__pycache__/
%{pylibdir}/importlib/*.py
%{pylibdir}/importlib/__pycache__/*%{bytecode_suffixes}

%dir %{pylibdir}/json/
%dir %{pylibdir}/json/__pycache__/
%{pylibdir}/json/*.py
%{pylibdir}/json/__pycache__/*%{bytecode_suffixes}

%{pylibdir}/lib2to3
%exclude %{pylibdir}/lib2to3/tests

%{pylibdir}/logging
%{pylibdir}/multiprocessing
%{pylibdir}/plat-linux

%dir %{pylibdir}/sqlite3/
%dir %{pylibdir}/sqlite3/__pycache__/
%{pylibdir}/sqlite3/*.py
%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes}

%exclude %{pylibdir}/turtle.py
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}

%{pylibdir}/urllib


%{dynload_dir}/_bisect.%{SOABI_optimized}.so
%{dynload_dir}/_bz2.%{SOABI_optimized}.so
%{dynload_dir}/_codecs_cn.%{SOABI_optimized}.so
%{dynload_dir}/_codecs_hk.%{SOABI_optimized}.so
%{dynload_dir}/_codecs_iso2022.%{SOABI_optimized}.so
%{dynload_dir}/_codecs_jp.%{SOABI_optimized}.so
%{dynload_dir}/_codecs_kr.%{SOABI_optimized}.so
%{dynload_dir}/_codecs_tw.%{SOABI_optimized}.so
%{dynload_dir}/_crypt.%{SOABI_optimized}.so
%{dynload_dir}/_csv.%{SOABI_optimized}.so
%{dynload_dir}/_ctypes.%{SOABI_optimized}.so
%{dynload_dir}/_curses.%{SOABI_optimized}.so
%{dynload_dir}/_curses_panel.%{SOABI_optimized}.so
%{dynload_dir}/_dbm.%{SOABI_optimized}.so
%{dynload_dir}/_decimal.%{SOABI_optimized}.so
%{dynload_dir}/_elementtree.%{SOABI_optimized}.so
%{dynload_dir}/_gdbm.%{SOABI_optimized}.so
%{dynload_dir}/_hashlib.%{SOABI_optimized}.so
%{dynload_dir}/_heapq.%{SOABI_optimized}.so
%{dynload_dir}/_json.%{SOABI_optimized}.so
%{dynload_dir}/_lsprof.%{SOABI_optimized}.so
%{dynload_dir}/_lzma.%{SOABI_optimized}.so
%{dynload_dir}/_multibytecodec.%{SOABI_optimized}.so
%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so
%{dynload_dir}/_opcode.%{SOABI_optimized}.so
%{dynload_dir}/_pickle.%{SOABI_optimized}.so
%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so
%{dynload_dir}/_random.%{SOABI_optimized}.so
%{dynload_dir}/_socket.%{SOABI_optimized}.so
%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so
%{dynload_dir}/_ssl.%{SOABI_optimized}.so
%{dynload_dir}/_struct.%{SOABI_optimized}.so
%{dynload_dir}/_md5.%{SOABI_optimized}.so
%{dynload_dir}/_sha1.%{SOABI_optimized}.so
%{dynload_dir}/_sha256.%{SOABI_optimized}.so
%{dynload_dir}/_sha512.%{SOABI_optimized}.so
%{dynload_dir}/array.%{SOABI_optimized}.so
%{dynload_dir}/audioop.%{SOABI_optimized}.so
%{dynload_dir}/binascii.%{SOABI_optimized}.so
%{dynload_dir}/cmath.%{SOABI_optimized}.so
%{dynload_dir}/_datetime.%{SOABI_optimized}.so
%{dynload_dir}/fcntl.%{SOABI_optimized}.so
%{dynload_dir}/grp.%{SOABI_optimized}.so
%{dynload_dir}/math.%{SOABI_optimized}.so
%{dynload_dir}/mmap.%{SOABI_optimized}.so
%{dynload_dir}/nis.%{SOABI_optimized}.so
%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so
%{dynload_dir}/parser.%{SOABI_optimized}.so
%{dynload_dir}/pyexpat.%{SOABI_optimized}.so
%{dynload_dir}/readline.%{SOABI_optimized}.so
%{dynload_dir}/resource.%{SOABI_optimized}.so
%{dynload_dir}/select.%{SOABI_optimized}.so
%{dynload_dir}/spwd.%{SOABI_optimized}.so
%{dynload_dir}/syslog.%{SOABI_optimized}.so
%{dynload_dir}/termios.%{SOABI_optimized}.so
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
%{dynload_dir}/zlib.%{SOABI_optimized}.so


%files -n %{lib_name}-testsuite
%{pylibdir}/ctypes/test
%{pylibdir}/distutils/tests
%{pylibdir}/lib2to3/tests
%{pylibdir}/sqlite3/test
%{pylibdir}/test/*
%{pylibdir}/unittest/test
# These two are shipped in the main subpackage:
%exclude %{pylibdir}/test/test_support.py*
%exclude %{pylibdir}/test/__init__.py*
%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so


%files -n %{lib_name}
%{_libdir}/libpython%{LDVERSION_optimized}.so.1*


%files -n %{develname}
%{_libdir}/libpython%{LDVERSION_optimized}.so
%{_libdir}/libpython%{dirver}.so
%{_libdir}/libpython%{familyver}.so
%{_includedir}/python%{LDVERSION_optimized}
%{pylibdir}/config-%{LDVERSION_optimized}
%{_bindir}/python%{dirver}-config
%{_bindir}/python%{LDVERSION_optimized}-config
%{_bindir}/python%{familyver}-config
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
%{_libdir}/pkgconfig/python-%{dirver}.pc
%{_libdir}/pkgconfig/python%{familyver}.pc

%exclude %{_includedir}/python%{LDVERSION_optimized}/pyconfig.h
%exclude %{pylibdir}/config-%{LDVERSION_optimized}/Makefile
%if %{with valgrind}
%{_libdir}/valgrind/valgrind-python3.supp
%endif


%files docs
%doc html/*/*
%{_datadir}/applications/%{_real_vendor}-%{name}-docs.desktop


%files -n tkinter3
%{pylibdir}/tkinter/
%{dynload_dir}/_tkinter.%{SOABI_optimized}.so
%{pylibdir}/idlelib
%{site_packages}/pynche
%{pylibdir}/turtle.py
%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
%dir %{pylibdir}/turtledemo
%{pylibdir}/turtledemo/*.py
%{pylibdir}/turtledemo/*.cfg
%dir %{pylibdir}/turtledemo/__pycache__/
%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes}


%files -n tkinter3-apps
%{_bindir}/idle%{familyver}
%{_bindir}/idle%{dirver}
%{_bindir}/pynche%{familyver}
%{_datadir}/applications/%{_real_vendor}-tkinter3.desktop


%changelog
* Fri Feb 23 2018 kekepower <kekepower> 3.5.3-1.2.mga6
+ Revision: 1204289
- Added a patch for an error with python3-config --ldflags
- See https://bugs.python.org/issue32914

  + luigiwalser <luigiwalser>
    - add patch from ubuntu to fix CVE-2017-1000158
    - fix patch 16

* Sat Jan 28 2017 philippem <philippem> 3.5.3-1.mga6
+ Revision: 1083841
- update to 3.5.3

* Wed Sep 07 2016 neoclust <neoclust> 3.5.2-4.mga6
+ Revision: 1050299
- Submit to release

* Sat Aug 13 2016 philippem <philippem> 3.5.2-3.mga6
+ Revision: 1046401
- fix CVE-2016-1000110

* Wed Jul 06 2016 tmb <tmb> 3.5.2-2.mga6
+ Revision: 1039105
- submit to release

* Sun Jul 03 2016 philippem <philippem> 3.5.2-1.mga6
+ Revision: 1038565
- update to 3.5.2

* Tue Jun 21 2016 philippem <philippem> 3.5.1-15.mga6
+ Revision: 1037113
- improve patch for zipimporter (mga#18691)

* Sun Jun 19 2016 philippem <philippem> 3.5.1-14.mga6
+ Revision: 1036801
- update conflicts, add conflicts for testsuite and devel
- fix CVE-2016-0772 mga#18691

* Sun Jun 12 2016 philippem <philippem> 3.5.1-12.mga6
+ Revision: 1021228
- fix heap overflow in zipimporter module mga#18691

* Mon Jun 06 2016 tv <tv> 3.5.1-11.mga6
+ Revision: 1020343
- unbloat installation:
  o remove recommends on tkinter-apps
  o move recommends on python-doc in devel package

* Sun Jun 05 2016 philippem <philippem> 3.5.1-10.mga6
+ Revision: 1020248
- fix armv7hl build, remove hf from arm triplet (change patch from Fedora)

* Sat Jun 04 2016 philippem <philippem> 3.5.1-9.mga6
+ Revision: 1020239
- fix armv7hl build, remove hf from arm triplet (patch from Fedora)

* Fri Jun 03 2016 philippem <philippem> 3.5.1-8.mga6
+ Revision: 1020190
- remove idlelib from stdlib, it is in tkinter3
- split in sub packages (mga#18561)

  + ovitters <ovitters>
    - undo accidental changelog inclusion
    - reenable tests

* Thu Mar 03 2016 umeabot <umeabot> 3.5.1-7.mga6
+ Revision: 983963
- Rebuild for openssl

* Tue Mar 01 2016 ovitters <ovitters> 3.5.1-6.mga6
+ Revision: 981719
- rebuild for new openssl

* Sat Feb 27 2016 philippem <philippem> 3.5.1-5.mga6
+ Revision: 980083
- remove macros now in python-rpm-macros
- remove wrong patch add-mga-support.patch
- remove macros now in python-rpm-macros
- fix test on pip version

  + tv <tv>
    - patch 200: make platform supports Mageia

  + umeabot <umeabot>
    - Mageia 6 Mass Rebuild

* Wed Dec 09 2015 philippem <philippem> 3.5.1-2.mga6
+ Revision: 909004
- exclude test_asyncio test_cmath on arm

* Tue Dec 08 2015 philippem <philippem> 3.5.1-1.mga6
+ Revision: 908868
- update to 3.5.1

* Tue Oct 13 2015 philippem <philippem> 3.5.0-5.mga6
+ Revision: 890256
- fix upstream issue 25150, mga#16951

* Sat Oct 03 2015 tv <tv> 3.5.0-4.mga6
+ Revision: 885886
- rebuild for new tcl

* Wed Sep 23 2015 philippem <philippem> 3.5.0-3.mga6
+ Revision: 882408
- add rewheel-module.patch
- update to 3.5.0, with wheel, remove obsolete %%py3ver and %%py3_ver macros

* Tue Sep 22 2015 philippem <philippem> 3.5.0-2.mga6
+ Revision: 882274
- json test pass on local build but fail on BS
- update to 3.5.0, first step

* Sun Sep 06 2015 philippem <philippem> 3.4.3-8.mga6
+ Revision: 873282
- add new macros

* Sun Aug 30 2015 philippem <philippem> 3.4.3-7.mga6
+ Revision: 871175
- Use _sysconfigdata.py in distutils to initialize distutils, mga#16570

* Thu Aug 13 2015 philippem <philippem> 3.4.3-6.mga6
+ Revision: 864562
- something is broken with distutils and multiarch, so we add the include

* Thu Aug 13 2015 philippem <philippem> 3.4.3-5.mga6
+ Revision: 864274
- Remove the wrong distutils-pyconfig.patch

* Thu Aug 13 2015 philippem <philippem> 3.4.3-4.mga6
+ Revision: 864190
- patch distutils to find pyconfig, mga#16570

* Sun Jul 19 2015 philippem <philippem> 3.4.3-3.mga6
+ Revision: 855506
- fix shebangs

* Wed Jul 01 2015 philippem <philippem> 3.4.3-2.mga6
+ Revision: 849412
- disable test_socket on the BS
- add missing requires fix mga#16048

* Thu Feb 26 2015 philippem <philippem> 3.4.3-1.mga5
+ Revision: 817018
- update to 3.4.3, fix mga#14780

* Mon Oct 27 2014 philippem <philippem> 3.4.2-1.mga5
+ Revision: 793977
- Update to 3.4.2

  + umeabot <umeabot>
    - Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 3.4.1-5.mga5
+ Revision: 728013
- rebuild for missing pythoneggs deps

  + umeabot <umeabot>
    - Mageia 5 Mass Rebuild

* Sat Jun 28 2014 philippem <philippem> 3.4.1-3.mga5
+ Revision: 640729
- fix CVE-2014-4650 mga#15588)

* Sat May 24 2014 philippem <philippem> 3.4.1-2.mga5
+ Revision: 625308
- Build with rewheel

* Fri May 23 2014 philippem <philippem> 3.4.1-1.mga5
+ Revision: 625082
- update to 3.4.1

* Sat May 10 2014 philippem <philippem> 3.3.4-2.mga5
+ Revision: 621846
- fix CVE-2014-2667 mga#13305

* Sun Feb 16 2014 philippem <philippem> 3.3.4-1.mga5
+ Revision: 592814
- fix patch 00173 (missing backslash)

  + tv <tv>
    - fix test suite
    - new version
    - rediff patches
    - drop merged patches

* Sat Feb 15 2014 philippem <philippem> 3.3.2-14.mga5
+ Revision: 592080
-fix buffer overflow CVE-2014-1912 with upstream patch

* Tue Nov 26 2013 philippem <philippem> 3.3.2-13.mga4
+ Revision: 553625
- apply the patch to follow RFC 6125 in ssl.match_hostname() (mga#11785)

* Tue Nov 26 2013 philippem <philippem> 3.3.2-12.mga4
+ Revision: 553620
- change behavior of ssl.match_hostname() to follow RFC 6125 (fix mga#11785)

* Mon Nov 11 2013 philippem <philippem> 3.3.2-11.mga4
+ Revision: 550479
- remove no needed files that may conflict with python2

* Mon Oct 21 2013 umeabot <umeabot> 3.3.2-10.mga4
+ Revision: 539348
- Mageia 4 Mass Rebuild

  + philippem <philippem>
    - provide tkinker (module) as python3-tkinter to follow the policy

* Thu Sep 26 2013 philippem <philippem> 3.3.2-8.mga4
+ Revision: 486633
- Add a RPM macro py_byte_compile to enable specfiles to selectively byte-compile individual files and paths with different Python runtimes as necessary

* Thu Sep 26 2013 fwang <fwang> 3.3.2-7.mga4
+ Revision: 486489
- drop unneeded provides

* Wed Sep 25 2013 philippem <philippem> 3.3.2-6.mga4
+ Revision: 486299
+ rebuild (emptylog)

* Wed Sep 25 2013 fwang <fwang> 3.3.2-5.mga4
+ Revision: 485860
- skip test_urllib2_localnet also

  + philippem <philippem>
    - remove PYTHONDONTWRITEBYTECODE=1 fix mga#3348
    - profile.d files as configfile noreplace fix mga#10758

* Tue Aug 13 2013 philippem <philippem> 3.3.2-4.mga4
+ Revision: 465986
- disable parallel build

  + oden <oden>
    - P184: security fix for CVE-2013-4073 (upstream)

* Tue Jun 25 2013 philippem <philippem> 3.3.2-3.mga4
+ Revision: 446647
- add py3dir macro

  + shlomif <shlomif>
    - Fix MGA#9395
    - Convert inconsistent indentation to spaces only.
    - Remove unused docs archive

* Fri May 31 2013 tv <tv> 3.3.2-2.mga4
+ Revision: 433777
- update docs
- patch 183: fix CVE-2013-2099 (ssl.match_hostname DOS)

* Fri May 31 2013 tv <tv> 3.3.2-1.mga4
+ Revision: 433688
- disable some failling tests
- add patches from FC in order to fix gdb tests
- new release
- drop merged patch

* Tue Mar 19 2013 fwang <fwang> 3.3.0-4.mga3
+ Revision: 404044
- add patch from opensuse to fix test

* Sun Jan 13 2013 umeabot <umeabot> 3.3.0-3.mga3
+ Revision: 379744
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Dec 28 2012 rtp <rtp> 3.3.0-2.mga3
+ Revision: 335888
- fix tests

* Sat Sep 29 2012 fwang <fwang> 3.3.0-1.mga3
+ Revision: 300282
- add more provides to binary
- update file list
- update file list
- more linkage fix
- skip some failed tests
- drop -l
- add more linkage fix
- new version 3.3.0

* Wed Aug 08 2012 luigiwalser <luigiwalser> 3.2.3-5.mga3
+ Revision: 280050
- add patch from OpenSuSE to fix CVE-2012-2135 (patch 3)
- add upstream patch adding tests to testsuite associated w/CVE (patch 4)

* Mon Jul 30 2012 tv <tv> 3.2.3-4.mga3
+ Revision: 276244
- rebuild for db-5.3

* Thu Jul 05 2012 wally <wally> 3.2.3-3.mga3
+ Revision: 268245
- fix curses module build (mga#6702)

* Tue Jul 03 2012 kamil <kamil> 3.2.3-2.mga3
+ Revision: 266996
- add P2 fdr-lib64-fix-for-test_install.patch
- sync P1 with Fedora and fix x86_64 bugs (mga#6664)

* Sat Apr 14 2012 fwang <fwang> 3.2.3-1.mga2
+ Revision: 230764
- update lib64 patch
- new version 3.2.3

* Mon Feb 20 2012 guillomovitch <guillomovitch> 3.2.2-3.mga2
+ Revision: 211298
- don't hardcode pyconfig.h location in lib64 path
- ship pyconfig.h in main package, not just multiarch wrapper
- spec cleanup

* Mon Dec 05 2011 fwang <fwang> 3.2.2-2.mga2
+ Revision: 176932
- add upstream patch to recognize gdbm 1.9 magic value
- build with gdbm
- rebuild for new gdbm

* Mon Sep 05 2011 fwang <fwang> 3.2.2-1.mga2
+ Revision: 138550
- new version 3.2.2

* Fri Sep 02 2011 tv <tv> 3.2.1-2.mga2
+ Revision: 137805
- make the huge doc subpackage be noarch

* Tue Jul 12 2011 fwang <fwang> 3.2.1-1.mga2
+ Revision: 122718
- use ln -sf always
- update file list
- really rediff lib64 patch
- rediff lib64 patch
- new version 3.2.1

* Sat Jul 02 2011 fwang <fwang> 3.2-6.mga2
+ Revision: 117326
- rebuild for new tcl

* Tue Jun 28 2011 fwang <fwang> 3.2-5.mga2
+ Revision: 115157
- add provides for binary

* Tue Jun 07 2011 dmorgan <dmorgan> 3.2-4.mga2
+ Revision: 101527
- imported package python3