]> git.pld-linux.org Git - packages/python3.git/blobdiff - python3.spec
- move libs that are needed in base package
[packages/python3.git] / python3.spec
index ccf1e78996c4588a81c98f1c91df76767627502a..7565615c472f9ad0f10e5e8e8f86597dcb78f9c1 100644 (file)
@@ -1,5 +1,4 @@
 # TODO:
-# - python3-lib64.patch: sys.lib is empty string
 # - 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
@@ -21,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.3
+%define py_ver         3.4
 %define py_abi         %{py_ver}m
 %define py_prefix      %{_prefix}
 %define py_libdir      %{py_prefix}/%{_lib}/python%{py_ver}
@@ -38,13 +37,13 @@ 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}.1
-Release:       0.1
+Version:       %{py_ver}.2
+Release:       1
 Epoch:         1
 License:       PSF
 Group:         Applications
 Source0:       http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
-# Source0-md5: 993232d9f4d9b4863cc1ec69a792e9cd
+# Source0-md5: 36fc7327c02c6f12fa24fc9ba78039e3
 Patch0:                %{name}-pythonpath.patch
 Patch1:                %{name}-ac_fixes.patch
 Patch2:                %{name}-lib64.patch
@@ -52,6 +51,8 @@ Patch3:               %{name}-noarch_to_datadir.patch
 Patch4:                %{name}-no_cmdline_tests.patch
 Patch5:                %{name}-makefile-location.patch
 Patch6:                libc-cloexec.patch
+Patch7:                python-distro.patch
+Patch8:                %{name}-db.patch
 URL:           http://www.python.org/
 BuildRequires: autoconf >= 2.65
 BuildRequires: bluez-libs-devel
@@ -82,9 +83,9 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                specflags_ppc64 -D__ppc64__=1
 
 %if %{with verbose_tests}
-%define test_flags -v -l -x
+%define test_flags -v -x
 %else
-%define test_flags -w -l -x
+%define test_flags -w -x
 %endif
 
 %ifarch alpha ia64 ppc64 sparc64 ppc64 %{x8664}
@@ -445,6 +446,17 @@ Przykładowe programy w Pythonie.
 
 Przykłady te są dla Pythona 2.3.4, nie %{version}.
 
+%package test
+Summary:       Test modules for Python
+Summary(pl.UTF-8):     Moduły testowe dla Pythona
+Group:         Development/Languages/Python
+
+%description test
+Test modules for Python.
+
+%description test -l pl.UTF-8
+Moduły testowe dla Pythona.
+
 %prep
 %setup -q -n Python-%{version}
 %patch0 -p1
@@ -454,6 +466,8 @@ Przykłady te są dla Pythona 2.3.4, nie %{version}.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
+%patch8 -p1
 
 %{__rm} -r Modules/zlib
 %{__rm} -r Modules/expat
@@ -462,13 +476,13 @@ for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx; do
        %{__rm} -r Modules/_ctypes/$SUBDIR
 done
 
+%if "%{pld_release}" == "ac"
 files="md5module.c sha1module.c"
-%if !0%(pkg-config  openssl --atleast-version=0.9.8; echo $?)
 files="$files sha256module.c sha512module.c"
-%endif
 for f in $files; do
        %{__rm} Modules/$f
 done
+%endif
 
 %build
 if ! grep -q "tmpfs" /proc/self/mounts; then
@@ -478,8 +492,10 @@ if ! grep -q "tmpfs" /proc/self/mounts; then
 fi
 
 %{__autoconf}
-CPPFLAGS="-I/usr/include/ncursesw %{rpmcppflags} -Wall %{!?debug:-DNDEBUG=1}"; export CPPFLAGS
 %configure \
+       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} \
@@ -497,13 +513,8 @@ CPPFLAGS="-I/usr/include/ncursesw %{rpmcppflags} -Wall %{!?debug:-DNDEBUG=1}"; e
        --with-system-expat \
        --with-system-ffi \
        --with-computed-gotos \
-       LINKCC='$(PURIFY) $(CXX)' \
-       LDSHARED='$(CC) $(CFLAGS) -shared' \
-       BLDSHARED='$(CC) $(CFLAGS) -shared' \
-       LDFLAGS="%{rpmcflags} %{rpmldflags}"
 
-%{__make} \
-       OPT="%{rpmcflags} %{rpmcppflags} -fno-caller-saves" 2>&1 | awk '
+%{__make} 2>&1 | awk '
 BEGIN { fail = 0; logmsg = ""; }
 {
         if ($0 ~ /\*\*\* WARNING:/) {
@@ -518,6 +529,7 @@ LC_ALL=C
 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 \
        TESTOPTS="%{test_flags} %{test_list}" \
        TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:`pwd`/$binlibdir ./python -tt"
@@ -579,16 +591,6 @@ sed 's/=/ /' \
 install -p Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext%{py_ver}
 
 # just to cut the noise, as they are not packaged (now)
-# first tests (probably could be packaged)
-%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/test
-%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/ctypes/test
-%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/distutils/tests
-%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/lib2to3/tests
-%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/sqlite3/test
-%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/tkinter/test
-%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/unittest/test
-
-# other files
 %{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/plat-*/regen
 %{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/ctypes/macholib/fetch_macholib*
 %{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/site-packages/README
@@ -624,6 +626,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/python%{py_abi}
 %attr(755,root,root) %{_bindir}/python3
 %{_mandir}/man1/python%{py_ver}.1*
+%{_mandir}/man1/python3.1*
 
 %files libs
 %defattr(644,root,root,755)
@@ -646,6 +649,8 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py_dyndir}/_struct.cpython-*.so
 
 # modules required by python library
+%{py_scriptdir}/_collections_abc.py
+%{py_scriptdir}/_sitebuiltins.py
 %{py_scriptdir}/_sysconfigdata.py
 %{py_scriptdir}/_weakrefset.py
 %{py_scriptdir}/abc.py
@@ -673,11 +678,13 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/os.py
 # needed by the dynamic sys.lib patch
 %{py_scriptdir}/types.py
+%{py_scriptdir}/__pycache__/_sitebuiltins.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_sysconfigdata.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_weakrefset.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/abc.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/bisect.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/codecs.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/_collections_abc.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/copyreg.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/functools.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/genericpath.cpython-*.py[co]
@@ -717,9 +724,10 @@ 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.3
+%attr(755,root,root) %{_bindir}/pyvenv-3.4
 %{py_scriptdir}/__future__.py
 %{py_scriptdir}/__phello__.foo.py
+%{py_scriptdir}/_bootlocale.py
 %{py_scriptdir}/_compat_pickle.py
 %{py_scriptdir}/_dummy_thread.py
 %{py_scriptdir}/_markupbase.py
@@ -758,6 +766,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/dis.py
 %{py_scriptdir}/doctest.py
 %{py_scriptdir}/dummy_threading.py
+%{py_scriptdir}/enum.py
 %{py_scriptdir}/filecmp.py
 %{py_scriptdir}/fileinput.py
 %{py_scriptdir}/fnmatch.py
@@ -789,8 +798,9 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/nturl2path.py
 %{py_scriptdir}/numbers.py
 %{py_scriptdir}/opcode.py
+%{py_scriptdir}/operator.py
 %{py_scriptdir}/optparse.py
-%{py_scriptdir}/os2emxpath.py
+%{py_scriptdir}/pathlib.py
 %{py_scriptdir}/pickle.py
 %{py_scriptdir}/pickletools.py
 %{py_scriptdir}/pipes.py
@@ -808,6 +818,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/rlcompleter.py
 %{py_scriptdir}/runpy.py
 %{py_scriptdir}/sched.py
+%{py_scriptdir}/selectors.py
 %{py_scriptdir}/shelve.py
 %{py_scriptdir}/shlex.py
 %{py_scriptdir}/shutil.py
@@ -817,6 +828,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/socket.py
 %{py_scriptdir}/socketserver.py
 %{py_scriptdir}/ssl.py
+%{py_scriptdir}/statistics.py
 %{py_scriptdir}/string.py
 %{py_scriptdir}/stringprep.py
 %{py_scriptdir}/struct.py
@@ -832,6 +844,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/this.py
 %{py_scriptdir}/threading.py
 %{py_scriptdir}/trace.py
+%{py_scriptdir}/tracemalloc.py
 %{py_scriptdir}/tty.py
 %{py_scriptdir}/turtle.py
 %{py_scriptdir}/uu.py
@@ -843,6 +856,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/zipfile.py
 %{py_scriptdir}/__pycache__/__future__.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/__phello__.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/_bootlocale.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_compat_pickle.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_dummy_thread.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/_markupbase.cpython-*.py[co]
@@ -881,6 +895,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/__pycache__/dis.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/doctest.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/dummy_threading.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/enum.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/filecmp.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/fileinput.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/fnmatch.cpython-*.py[co]
@@ -912,8 +927,9 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/__pycache__/nturl2path.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/numbers.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/opcode.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/operator.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/optparse.cpython-*.py[co]
-%{py_scriptdir}/__pycache__/os2emxpath.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/pathlib.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/pickle.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/pickletools.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/pipes.cpython-*.py[co]
@@ -931,6 +947,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/__pycache__/rlcompleter.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/runpy.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/sched.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/selectors.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/shelve.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/shlex.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/shutil.cpython-*.py[co]
@@ -940,6 +957,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/__pycache__/socket.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/socketserver.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/ssl.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/statistics.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/string.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/stringprep.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/struct.cpython-*.py[co]
@@ -955,6 +973,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/__pycache__/this.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/threading.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/trace.cpython-*.py[co]
+%{py_scriptdir}/__pycache__/tracemalloc.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/tty.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/turtle.cpython-*.py[co]
 %{py_scriptdir}/__pycache__/uu.cpython-*.py[co]
@@ -994,24 +1013,27 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py_dyndir}/_json.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_lsprof.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_lzma.cpython-*.so
+%attr(755,root,root) %{py_dyndir}/_md5.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_multibytecodec.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_multiprocessing.cpython-*.so
+%attr(755,root,root) %{py_dyndir}/_opcode.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_pickle.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_posixsubprocess.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_random.cpython-*.so
+%attr(755,root,root) %{py_dyndir}/_sha1.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_socket.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_ssl.cpython-*.so
 %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
 
 # for openssl < 0.9.8 package sha256 and sha512 modules
-%if 0%(pkg-config  openssl --atleast-version=0.9.8; echo $?)
+%if "%{pld_release}" != "ac"
 %attr(755,root,root) %{py_dyndir}/_sha256.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/_sha512.cpython-*.so
 %endif
 
 %attr(755,root,root) %{py_dyndir}/array.cpython-*.so
-%attr(755,root,root) %{py_dyndir}/atexit.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/audioop.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/binascii.cpython-*.so
 %attr(755,root,root) %{py_dyndir}/cmath.cpython-*.so
@@ -1037,6 +1059,10 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/plat-*/__pycache__
 %{py_scriptdir}/plat-*/*.py
 
+%dir %{py_scriptdir}/asyncio
+%{py_scriptdir}/asyncio/__pycache__
+%{py_scriptdir}/asyncio/*.py
+
 %{py_scriptdir}/concurrent
 
 %dir %{py_scriptdir}/ctypes
@@ -1069,9 +1095,15 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{py_scriptdir}/email/mime
 %{py_scriptdir}/email/__pycache__
 %{py_scriptdir}/email/mime/__pycache__
+%{py_scriptdir}/email/architecture.rst
 %{py_scriptdir}/email/*.py
 %{py_scriptdir}/email/mime/*.py
 
+%dir %{py_scriptdir}/ensurepip
+%{py_scriptdir}/ensurepip/__pycache__
+%{py_scriptdir}/ensurepip/*.py
+%{py_scriptdir}/ensurepip/_bundled
+
 %dir %{py_scriptdir}/html
 %{py_scriptdir}/html/*.py
 %{py_scriptdir}/html/__pycache__
@@ -1080,6 +1112,8 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/http/__pycache__
 %{py_scriptdir}/http/*.py
 
+%dir %{py_scriptdir}/idlelib
+
 %dir %{py_scriptdir}/importlib
 %{py_scriptdir}/importlib/__pycache__
 %{py_scriptdir}/importlib/*.py
@@ -1100,7 +1134,10 @@ rm -rf $RPM_BUILD_ROOT
 %{py_scriptdir}/multiprocessing/dummy/*.py
 
 %{py_scriptdir}/turtledemo
-%{py_scriptdir}/unittest
+
+%dir %{py_scriptdir}/unittest
+%{py_scriptdir}/unittest/__pycache__
+%{py_scriptdir}/unittest/*.py
 
 %dir %{py_scriptdir}/urllib
 %{py_scriptdir}/urllib/__pycache__
@@ -1112,7 +1149,6 @@ 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/pydoc
 
 %dir %{py_scriptdir}/wsgiref
 %{py_scriptdir}/wsgiref/__pycache__
@@ -1146,7 +1182,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.3
+%attr(755,root,root) %{_bindir}/pydoc3.4
 %{py_scriptdir}/pydoc.py
 %{py_scriptdir}/__pycache__/pydoc.cpython-*.py[co]
 %dir %{py_scriptdir}/pydoc_data
@@ -1157,8 +1193,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.3
-%dir %{py_scriptdir}/idlelib
+%attr(755,root,root) %{_bindir}/idle3.4
 %dir %{py_scriptdir}/idlelib/Icons
 %{py_scriptdir}/idlelib/__pycache__
 %{py_scriptdir}/idlelib/*.py
@@ -1182,6 +1217,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/config-%{py_abi}/config.c
 %{py_libdir}/config-%{py_abi}/config.c.in
 %{py_libdir}/config-%{py_abi}/python.o
+%{py_libdir}/config-%{py_abi}/python-config.py
 %{_pkgconfigdir}/python-%{py_ver}.pc
 %{_pkgconfigdir}/python-%{py_abi}.pc
 %{_pkgconfigdir}/python3.pc
@@ -1221,6 +1257,16 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_examplesdir}/%{name}-%{version}
 
+%files test
+%{py_scriptdir}/idlelib/idle_test
+%{py_scriptdir}/test
+%{py_scriptdir}/ctypes/test
+%{py_scriptdir}/distutils/tests
+%{py_scriptdir}/lib2to3/tests
+%{py_scriptdir}/sqlite3/test
+%{py_scriptdir}/tkinter/test
+%{py_scriptdir}/unittest/test
+
 %if %{with info}
 %files doc-info
 %defattr(644,root,root,755)
This page took 0.124441 seconds and 4 git commands to generate.