]> git.pld-linux.org Git - packages/python3.git/blobdiff - python3.spec
- rel 2; atomic fixes
[packages/python3.git] / python3.spec
index 3d32ced248de64a7720cc89792bb22ed209abf7d..86f2223ced3662440e725cabda01a67574684744 100644 (file)
@@ -2,10 +2,10 @@
 # - fix lib64 and noarch/datadir patches as the 2nd one overrides some
 #   changes made by the first one; propose patches to python team as they
 #   seem to be duplicated by fedora as well
-# - --with-system-libmpdec when new version released [BR: mpdecimal-devel > 2.3]
 #
 # Conditional build:
 %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_with    verbose_tests           # runs tests in verbose mode
@@ -20,7 +20,7 @@
 #   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 py_ver         3.4
+%define py_ver         3.5
 %define py_abi         %{py_ver}m
 %define py_prefix      %{_prefix}
 %define py_libdir      %{py_prefix}/%{_lib}/python%{py_ver}
@@ -37,24 +37,25 @@ 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}.2
-Release:       1
+Version:       %{py_ver}.0
+Release:       2
 Epoch:         1
 License:       PSF
 Group:         Applications
 Source0:       http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
-# Source0-md5: 36fc7327c02c6f12fa24fc9ba78039e3
+# Source0-md5: d149d2812f10cbe04c042232e7964171
 Patch0:                %{name}-pythonpath.patch
 Patch1:                %{name}-ac_fixes.patch
 Patch2:                %{name}-lib64.patch
 Patch3:                %{name}-noarch_to_datadir.patch
 Patch4:                %{name}-no_cmdline_tests.patch
 Patch5:                %{name}-makefile-location.patch
-
+Patch6:                python3-atomic.patch
 Patch7:                python-distro.patch
 Patch8:                %{name}-db.patch
 URL:           http://www.python.org/
 BuildRequires: autoconf >= 2.65
+BuildRequires: automake
 BuildRequires: bluez-libs-devel
 BuildRequires: bzip2-devel
 BuildRequires: db-devel >= 4
@@ -65,8 +66,10 @@ BuildRequires:       gdbm-devel >= 1.8.3
 BuildRequires: gmp-devel >= 4.0
 BuildRequires: libffi-devel
 BuildRequires: libstdc++-devel
+%{?with_system_mpdecimal:BuildRequires:        mpdecimal-devel >= 2.4.1}
 BuildRequires: ncurses-ext-devel >= 5.2
 BuildRequires: openssl-devel >= 0.9.7
+BuildRequires: pkgconfig
 BuildRequires: readline-devel >= 5.0
 BuildRequires: rpm-pythonprov
 BuildRequires: sed >= 4.0
@@ -75,6 +78,7 @@ BuildRequires:        tar >= 1:1.22
 %{?with_info:BuildRequires:    tetex-makeindex}
 %{?with_tkinter:BuildRequires: tix-devel >= 1:8.1.4-4}
 %{?with_tkinter:BuildRequires: tk-devel >= 8.4.3}
+BuildRequires: xz-devel
 BuildRequires: zlib-devel
 Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -217,7 +221,10 @@ Summary:   Python modules
 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
 
 %description modules
 Python officially distributed modules.
@@ -465,7 +472,7 @@ Moduły testowe dla Pythona.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
-
+%patch6 -p1
 %patch7 -p1
 %patch8 -p1
 
@@ -473,7 +480,7 @@ Moduły testowe dla Pythona.
 %{__rm} -r Modules/expat
 
 for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx; do
-       %{__rm} -r Modules/_ctypes/$SUBDIR
+       %{__rm} -r Modules/_ctypes/$SUBDIR/*
 done
 
 %if "%{pld_release}" == "ac"
@@ -484,6 +491,8 @@ for f in $files; do
 done
 %endif
 
+find . -name '*.py' | xargs -r grep -El '^#! */usr/bin/env python3?' | xargs %{__sed} -i -e '1s,^#! */usr/bin/env python3\?,#!/usr/bin/python3,'
+
 %build
 if ! grep -q "tmpfs" /proc/self/mounts; then
        echo "You need to have /dev/shm mounted in order to build this package!" >&2
@@ -491,28 +500,32 @@ if ! grep -q "tmpfs" /proc/self/mounts; then
        exit 1
 fi
 
+%{__aclocal}
 %{__autoconf}
 %configure \
+       CC="%{__cc}" \
        OPT="%{rpmcflags} -fno-caller-saves" \
        CPPFLAGS="%{rpmcppflags}" \
        LDFLAGS="%{rpmldflags}" \
        ac_cv_posix_semaphores_enabled=yes \
        ac_cv_broken_sem_getvalue=no \
-       %{?with_debug:--with-pydebug} \
-       --with-cxx-main="%{__cxx}" \
-       --enable-shared \
        --enable-ipv6 \
+       --enable-shared \
+       --with-computed-gotos \
+       --with-cxx-main="%{__cxx}" \
        --with-dbmliborder=gdbm:bdb \
-       --with-signal-module \
-%ifarch %{ix86} %{x8664} ppc ppc64
-       --with-tsc \
-%endif
-       --with-threads \
        --with-doc-strings \
+       --without-ensurepip \
        --with-fpectl \
+       %{?with_debug:--with-pydebug} \
+       --with-signal-module \
        --with-system-expat \
        --with-system-ffi \
-       --with-computed-gotos \
+       %{?with_system_mpdecimal:--with-system-libmpdec} \
+       --with-threads \
+%ifarch %{ix86} %{x8664} ppc ppc64
+       --with-tsc
+%endif
 
 %{__make} 2>&1 | awk '
 BEGIN { fail = 0; logmsg = ""; }
@@ -590,6 +603,9 @@ sed 's/=/ /' \
 # pygettext.py is provided for compatibility
 install -p Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext%{py_ver}
 
+# reindent python code
+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_scriptdir}/plat-*/regen
 %{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/ctypes/macholib/fetch_macholib*
@@ -724,14 +740,16 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 /etc/shrc.d/python*-modules*
 %attr(755,root,root) %{_bindir}/pyvenv
-%attr(755,root,root) %{_bindir}/pyvenv-3.4
+%attr(755,root,root) %{_bindir}/pyvenv-%{py_ver}
 %{py_scriptdir}/__future__.py
 %{py_scriptdir}/__phello__.foo.py
 %{py_scriptdir}/_bootlocale.py
 %{py_scriptdir}/_compat_pickle.py
+%{py_scriptdir}/_compression.py
 %{py_scriptdir}/_dummy_thread.py
 %{py_scriptdir}/_markupbase.py
 %{py_scriptdir}/_osx_support.py
+%{py_scriptdir}/_pydecimal.py
 %{py_scriptdir}/_pyio.py
 %{py_scriptdir}/_strptime.py
 %{py_scriptdir}/_threading_local.py
@@ -817,6 +835,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/random.py
 %{py_scriptdir}/rlcompleter.py
 %{py_scriptdir}/runpy.py
+%{py_scriptdir}/signal.py
 %{py_scriptdir}/sched.py
 %{py_scriptdir}/selectors.py
 %{py_scriptdir}/shelve.py
@@ -847,20 +866,24 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/tracemalloc.py
 %{py_scriptdir}/tty.py
 %{py_scriptdir}/turtle.py
+%{py_scriptdir}/typing.py
 %{py_scriptdir}/uu.py
 %{py_scriptdir}/uuid.py
 %{py_scriptdir}/warnings.py
 %{py_scriptdir}/wave.py
 %{py_scriptdir}/webbrowser.py
 %{py_scriptdir}/xdrlib.py
+%{py_scriptdir}/zipapp.py
 %{py_scriptdir}/zipfile.py
 %{py_scriptdir}/__pycache__/__future__.cpython-*.py[co]
-%{py_scriptdir}/__pycache__/__phello__.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/__phello__.foo.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_bootlocale.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_compat_pickle.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/_compression.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_dummy_thread.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_markupbase.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_osx_support.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/_pydecimal.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_pyio.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_strptime.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_threading_local.cpython-*.py[co]
@@ -951,6 +974,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/__pycache__/shelve.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/shlex.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/shutil.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/signal.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/smtpd.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/smtplib.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/sndhdr.cpython-*.py[co]
@@ -976,12 +1000,14 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/__pycache__/tracemalloc.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/tty.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/turtle.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/typing.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/uu.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/uuid.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/warnings.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/wave.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/webbrowser.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/xdrlib.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/zipapp.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/zipfile.cpython-*.py[co]
 
 #
@@ -1026,6 +1052,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py_dyndir}/_testbuffer.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_testimportmultiple.cpython-*.so
+%attr(755,root,root) %{py_dyndir}/_testmultiphase.cpython-*.so
 
 # for openssl < 0.9.8 package sha256 and sha512 modules
 %if "%{pld_release}" != "ac"
@@ -1050,7 +1077,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py_dyndir}/select.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/syslog.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/termios.cpython-*.so
-%attr(755,root,root) %{py_dyndir}/time.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/spwd.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/unicodedata.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so
@@ -1149,6 +1175,8 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{py_scriptdir}/venv/scripts
 %dir %{py_scriptdir}/venv/scripts/posix
 %{py_scriptdir}/venv/scripts/posix/activate
+%{py_scriptdir}/venv/scripts/posix/activate.csh
+%{py_scriptdir}/venv/scripts/posix/activate.fish
 
 %dir %{py_scriptdir}/wsgiref
 %{py_scriptdir}/wsgiref/__pycache__
@@ -1182,7 +1210,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.4
+%attr(755,root,root) %{_bindir}/pydoc3.5
 %{py_scriptdir}/pydoc.py
 %{py_scriptdir}/__pycache__/pydoc.cpython-*.py[co]
 %dir %{py_scriptdir}/pydoc_data
@@ -1193,7 +1221,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.4
+%attr(755,root,root) %{_bindir}/idle3.5
 %dir %{py_scriptdir}/idlelib/Icons
 %{py_scriptdir}/idlelib/__pycache__
 %{py_scriptdir}/idlelib/*.py
@@ -1226,6 +1254,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 /etc/shrc.d/python*-devel*
 %attr(755,root,root) %{_bindir}/pygettext%{py_ver}
+%attr(755,root,root) %{_bindir}/pyreindent%{py_ver}
 %{py_scriptdir}/pdb.py
 %{py_scriptdir}/profile.py
 %{py_scriptdir}/pstats.py
This page took 0.038391 seconds and 4 git commands to generate.