Update to 3.7.0 alpha 4

This commit is contained in:
Miro Hrončok 2018-01-09 22:16:51 +01:00
parent d673becd53
commit c9349a73c7
4 changed files with 130 additions and 32 deletions

View File

@ -105,13 +105,13 @@ index 9ee4d31..53c8606 100644
'scripts': '{userbase}/bin', 'scripts': '{userbase}/bin',
'data': '{userbase}', 'data': '{userbase}',
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index 99e7b4f..c4c98a6 100644 index 266adf0..e8513b6 100644
--- a/Lib/test/test_site.py --- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py +++ b/Lib/test/test_site.py
@@ -275,8 +275,8 @@ class HelperFunctionsTests(unittest.TestCase): @@ -275,8 +275,8 @@ class HelperFunctionsTests(unittest.TestCase):
self.assertEqual(dirs[1], wanted) self.assertEqual(dirs[1], wanted)
elif os.sep == '/': elif os.sep == '/':
# OS X non-framwework builds, Linux, FreeBSD, etc # OS X non-framework builds, Linux, FreeBSD, etc
- self.assertEqual(len(dirs), 1) - self.assertEqual(len(dirs), 1)
- wanted = os.path.join('xoxo', 'lib', - wanted = os.path.join('xoxo', 'lib',
+ self.assertEqual(len(dirs), 2) + self.assertEqual(len(dirs), 2)
@ -120,7 +120,7 @@ index 99e7b4f..c4c98a6 100644
'site-packages') 'site-packages')
self.assertEqual(dirs[0], wanted) self.assertEqual(dirs[0], wanted)
diff --git a/Makefile.pre.in b/Makefile.pre.in diff --git a/Makefile.pre.in b/Makefile.pre.in
index e8df8f7..a5a9d5e 100644 index 59ba9d4..5780ed8 100644
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -133,7 +133,7 @@ LIBDIR= @libdir@ @@ -133,7 +133,7 @@ LIBDIR= @libdir@
@ -133,41 +133,41 @@ index e8df8f7..a5a9d5e 100644
# Detailed destination directories # Detailed destination directories
diff --git a/Modules/getpath.c b/Modules/getpath.c diff --git a/Modules/getpath.c b/Modules/getpath.c
index dd3387a..1258fcd 100644 index 85e737b..2a1fc79 100644
--- a/Modules/getpath.c --- a/Modules/getpath.c
+++ b/Modules/getpath.c +++ b/Modules/getpath.c
@@ -494,7 +494,7 @@ calculate_path(void) @@ -500,7 +500,7 @@ calculate_exec_prefix(const _PyCoreConfig *core_config,
_pythonpath = Py_DecodeLocale(PYTHONPATH, NULL);
_prefix = Py_DecodeLocale(PREFIX, NULL);
_exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL);
- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL);
+ lib_python = Py_DecodeLocale("lib64/python" VERSION, NULL);
if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
Py_FatalError(
@@ -683,7 +683,7 @@ calculate_path(void)
}
else
wcsncpy(zip_path, _prefix, MAXPATHLEN);
- joinpath(zip_path, L"lib/python00.zip");
+ joinpath(zip_path, L"lib64/python00.zip");
bufsz = wcslen(zip_path); /* Replace "00" with version */
zip_path[bufsz - 6] = VERSION[0];
zip_path[bufsz - 5] = VERSION[2];
@@ -695,7 +695,7 @@ calculate_path(void)
fprintf(stderr,
"Could not find platform dependent libraries <exec_prefix>\n"); "Could not find platform dependent libraries <exec_prefix>\n");
wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN); }
wcsncpy(exec_prefix, calculate->exec_prefix, MAXPATHLEN);
- joinpath(exec_prefix, L"lib/lib-dynload"); - joinpath(exec_prefix, L"lib/lib-dynload");
+ joinpath(exec_prefix, L"lib64/lib-dynload"); + joinpath(exec_prefix, L"lib64/lib-dynload");
} }
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
}
@@ -742,7 +742,7 @@ calculate_zip_path(PyCalculatePath *calculate, const wchar_t *prefix)
else {
wcsncpy(calculate->zip_path, calculate->prefix, MAXPATHLEN);
}
- joinpath(calculate->zip_path, L"lib/python00.zip");
+ joinpath(calculate->zip_path, L"lib64/python00.zip");
/* Replace "00" with version */
size_t bufsz = wcslen(calculate->zip_path);
@@ -867,7 +867,7 @@ calculate_init(PyCalculatePath *calculate,
if (!calculate->prefix) {
return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
}
- calculate->lib_python = Py_DecodeLocale("lib/python" VERSION, &len);
+ calculate->lib_python = Py_DecodeLocale("lib64/python" VERSION, &len);
if (!calculate->lib_python) {
return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
}
diff --git a/setup.py b/setup.py diff --git a/setup.py b/setup.py
index 11c4ec6..c3e5512 100644 index f1933f7..450cd8a 100644
--- a/setup.py --- a/setup.py
+++ b/setup.py +++ b/setup.py
@@ -513,7 +513,7 @@ class PyBuildExt(build_ext): @@ -531,7 +531,7 @@ class PyBuildExt(build_ext):
# directories (i.e. '.' and 'Include') must be first. See issue # directories (i.e. '.' and 'Include') must be first. See issue
# 10520. # 10520.
if not cross_compiling: if not cross_compiling:
@ -176,7 +176,7 @@ index 11c4ec6..c3e5512 100644
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
# only change this for cross builds for 3.3, issues on Mageia # only change this for cross builds for 3.3, issues on Mageia
if cross_compiling: if cross_compiling:
@@ -809,11 +809,11 @@ class PyBuildExt(build_ext): @@ -830,11 +830,11 @@ class PyBuildExt(build_ext):
elif curses_library: elif curses_library:
readline_libs.append(curses_library) readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs + elif self.compiler.find_library_file(lib_dirs +
@ -190,7 +190,7 @@ index 11c4ec6..c3e5512 100644
extra_link_args=readline_extra_link_args, extra_link_args=readline_extra_link_args,
libraries=readline_libs) ) libraries=readline_libs) )
else: else:
@@ -850,8 +850,8 @@ class PyBuildExt(build_ext): @@ -871,8 +871,8 @@ class PyBuildExt(build_ext):
if krb5_h: if krb5_h:
ssl_incs += krb5_h ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,

View File

@ -0,0 +1,83 @@
diff --git a/setup.py b/setup.py
index 3eb6ad1..3437e48 100644
--- a/setup.py
+++ b/setup.py
@@ -1331,20 +1331,14 @@ class PyBuildExt(build_ext):
exts.append( Extension('termios', ['termios.c']) )
# Jeremy Hylton's rlimit interface
exts.append( Extension('resource', ['resource.c']) )
+ else:
+ missing.extend(['resource', 'termios'])
- # Sun yellow pages. Some systems have the functions in libc.
- if (host_platform not in ['cygwin', 'qnx6'] and
- find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
- if (self.compiler.find_library_file(lib_dirs, 'nsl')):
- libs = ['nsl']
- else:
- libs = []
- exts.append( Extension('nis', ['nismodule.c'],
- libraries = libs) )
- else:
- missing.append('nis')
+ nis = self._detect_nis(inc_dirs, lib_dirs)
+ if nis is not None:
+ exts.append(nis)
else:
- missing.extend(['nis', 'resource', 'termios'])
+ missing.append('nis')
# Curses support, requiring the System V version of curses, often
# provided by the ncurses library.
@@ -2179,6 +2173,51 @@ class PyBuildExt(build_ext):
)
return ext
+ def _detect_nis(self, inc_dirs, lib_dirs):
+ if host_platform in {'win32', 'cygwin', 'qnx6'}:
+ return None
+
+ libs = []
+ library_dirs = []
+ includes_dirs = []
+
+ # Latest glibc has moved Sun RPC headers into tircp and nsl sub
+ # directories. rpc code has been moved to libtirpc.
+ rpcsvc_inc = find_file(
+ 'rpcsvc/yp_prot.h', inc_dirs,
+ ['/usr/local/include/nsl', '/usr/include/nsl']
+ )
+ rpc_inc = find_file(
+ 'rpc/rpc.h', inc_dirs,
+ ['/usr/local/include/tirpc', '/usr/include/tirpc']
+ )
+ if rpcsvc_inc is None or rpc_inc is None:
+ # not found
+ return None
+ includes_dirs.extend(rpcsvc_inc)
+ includes_dirs.extend(rpc_inc)
+
+ if self.compiler.find_library_file(lib_dirs, 'nsl'):
+ libs.append('nsl')
+ else:
+ # libnsl-devel: check for libnsl in nsl/ subdirectory
+ nsl_dirs = [os.path.join(lib_dir, 'nsl') for lib_dir in lib_dirs]
+ libnsl = self.compiler.find_library_file(nsl_dirs, 'nsl')
+ if libnsl is not None:
+ library_dirs.append(os.path.dirname(libnsl))
+ libs.append('nsl')
+
+ if self.compiler.find_library_file(lib_dirs, 'tirpc'):
+ libs.append('tirpc')
+
+ return Extension(
+ 'nis', ['nismodule.c'],
+ libraries=libs,
+ library_dirs=library_dirs,
+ include_dirs=includes_dirs
+ )
+
+
class PyBuildInstall(install):
# Suppress the warning about installation into the lib_dynload
# directory, which is not in sys.path when running Python during

View File

@ -13,12 +13,12 @@ URL: https://www.python.org/
# Second alpha # Second alpha
%global prerel a2 %global prerel a4
# WARNING When rebasing to a new Python version, # WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well # remember to update the python3-docs package as well
Version: %{pybasever}.0 Version: %{pybasever}.0
Release: 0.1.%{?prerel}%{?dist} Release: 0.2.%{?prerel}%{?dist}
License: Python License: Python
@ -203,6 +203,8 @@ BuildRequires: glibc-devel
BuildRequires: gmp-devel BuildRequires: gmp-devel
BuildRequires: libappstream-glib BuildRequires: libappstream-glib
BuildRequires: libffi-devel BuildRequires: libffi-devel
BuildRequires: libnsl2-devel
BuildRequires: libtirpc-devel
BuildRequires: libGL-devel BuildRequires: libGL-devel
BuildRequires: libuuid-devel BuildRequires: libuuid-devel
BuildRequires: libX11-devel BuildRequires: libX11-devel
@ -392,6 +394,14 @@ Patch273: 00273-skip-float-test.patch
# Upstream uses Debian-style architecture naming. Change to match Fedora. # Upstream uses Debian-style architecture naming. Change to match Fedora.
Patch274: 00274-fix-arch-names.patch Patch274: 00274-fix-arch-names.patch
# 00289 #
# Fix the compilation of the nis module, as glibc removed the
# interfaces related to Sun RPC and they are now provided
# by libtirpc and libnsl2.
# See: https://fedoraproject.org/wiki/Changes/SunRPCRemoval
# and https://fedoraproject.org/wiki/Changes/NISIPv6
# Fixed upstream: https://bugs.python.org/issue32521
Patch289: 00289-fix-nis-compilation.patch
# (New patches go here ^^^) # (New patches go here ^^^)
# #
@ -684,6 +694,7 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch273 -p1 %patch273 -p1
%patch274 -p1 %patch274 -p1
%patch289 -p1
# Remove files that should be generated by the build # Remove files that should be generated by the build
@ -1674,6 +1685,10 @@ fi
# ====================================================== # ======================================================
%changelog %changelog
* Tue Jan 09 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-0.2.a4
- Update to 3.7.0 alpha 4
- Fix the compilation of the nis module
* Tue Nov 28 2017 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-0.1.a2 * Tue Nov 28 2017 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-0.1.a2
- Update to 3.7.0 alpha 2 - Update to 3.7.0 alpha 2
- Removed merged patches 262, 277, 279 - Removed merged patches 262, 277, 279

View File

@ -1 +1 @@
SHA512 (Python-3.7.0a2.tar.xz) = 604cef8fe079afad66f4df17752cb1afdc7d12abd392cb5995b16e83df392f56bd1ed88d6be9e0f3e9d7ea0dd394e497f6311547d277d9fd1ebd3eb039f7b068 SHA512 (Python-3.7.0a4.tar.xz) = 3d9517fb381258e21548e3e88de88592adc75bc37fddf21e79149d7706d85f5df816ffcc170603ce93959c76d903d4fd4c0231b5b0b2b430c21701cc303d9e5a