[packages/python3] - up to 3.6.0 (builds; untested; some tests still fail)
arekm
arekm at pld-linux.org
Fri Dec 23 14:04:52 CET 2016
commit 80febf2a7a96dfc0a9996a736f15262f75bad9b9
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Dec 23 14:04:40 2016 +0100
- up to 3.6.0 (builds; untested; some tests still fail)
python3-multilib.patch | 17 +++++++-----
python3-no_cmdline_tests.patch | 12 --------
python3-test-pyexpat.patch | 11 --------
python3.spec | 63 +++++++++++++++++++++---------------------
4 files changed, 41 insertions(+), 62 deletions(-)
---
diff --git a/python3.spec b/python3.spec
index 7310d7b..cb8732f 100644
--- a/python3.spec
+++ b/python3.spec
@@ -16,8 +16,9 @@
# test_gdb: fails, as the gdb uses old python version
%define broken_tests test_nntplib test_gdb test_site
-%define py_ver 3.5
+%define py_ver 3.6
%define py_abi %{py_ver}m
+%define py_platform %{py_abi}-%{_host_cpu}-%{_host_os}%{?_gnu}
%define py_prefix %{_prefix}
%define py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
%define py_incdir %{_includedir}/python%{py_abi}
@@ -33,13 +34,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}.2
-Release: 2
+Version: %{py_ver}.0
+Release: 1
Epoch: 1
License: PSF
Group: Development/Languages/Python
Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
-# Source0-md5: 8906efbacfcdc7c3c9198aeefafd159e
+# Source0-md5: 82b143ebbf4514d7e05876bed7a6b1f5
Source1: pyconfig.h.in
Patch0: %{name}-pythonpath.patch
Patch1: %{name}-ac_fixes.patch
@@ -54,7 +55,6 @@ Patch10: %{name}-bdist_rpm.patch
Patch11: %{name}-installcompile.patch
Patch12: https://bugs.python.org/file21896/nonexistent_user.patch
# Patch12-md5: db706fbe6de467c6e4c97c675eddf29a
-Patch13: python3-test-pyexpat.patch
URL: https://www.python.org/
BuildRequires: autoconf >= 2.65
BuildRequires: automake
@@ -482,12 +482,11 @@ Moduły testowe dla Pythona.
%patch10 -p1
%patch11 -p1
%patch12 -p1
-%patch13 -p1
%{__rm} -r Modules/zlib
%{__rm} -r Modules/expat
-for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx; do
+for SUBDIR in darwin libffi libffi_msvc libffi_osx; do
%{__rm} -r Modules/_ctypes/$SUBDIR/*
done
@@ -619,7 +618,6 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve
%{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.bat
%{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.pyw
%{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/help.html
-%{__rm} $RPM_BUILD_ROOT%{py_libdir}/plat-*/regen
%{__rm} $RPM_BUILD_ROOT%{py_libdir}/site-packages/README
# currently provided by python-2to3, consider switching to this one
@@ -632,8 +630,8 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve
# already in %%doc
%{__rm} $RPM_BUILD_ROOT%{py_libdir}/LICENSE.txt
-%{__mv} $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config-%{py_abi}/pyconfig.h
-%{__sed} -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g;s#@PY_ABI@#%{py_abi}#g' %{SOURCE1} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h
+%{__mv} $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config-%{py_platform}/pyconfig.h
+%{__sed} -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g;s#@PY_ABI@#%{py_platform}#g' %{SOURCE1} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h
%clean
rm -rf $RPM_BUILD_ROOT
@@ -678,7 +676,7 @@ rm -rf $RPM_BUILD_ROOT
# modules required by python library
%{py_libdir}/_collections_abc.py
%{py_libdir}/_sitebuiltins.py
-%{py_libdir}/_sysconfigdata.py
+%{py_libdir}/_sysconfigdata_*.py
%{py_libdir}/_weakrefset.py
%{py_libdir}/abc.py
%{py_libdir}/bisect.py
@@ -706,7 +704,7 @@ rm -rf $RPM_BUILD_ROOT
# needed by the dynamic sys.lib patch
%{py_libdir}/types.py
%{py_libdir}/__pycache__/_sitebuiltins.cpython-*.py[co]
-%{py_libdir}/__pycache__/_sysconfigdata.cpython-*.py[co]
+%{py_libdir}/__pycache__/_sysconfigdata_*.cpython-*.py[co]
%{py_libdir}/__pycache__/_weakrefset.cpython-*.py[co]
%{py_libdir}/__pycache__/abc.cpython-*.py[co]
%{py_libdir}/__pycache__/bisect.cpython-*.py[co]
@@ -741,12 +739,12 @@ rm -rf $RPM_BUILD_ROOT
%{py_libdir}/encodings/__pycache__
%{py_libdir}/encodings/*.py
-%dir %{py_libdir}/config-%{py_abi}
-%{py_libdir}/config-%{py_abi}/Makefile
-%{py_libdir}/config-%{py_abi}/Setup
-%{py_libdir}/config-%{py_abi}/Setup.config
-%{py_libdir}/config-%{py_abi}/Setup.local
-%{py_libdir}/config-%{py_abi}/pyconfig.h
+%dir %{py_libdir}/config-%{py_platform}
+%{py_libdir}/config-%{py_platform}/Makefile
+%{py_libdir}/config-%{py_platform}/Setup
+%{py_libdir}/config-%{py_platform}/Setup.config
+%{py_libdir}/config-%{py_platform}/Setup.local
+%{py_libdir}/config-%{py_platform}/pyconfig.h
%files modules
%defattr(644,root,root,755)
@@ -847,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT
%{py_libdir}/random.py
%{py_libdir}/rlcompleter.py
%{py_libdir}/runpy.py
+%{py_libdir}/secrets.py
%{py_libdir}/signal.py
%{py_libdir}/sched.py
%{py_libdir}/selectors.py
@@ -982,6 +981,7 @@ rm -rf $RPM_BUILD_ROOT
%{py_libdir}/__pycache__/rlcompleter.cpython-*.py[co]
%{py_libdir}/__pycache__/runpy.cpython-*.py[co]
%{py_libdir}/__pycache__/sched.cpython-*.py[co]
+%{py_libdir}/__pycache__/secrets.cpython-*.py[co]
%{py_libdir}/__pycache__/selectors.cpython-*.py[co]
%{py_libdir}/__pycache__/shelve.cpython-*.py[co]
%{py_libdir}/__pycache__/shlex.cpython-*.py[co]
@@ -1026,7 +1026,9 @@ rm -rf $RPM_BUILD_ROOT
# list .so modules to be sure that all of them are built
#
+%attr(755,root,root) %{py_dyndir}/_asyncio.cpython-*.so
%attr(755,root,root) %{py_dyndir}/_bisect.cpython-*.so
+%attr(755,root,root) %{py_dyndir}/_blake2.cpython-*.so
%attr(755,root,root) %{py_dyndir}/_bz2.cpython-*.so
%attr(755,root,root) %{py_dyndir}/_codecs_cn.cpython-*.so
%attr(755,root,root) %{py_dyndir}/_codecs_hk.cpython-*.so
@@ -1059,6 +1061,7 @@ rm -rf $RPM_BUILD_ROOT
%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}/_sha3.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
@@ -1093,10 +1096,6 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{py_dyndir}/unicodedata.cpython-*.so
%attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so
-%dir %{py_libdir}/plat-*
-%{py_libdir}/plat-*/__pycache__
-%{py_libdir}/plat-*/*.py
-
%dir %{py_libdir}/asyncio
%{py_libdir}/asyncio/__pycache__
%{py_libdir}/asyncio/*.py
@@ -1222,7 +1221,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.5
+%attr(755,root,root) %{_bindir}/pydoc%{py_ver}
%{py_libdir}/pydoc.py
%{py_libdir}/__pycache__/pydoc.cpython-*.py[co]
%dir %{py_libdir}/pydoc_data
@@ -1233,7 +1232,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.5
+%attr(755,root,root) %{_bindir}/idle%{py_ver}
%dir %{py_libdir}/idlelib/Icons
%{py_libdir}/idlelib/__pycache__
%{py_libdir}/idlelib/*.py
@@ -1252,14 +1251,14 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libpython3.so
%{py_incdir}/*.h
%exclude %{py_incdir}/pyconfig.h
-%attr(755,root,root) %{py_libdir}/config-%{py_abi}/makesetup
-%attr(755,root,root) %{py_libdir}/config-%{py_abi}/install-sh
-%{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
-%dir %{py_libdir}/config-%{py_abi}/__pycache__
-%{py_libdir}/config-%{py_abi}/__pycache__/python-config.*
+%attr(755,root,root) %{py_libdir}/config-%{py_platform}/makesetup
+%attr(755,root,root) %{py_libdir}/config-%{py_platform}/install-sh
+%{py_libdir}/config-%{py_platform}/config.c
+%{py_libdir}/config-%{py_platform}/config.c.in
+%{py_libdir}/config-%{py_platform}/python.o
+%{py_libdir}/config-%{py_platform}/python-config.py
+%dir %{py_libdir}/config-%{py_platform}/__pycache__
+%{py_libdir}/config-%{py_platform}/__pycache__/python-config.*
%{_pkgconfigdir}/python-%{py_ver}.pc
%{_pkgconfigdir}/python-%{py_abi}.pc
%{_pkgconfigdir}/python3.pc
diff --git a/python3-multilib.patch b/python3-multilib.patch
index f9e3554..3075ba4 100644
--- a/python3-multilib.patch
+++ b/python3-multilib.patch
@@ -74,13 +74,13 @@ diff -dur Python-3.5.0.orig/Lib/distutils/tests/test_install.py Python-3.5.0/Lib
diff -dur Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py
--- Python-3.5.0.orig/Lib/site.py 2015-09-13 13:41:21.000000000 +0200
+++ Python-3.5.0/Lib/site.py 2015-12-03 17:31:03.874280444 +0100
-@@ -303,12 +303,14 @@
+@@ -304,12 +304,14 @@ def getsitepackages(prefixes=None):
seen.add(prefix)
if os.sep == '/':
- sitepackages.append(os.path.join(prefix, "lib",
+ sitepackages.append(os.path.join(prefix, sys.lib,
- "python" + sys.version[:3],
+ "python%d.%d" % sys.version_info[:2],
"site-packages"))
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
+ sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages"))
@@ -322,15 +322,18 @@ diff -dur Python-3.5.0.orig/configure.ac Python-3.5.0/configure.ac
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
AC_SUBST(MULTIARCH)
-@@ -4331,7 +4370,7 @@
-
+@@ -4640,9 +4640,9 @@ AC_MSG_RESULT($LDVERSION)
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST(PY_ENABLE_SHARED)
--LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
-+LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}"
+ if test x$PLATFORM_TRIPLET = x; then
+- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
++ LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}"
+ else
+- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
++ LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
+ fi
AC_SUBST(LIBPL)
- # Check whether right shifting a negative integer extends the sign bit
diff -dur Python-3.5.0.orig/setup.py Python-3.5.0/setup.py
--- Python-3.5.0.orig/setup.py 2015-09-13 13:41:26.000000000 +0200
+++ Python-3.5.0/setup.py 2015-12-03 17:31:03.877613811 +0100
diff --git a/python3-no_cmdline_tests.patch b/python3-no_cmdline_tests.patch
index 7a39622..ad85bff 100644
--- a/python3-no_cmdline_tests.patch
+++ b/python3-no_cmdline_tests.patch
@@ -1,15 +1,3 @@
-diff -Nur Python-3.3.1.orig/Lib/test/regrtest.py Python-3.3.1/Lib/test/regrtest.py
---- Python-3.3.1.orig/Lib/test/regrtest.py 2013-04-06 08:41:41.000000000 +0100
-+++ Python-3.3.1/Lib/test/regrtest.py 2013-04-07 19:39:23.432490962 +0100
-@@ -243,7 +243,7 @@
-
- from test import support
-
--RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network',
-+RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network', 'cmdline',
- 'decimal', 'cpu', 'subprocess', 'urlfetch', 'gui')
-
- TEMPDIR = os.path.abspath(tempfile.gettempdir())
diff -Nur Python-3.3.1.orig/Lib/test/test_compileall.py Python-3.3.1/Lib/test/test_compileall.py
--- Python-3.3.1.orig/Lib/test/test_compileall.py 2013-04-06 08:41:41.000000000 +0100
+++ Python-3.3.1/Lib/test/test_compileall.py 2013-04-07 19:39:23.449157629 +0100
diff --git a/python3-test-pyexpat.patch b/python3-test-pyexpat.patch
deleted file mode 100644
index 728b7c8..0000000
--- a/python3-test-pyexpat.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- Python-3.5.2/Lib/test/test_pyexpat.py~ 2016-06-25 23:38:37.000000000 +0200
-+++ Python-3.5.2/Lib/test/test_pyexpat.py 2016-08-14 22:01:10.891946983 +0200
-@@ -660,7 +660,7 @@ class MalformedInputTest(unittest.TestCa
- parser.Parse(xml, True)
- self.fail()
- except expat.ExpatError as e:
-- self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14')
-+ self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 13')
-
- class ErrorMessageTest(unittest.TestCase):
- def test_codes(self):
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3.git/commitdiff/80febf2a7a96dfc0a9996a736f15262f75bad9b9
More information about the pld-cvs-commit
mailing list