The package rpms/python37.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/python37.git/commit/?id=239f1db3b....
Change:
-%ifnarch s390 %{mips} riscv64
Thanks.
Full change:
============
commit 239f1db3b6e271ea1e8c68f28e157b88291df632
Author: Miro Hrončok <miro(a)hroncok.cz>
Date: Tue Jul 3 00:03:55 2018 +0200
Provided by the python3 package. Will be reintroduced when python3 is Python 3.8.
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 1107137..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/*.tar.*
-/*.src.rpm
-/results_python3*
diff --git a/00001-rpath.patch b/00001-rpath.patch
deleted file mode 100644
index 9fae54c..0000000
--- a/00001-rpath.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -up Python-3.1.1/Lib/distutils/unixccompiler.py.rpath
Python-3.1.1/Lib/distutils/unixccompiler.py
---- Python-3.1.1/Lib/distutils/unixccompiler.py.rpath 2009-09-04 17:29:34.000000000
-0400
-+++ Python-3.1.1/Lib/distutils/unixccompiler.py 2009-09-04 17:49:54.000000000 -0400
-@@ -141,6 +141,15 @@ class UnixCCompiler(CCompiler):
- if sys.platform == "cygwin":
- exe_extension = ".exe"
-
-+ def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
-+ """Remove standard library path from rpath"""
-+ libraries, library_dirs, runtime_library_dirs = super()._fix_lib_args(
-+ libraries, library_dirs, runtime_library_dirs)
-+ libdir = sysconfig.get_config_var('LIBDIR')
-+ if runtime_library_dirs and (libdir in runtime_library_dirs):
-+ runtime_library_dirs.remove(libdir)
-+ return libraries, library_dirs, runtime_library_dirs
-+
- def preprocess(self, source, output_file=None, macros=None,
- include_dirs=None, extra_preargs=None, extra_postargs=None):
- fixed_args = self._fix_compile_args(None, macros, include_dirs)
diff --git a/00102-lib64.patch b/00102-lib64.patch
deleted file mode 100644
index b082083..0000000
--- a/00102-lib64.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
-index 0258d3d..4b969bf 100644
---- a/Lib/distutils/command/install.py
-+++ b/Lib/distutils/command/install.py
-@@ -30,14 +30,14 @@ WINDOWS_SCHEME = {
- INSTALL_SCHEMES = {
- 'unix_prefix': {
- 'purelib': '$base/lib/python$py_version_short/site-packages',
-- 'platlib':
'$platbase/lib/python$py_version_short/site-packages',
-+ 'platlib':
'$platbase/lib64/python$py_version_short/site-packages',
- 'headers':
'$base/include/python$py_version_short$abiflags/$dist_name',
- 'scripts': '$base/bin',
- 'data' : '$base',
- },
- 'unix_home': {
- 'purelib': '$base/lib/python',
-- 'platlib': '$base/lib/python',
-+ 'platlib': '$base/lib64/python',
- 'headers': '$base/include/python/$dist_name',
- 'scripts': '$base/bin',
- 'data' : '$base',
-diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index e07a6c8..554740d 100644
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -129,8 +129,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
- prefix = plat_specific and EXEC_PREFIX or PREFIX
-
- if os.name == "posix":
-+ if plat_specific or standard_lib:
-+ lib = "lib64"
-+ else:
-+ lib = "lib"
- libpython = os.path.join(prefix,
-- "lib", "python" +
get_python_version())
-+ lib, "python" + get_python_version())
- if standard_lib:
- return libpython
- else:
-diff --git a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py
-index 287ab19..d4c05e0 100644
---- a/Lib/distutils/tests/test_install.py
-+++ b/Lib/distutils/tests/test_install.py
-@@ -57,8 +57,9 @@ class InstallTestCase(support.TempdirManager,
- self.assertEqual(got, expected)
-
- libdir = os.path.join(destination, "lib", "python")
-+ platlibdir = os.path.join(destination, "lib64", "python")
- check_path(cmd.install_lib, libdir)
-- check_path(cmd.install_platlib, libdir)
-+ check_path(cmd.install_platlib, platlibdir)
- check_path(cmd.install_purelib, libdir)
- check_path(cmd.install_headers,
- os.path.join(destination, "include", "python",
"foopkg"))
-diff --git a/Lib/site.py b/Lib/site.py
-index 7dc1b04..85016b4 100644
---- a/Lib/site.py
-+++ b/Lib/site.py
-@@ -334,11 +334,15 @@ def getsitepackages(prefixes=None):
- seen.add(prefix)
-
- if os.sep == '/':
-+ sitepackages.append(os.path.join(prefix, "lib64",
-+ "python" + sys.version[:3],
-+ "site-packages"))
- sitepackages.append(os.path.join(prefix, "lib",
- "python%d.%d" % sys.version_info[:2],
- "site-packages"))
- else:
- sitepackages.append(prefix)
-+ sitepackages.append(os.path.join(prefix, "lib64",
"site-packages"))
- sitepackages.append(os.path.join(prefix, "lib",
"site-packages"))
- return sitepackages
-
-diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
-index 9ee4d31..53c8606 100644
---- a/Lib/sysconfig.py
-+++ b/Lib/sysconfig.py
-@@ -20,10 +20,10 @@ __all__ = [
-
- _INSTALL_SCHEMES = {
- 'posix_prefix': {
-- 'stdlib': '{installed_base}/lib/python{py_version_short}',
-- 'platstdlib': '{platbase}/lib/python{py_version_short}',
-+ 'stdlib': '{installed_base}/lib64/python{py_version_short}',
-+ 'platstdlib': '{platbase}/lib64/python{py_version_short}',
- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
-- 'platlib':
'{platbase}/lib/python{py_version_short}/site-packages',
-+ 'platlib':
'{platbase}/lib64/python{py_version_short}/site-packages',
- 'include':
- '{installed_base}/include/python{py_version_short}{abiflags}',
- 'platinclude':
-@@ -62,10 +62,10 @@ _INSTALL_SCHEMES = {
- 'data': '{userbase}',
- },
- 'posix_user': {
-- 'stdlib': '{userbase}/lib/python{py_version_short}',
-- 'platstdlib': '{userbase}/lib/python{py_version_short}',
-+ 'stdlib': '{userbase}/lib64/python{py_version_short}',
-+ 'platstdlib': '{userbase}/lib64/python{py_version_short}',
- 'purelib':
'{userbase}/lib/python{py_version_short}/site-packages',
-- 'platlib':
'{userbase}/lib/python{py_version_short}/site-packages',
-+ 'platlib':
'{userbase}/lib64/python{py_version_short}/site-packages',
- 'include': '{userbase}/include/python{py_version_short}',
- 'scripts': '{userbase}/bin',
- 'data': '{userbase}',
-diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
-index 266adf0..e8513b6 100644
---- a/Lib/test/test_site.py
-+++ b/Lib/test/test_site.py
-@@ -275,8 +275,8 @@ class HelperFunctionsTests(unittest.TestCase):
- dirs = site.getsitepackages()
- if os.sep == '/':
- # OS X, Linux, FreeBSD, etc
-- self.assertEqual(len(dirs), 1)
-- wanted = os.path.join('xoxo', 'lib',
-+ self.assertEqual(len(dirs), 2)
-+ wanted = os.path.join('xoxo', 'lib64',
- 'python%d.%d' % sys.version_info[:2],
- 'site-packages')
- self.assertEqual(dirs[0], wanted)
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 59ba9d4..5780ed8 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -133,7 +133,7 @@ LIBDIR= @libdir@
- MANDIR= @mandir@
- INCLUDEDIR= @includedir@
- CONFINCLUDEDIR= $(exec_prefix)/include
--SCRIPTDIR= $(prefix)/lib
-+SCRIPTDIR= $(prefix)/lib64
- ABIFLAGS= @ABIFLAGS@
-
- # Detailed destination directories
-diff --git a/Modules/getpath.c b/Modules/getpath.c
-index 85e737b..2a1fc79 100644
---- a/Modules/getpath.c
-+++ b/Modules/getpath.c
-@@ -500,7 +500,7 @@ calculate_exec_prefix(const _PyCoreConfig *core_config,
- "Could not find platform dependent libraries
<exec_prefix>\n");
- }
- wcsncpy(exec_prefix, calculate->exec_prefix, MAXPATHLEN);
-- joinpath(exec_prefix, L"lib/lib-dynload");
-+ joinpath(exec_prefix, L"lib64/lib-dynload");
- }
- /* 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
-index f1933f7..450cd8a 100644
---- a/setup.py
-+++ b/setup.py
-@@ -531,7 +531,7 @@ class PyBuildExt(build_ext):
- # directories (i.e. '.' and 'Include') must be first. See
issue
- # 10520.
- if not cross_compiling:
-- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
- # only change this for cross builds for 3.3, issues on Mageia
- if cross_compiling:
-@@ -830,11 +830,11 @@ class PyBuildExt(build_ext):
- elif curses_library:
- readline_libs.append(curses_library)
- elif self.compiler.find_library_file(lib_dirs +
-- ['/usr/lib/termcap'],
-+ ['/usr/lib64/termcap'],
- 'termcap'):
- readline_libs.append('termcap')
- exts.append( Extension('readline', ['readline.c'],
-- library_dirs=['/usr/lib/termcap'],
-+ library_dirs=['/usr/lib64/termcap'],
- extra_link_args=readline_extra_link_args,
- libraries=readline_libs) )
- else:
diff --git a/00111-no-static-lib.patch b/00111-no-static-lib.patch
deleted file mode 100644
index 5bfff87..0000000
--- a/00111-no-static-lib.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 0eddd13..7ed4f3c 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -565,7 +565,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
- $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir)
-
- # Build the interpreter
--$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
-+$(BUILDPYTHON): Programs/python.o $(LDLIBRARY) $(PY3LIBRARY)
- $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS)
$(MODLIBS) $(SYSLIBS) $(LDLAST)
-
- platform: $(BUILDPYTHON) pybuilddir.txt
-@@ -609,12 +609,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
- _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
-
--
--# Build static library
--$(LIBRARY): $(LIBRARY_OBJS)
-- -rm -f $@
-- $(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
--
- libpython$(LDVERSION).so: $(LIBRARY_OBJS)
- if test $(INSTSONAME) != $(LDLIBRARY); then \
- $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS)
$(LIBC) $(LIBM) $(LDLAST); \
-@@ -702,7 +696,7 @@ Modules/Setup: $(srcdir)/Modules/Setup.dist
- echo "-----------------------------------------------"; \
- fi
-
--Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
-+Programs/_testembed: Programs/_testembed.o $(LDLIBRARY) $(PY3LIBRARY)
- $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY)
$(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
-
- ############################################################################
-@@ -1460,17 +1454,6 @@ libainstall: @DEF_MAKE_RULE@ python-config
- else true; \
- fi; \
- done
-- @if test -d $(LIBRARY); then :; else \
-- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
-- if test "$(SHLIB_SUFFIX)" = .dll; then \
-- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
-- else \
-- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-- fi; \
-- else \
-- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
-- fi; \
-- fi
- $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
- $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o
- $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
diff --git a/00132-add-rpmbuild-hooks-to-unittest.patch
b/00132-add-rpmbuild-hooks-to-unittest.patch
deleted file mode 100644
index 77dc6ec..0000000
--- a/00132-add-rpmbuild-hooks-to-unittest.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -up Python-3.2.2/Lib/unittest/case.py.add-rpmbuild-hooks-to-unittest
Python-3.2.2/Lib/unittest/case.py
---- Python-3.2.2/Lib/unittest/case.py.add-rpmbuild-hooks-to-unittest 2011-09-03
12:16:44.000000000 -0400
-+++ Python-3.2.2/Lib/unittest/case.py 2011-09-09 06:35:16.365568382 -0400
-@@ -3,6 +3,7 @@
- import sys
- import functools
- import difflib
-+import os
- import logging
- import pprint
- import re
-@@ -101,5 +102,21 @@ def expectedFailure(func):
- raise self.test_case.failureException(msg)
-
-+# Non-standard/downstream-only hooks for handling issues with specific test
-+# cases:
-+
-+def _skipInRpmBuild(reason):
-+ """
-+ Non-standard/downstream-only decorator for marking a specific unit test
-+ to be skipped when run within the %check of an rpmbuild.
-+
-+ Specifically, this takes effect when WITHIN_PYTHON_RPM_BUILD is set within
-+ the environment, and has no effect otherwise.
-+ """
-+ if 'WITHIN_PYTHON_RPM_BUILD' in os.environ:
-+ return skip(reason)
-+ else:
-+ return _id
-+
- class _AssertRaisesBaseContext(_BaseTestCaseContext):
-
- def __init__(self, expected, test_case, expected_regex=None):
-diff -up Python-3.2.2/Lib/unittest/__init__.py.add-rpmbuild-hooks-to-unittest
Python-3.2.2/Lib/unittest/__init__.py
---- Python-3.2.2/Lib/unittest/__init__.py.add-rpmbuild-hooks-to-unittest 2011-09-03
12:16:44.000000000 -0400
-+++ Python-3.2.2/Lib/unittest/__init__.py 2011-09-09 06:35:16.366568382 -0400
-@@ -57,7 +57,8 @@ __unittest = True
-
- from .result import TestResult
- from .case import (TestCase, FunctionTestCase, SkipTest, skip, skipIf,
-- skipUnless, expectedFailure)
-+ skipUnless, expectedFailure,
-+ _skipInRpmBuild)
- from .suite import BaseTestSuite, TestSuite
- from .loader import (TestLoader, defaultTestLoader, makeSuite, getTestCaseNames,
- findTestCases)
diff --git a/00155-avoid-ctypes-thunks.patch b/00155-avoid-ctypes-thunks.patch
deleted file mode 100644
index f03890e..0000000
--- a/00155-avoid-ctypes-thunks.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -up Python-3.2.3/Lib/ctypes/__init__.py.rhbz814391
Python-3.2.3/Lib/ctypes/__init__.py
---- Python-3.2.3/Lib/ctypes/__init__.py.rhbz814391 2012-04-20 15:12:49.017867692 -0400
-+++ Python-3.2.3/Lib/ctypes/__init__.py 2012-04-20 15:15:09.501111408 -0400
-@@ -275,11 +275,6 @@ def _reset_cache():
- # _SimpleCData.c_char_p_from_param
- POINTER(c_char).from_param = c_char_p.from_param
- _pointer_type_cache[None] = c_void_p
-- # XXX for whatever reasons, creating the first instance of a callback
-- # function is needed for the unittests on Win64 to succeed. This MAY
-- # be a compiler bug, since the problem occurs only when _ctypes is
-- # compiled with the MS SDK compiler. Or an uninitialized variable?
-- CFUNCTYPE(c_int)(lambda: None)
-
- def create_unicode_buffer(init, size=None):
- """create_unicode_buffer(aString) -> character array
diff --git a/00160-disable-test_fs_holes-in-rpm-build.patch
b/00160-disable-test_fs_holes-in-rpm-build.patch
deleted file mode 100644
index 9fa91d5..0000000
--- a/00160-disable-test_fs_holes-in-rpm-build.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -up cpython-59223da36dec/Lib/test/test_posix.py.disable-test_fs_holes-in-rpm-build
cpython-59223da36dec/Lib/test/test_posix.py
----
cpython-59223da36dec/Lib/test/test_posix.py.disable-test_fs_holes-in-rpm-build 2012-08-07
17:15:59.000000000 -0400
-+++ cpython-59223da36dec/Lib/test/test_posix.py 2012-08-07 17:16:53.528330330 -0400
-@@ -973,6 +973,7 @@ class PosixTester(unittest.TestCase):
- posix.RTLD_GLOBAL
- posix.RTLD_LOCAL
-
-+ @unittest._skipInRpmBuild('running kernel may not match kernel in chroot')
- @unittest.skipUnless(hasattr(os, 'SEEK_HOLE'),
- "test needs an OS that reports file holes")
- def test_fs_holes(self):
diff --git a/00163-disable-parts-of-test_socket-in-rpm-build.patch
b/00163-disable-parts-of-test_socket-in-rpm-build.patch
deleted file mode 100644
index 0e28036..0000000
--- a/00163-disable-parts-of-test_socket-in-rpm-build.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -up Python-3.3.0b1/Lib/test/test_socket.py.disable-test_socket-in-rpm-builds
Python-3.3.0b1/Lib/test/test_socket.py
---- Python-3.3.0b1/Lib/test/test_socket.py.disable-test_socket-in-rpm-builds 2012-07-24
15:02:30.823355067 -0400
-+++ Python-3.3.0b1/Lib/test/test_socket.py 2012-07-24 15:08:13.021354999 -0400
-@@ -2188,6 +2188,7 @@ class RecvmsgGenericStreamTests(RecvmsgG
- # Tests which require a stream socket and can use either recvmsg()
- # or recvmsg_into().
-
-+ @unittest._skipInRpmBuild('fails intermittently when run within Koji')
- def testRecvmsgEOF(self):
- # Receive end-of-stream indicator (b"", peer socket closed).
- msg, ancdata, flags, addr = self.doRecvmsg(self.serv_sock, 1024)
diff --git a/00170-gc-assertions.patch b/00170-gc-assertions.patch
deleted file mode 100644
index c37e69c..0000000
--- a/00170-gc-assertions.patch
+++ /dev/null
@@ -1,310 +0,0 @@
-diff --git a/Include/object.h b/Include/object.h
-index c772dea..5729797 100644
---- a/Include/object.h
-+++ b/Include/object.h
-@@ -1098,6 +1098,49 @@ PyAPI_FUNC(void)
- _PyObject_DebugTypeStats(FILE *out);
- #endif /* ifndef Py_LIMITED_API */
-
-+/*
-+ Define a pair of assertion macros.
-+
-+ These work like the regular C assert(), in that they will abort the
-+ process with a message on stderr if the given condition fails to hold,
-+ but compile away to nothing if NDEBUG is defined.
-+
-+ However, before aborting, Python will also try to call _PyObject_Dump() on
-+ the given object. This may be of use when investigating bugs in which a
-+ particular object is corrupt (e.g. buggy a tp_visit method in an extension
-+ module breaking the garbage collector), to help locate the broken objects.
-+
-+ The WITH_MSG variant allows you to supply an additional message that Python
-+ will attempt to print to stderr, after the object dump.
-+*/
-+#ifdef NDEBUG
-+/* No debugging: compile away the assertions: */
-+#define PyObject_ASSERT_WITH_MSG(obj, expr, msg) ((void)0)
-+#else
-+/* With debugging: generate checks: */
-+#define PyObject_ASSERT_WITH_MSG(obj, expr, msg) \
-+ ((expr) \
-+ ? (void)(0) \
-+ : _PyObject_AssertFailed((obj), \
-+ (msg), \
-+ (__STRING(expr)), \
-+ (__FILE__), \
-+ (__LINE__), \
-+ (__PRETTY_FUNCTION__)))
-+#endif
-+
-+#define PyObject_ASSERT(obj, expr) \
-+ PyObject_ASSERT_WITH_MSG(obj, expr, NULL)
-+
-+/*
-+ Declare and define the entrypoint even when NDEBUG is defined, to avoid
-+ causing compiler/linker errors when building extensions without NDEBUG
-+ against a Python built with NDEBUG defined
-+*/
-+PyAPI_FUNC(void) _PyObject_AssertFailed(PyObject *, const char *,
-+ const char *, const char *, int,
-+ const char *);
-+
- #ifdef __cplusplus
- }
- #endif
-diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py
-index 904fc7d..288e242 100644
---- a/Lib/test/test_gc.py
-+++ b/Lib/test/test_gc.py
-@@ -1,10 +1,11 @@
- import unittest
- from test.support import (verbose, refcount_test, run_unittest,
- strip_python_stderr, cpython_only, start_threads,
-- temp_dir, requires_type_collecting)
-+ temp_dir, import_module, requires_type_collecting)
- from test.support.script_helper import assert_python_ok, make_script
-
- import sys
-+import sysconfig
- import time
- import gc
- import weakref
-@@ -46,6 +47,8 @@ class GC_Detector(object):
- # gc collects it.
- self.wr = weakref.ref(C1055820(666), it_happened)
-
-+BUILD_WITH_NDEBUG = ('-DNDEBUG' in
sysconfig.get_config_vars()['PY_CFLAGS'])
-+
- @with_tp_del
- class Uncollectable(object):
- """Create a reference cycle with multiple __del__ methods.
-@@ -863,6 +866,50 @@ class GCCallbackTests(unittest.TestCase):
- self.assertEqual(len(gc.garbage), 0)
-
-
-+ @unittest.skipIf(BUILD_WITH_NDEBUG,
-+ 'built with -NDEBUG')
-+ def test_refcount_errors(self):
-+ self.preclean()
-+ # Verify the "handling" of objects with broken refcounts
-+ import_module("ctypes") #skip if not supported
-+
-+ import subprocess
-+ code = '''if 1:
-+ a = []
-+ b = [a]
-+
-+ # Simulate the refcount of "a" being too low (compared to the
-+ # references held on it by live data), but keeping it above zero
-+ # (to avoid deallocating it):
-+ import ctypes
-+ ctypes.pythonapi.Py_DecRef(ctypes.py_object(a))
-+
-+ # The garbage collector should now have a fatal error when it reaches
-+ # the broken object:
-+ import gc
-+ gc.collect()
-+ '''
-+ p = subprocess.Popen([sys.executable, "-c", code],
-+ stdout=subprocess.PIPE,
-+ stderr=subprocess.PIPE)
-+ stdout, stderr = p.communicate()
-+ p.stdout.close()
-+ p.stderr.close()
-+ # Verify that stderr has a useful error message:
-+ self.assertRegex(stderr,
-+ b'Modules/gcmodule.c:[0-9]+: visit_decref: Assertion
"\(\(gc\)->gc.gc_refs >> \(1\)\) != 0" failed.')
-+ self.assertRegex(stderr,
-+ b'refcount was too small')
-+ self.assertRegex(stderr,
-+ b'object : \[\]')
-+ self.assertRegex(stderr,
-+ b'type : list')
-+ self.assertRegex(stderr,
-+ b'refcount: 1')
-+ self.assertRegex(stderr,
-+ b'address : 0x[0-9a-f]+')
-+
-+
- class GCTogglingTests(unittest.TestCase):
- def setUp(self):
- gc.enable()
-diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
-index 8ba1093..e795308 100644
---- a/Modules/gcmodule.c
-+++ b/Modules/gcmodule.c
-@@ -239,7 +239,8 @@ update_refs(PyGC_Head *containers)
- {
- PyGC_Head *gc = containers->gc.gc_next;
- for (; gc != containers; gc = gc->gc.gc_next) {
-- assert(_PyGCHead_REFS(gc) == GC_REACHABLE);
-+ PyObject_ASSERT(FROM_GC(gc),
-+ _PyGCHead_REFS(gc) == GC_REACHABLE);
- _PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc)));
- /* Python's cyclic gc should never see an incoming refcount
- * of 0: if something decref'ed to 0, it should have been
-@@ -259,7 +260,8 @@ update_refs(PyGC_Head *containers)
- * so serious that maybe this should be a release-build
- * check instead of an assert?
- */
-- assert(_PyGCHead_REFS(gc) != 0);
-+ PyObject_ASSERT(FROM_GC(gc),
-+ _PyGCHead_REFS(gc) != 0);
- }
- }
-
-@@ -274,7 +276,9 @@ visit_decref(PyObject *op, void *data)
- * generation being collected, which can be recognized
- * because only they have positive gc_refs.
- */
-- assert(_PyGCHead_REFS(gc) != 0); /* else refcount was too small */
-+ PyObject_ASSERT_WITH_MSG(FROM_GC(gc),
-+ _PyGCHead_REFS(gc) != 0,
-+ "refcount was too small"); /* else refcount was too
small */
- if (_PyGCHead_REFS(gc) > 0)
- _PyGCHead_DECREF(gc);
- }
-@@ -334,9 +338,10 @@ visit_reachable(PyObject *op, PyGC_Head *reachable)
- * If gc_refs == GC_UNTRACKED, it must be ignored.
- */
- else {
-- assert(gc_refs > 0
-- || gc_refs == GC_REACHABLE
-- || gc_refs == GC_UNTRACKED);
-+ PyObject_ASSERT(FROM_GC(gc),
-+ gc_refs > 0
-+ || gc_refs == GC_REACHABLE
-+ || gc_refs == GC_UNTRACKED);
- }
- }
- return 0;
-@@ -378,7 +383,7 @@ move_unreachable(PyGC_Head *young, PyGC_Head *unreachable)
- */
- PyObject *op = FROM_GC(gc);
- traverseproc traverse = Py_TYPE(op)->tp_traverse;
-- assert(_PyGCHead_REFS(gc) > 0);
-+ PyObject_ASSERT(op, _PyGCHead_REFS(gc) > 0);
- _PyGCHead_SET_REFS(gc, GC_REACHABLE);
- (void) traverse(op,
- (visitproc)visit_reachable,
-@@ -441,7 +446,7 @@ move_legacy_finalizers(PyGC_Head *unreachable, PyGC_Head
*finalizers)
- for (gc = unreachable->gc.gc_next; gc != unreachable; gc = next) {
- PyObject *op = FROM_GC(gc);
-
-- assert(IS_TENTATIVELY_UNREACHABLE(op));
-+ PyObject_ASSERT(op, IS_TENTATIVELY_UNREACHABLE(op));
- next = gc->gc.gc_next;
-
- if (has_legacy_finalizer(op)) {
-@@ -517,7 +522,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
- PyWeakReference **wrlist;
-
- op = FROM_GC(gc);
-- assert(IS_TENTATIVELY_UNREACHABLE(op));
-+ PyObject_ASSERT(op, IS_TENTATIVELY_UNREACHABLE(op));
- next = gc->gc.gc_next;
-
- if (! PyType_SUPPORTS_WEAKREFS(Py_TYPE(op)))
-@@ -538,9 +543,9 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
- * the callback pointer intact. Obscure: it also
- * changes *wrlist.
- */
-- assert(wr->wr_object == op);
-+ PyObject_ASSERT(wr->wr_object, wr->wr_object == op);
- _PyWeakref_ClearRef(wr);
-- assert(wr->wr_object == Py_None);
-+ PyObject_ASSERT(wr->wr_object, wr->wr_object == Py_None);
- if (wr->wr_callback == NULL)
- continue; /* no callback */
-
-@@ -574,7 +579,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
- */
- if (IS_TENTATIVELY_UNREACHABLE(wr))
- continue;
-- assert(IS_REACHABLE(wr));
-+ PyObject_ASSERT(op, IS_REACHABLE(wr));
-
- /* Create a new reference so that wr can't go away
- * before we can process it again.
-@@ -583,7 +588,8 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
-
- /* Move wr to wrcb_to_call, for the next pass. */
- wrasgc = AS_GC(wr);
-- assert(wrasgc != next); /* wrasgc is reachable, but
-+ PyObject_ASSERT(op, wrasgc != next);
-+ /* wrasgc is reachable, but
- next isn't, so they can't
- be the same */
- gc_list_move(wrasgc, &wrcb_to_call);
-@@ -599,11 +605,11 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
-
- gc = wrcb_to_call.gc.gc_next;
- op = FROM_GC(gc);
-- assert(IS_REACHABLE(op));
-- assert(PyWeakref_Check(op));
-+ PyObject_ASSERT(op, IS_REACHABLE(op));
-+ PyObject_ASSERT(op, PyWeakref_Check(op));
- wr = (PyWeakReference *)op;
- callback = wr->wr_callback;
-- assert(callback != NULL);
-+ PyObject_ASSERT(op, callback != NULL);
-
- /* copy-paste of weakrefobject.c's handle_callback() */
- temp = PyObject_CallFunctionObjArgs(callback, wr, NULL);
-@@ -720,12 +726,14 @@ check_garbage(PyGC_Head *collectable)
- for (gc = collectable->gc.gc_next; gc != collectable;
- gc = gc->gc.gc_next) {
- _PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc)));
-- assert(_PyGCHead_REFS(gc) != 0);
-+ PyObject_ASSERT(FROM_GC(gc),
-+ _PyGCHead_REFS(gc) != 0);
- }
- subtract_refs(collectable);
- for (gc = collectable->gc.gc_next; gc != collectable;
- gc = gc->gc.gc_next) {
-- assert(_PyGCHead_REFS(gc) >= 0);
-+ PyObject_ASSERT(FROM_GC(gc),
-+ _PyGCHead_REFS(gc) >= 0);
- if (_PyGCHead_REFS(gc) != 0)
- return -1;
- }
-diff --git a/Objects/object.c b/Objects/object.c
-index 220aa90..f6c7161 100644
---- a/Objects/object.c
-+++ b/Objects/object.c
-@@ -2177,6 +2177,35 @@ _PyTrash_thread_destroy_chain(void)
- --tstate->trash_delete_nesting;
- }
-
-+PyAPI_FUNC(void)
-+_PyObject_AssertFailed(PyObject *obj, const char *msg, const char *expr,
-+ const char *file, int line, const char *function)
-+{
-+ fprintf(stderr,
-+ "%s:%d: %s: Assertion \"%s\" failed.\n",
-+ file, line, function, expr);
-+ if (msg) {
-+ fprintf(stderr, "%s\n", msg);
-+ }
-+
-+ fflush(stderr);
-+
-+ if (obj) {
-+ /* This might succeed or fail, but we're about to abort, so at least
-+ try to provide any extra info we can: */
-+ _PyObject_Dump(obj);
-+ }
-+ else {
-+ fprintf(stderr, "NULL object\n");
-+ }
-+
-+ fflush(stdout);
-+ fflush(stderr);
-+
-+ /* Terminate the process: */
-+ abort();
-+}
-+
- #ifndef Py_TRACE_REFS
- /* For Py_LIMITED_API, we need an out-of-line version of _Py_Dealloc.
- Define this here, so we can undefine the macro. */
diff --git a/00178-dont-duplicate-flags-in-sysconfig.patch
b/00178-dont-duplicate-flags-in-sysconfig.patch
deleted file mode 100644
index fc49b30..0000000
--- a/00178-dont-duplicate-flags-in-sysconfig.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -r 39b9b05c3085 Lib/distutils/sysconfig.py
---- a/Lib/distutils/sysconfig.py Wed Apr 10 00:27:23 2013 +0200
-+++ b/Lib/distutils/sysconfig.py Wed Apr 10 10:14:18 2013 +0200
-@@ -362,7 +362,10 @@
- done[n] = item = ""
- if found:
- after = value[m.end():]
-- value = value[:m.start()] + item + after
-+ value = value[:m.start()]
-+ if item.strip() not in value:
-+ value += item
-+ value += after
- if "$" in after:
- notdone[name] = value
- else:
-diff -r 39b9b05c3085 Lib/sysconfig.py
---- a/Lib/sysconfig.py Wed Apr 10 00:27:23 2013 +0200
-+++ b/Lib/sysconfig.py Wed Apr 10 10:14:18 2013 +0200
-@@ -296,7 +296,10 @@
-
- if found:
- after = value[m.end():]
-- value = value[:m.start()] + item + after
-+ value = value[:m.start()]
-+ if item.strip() not in value:
-+ value += item
-+ value += after
- if "$" in after:
- notdone[name] = value
- else:
diff --git a/00189-add-rewheel-module.patch b/00189-add-rewheel-module.patch
deleted file mode 100644
index d8ba671..0000000
--- a/00189-add-rewheel-module.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
-index 7ff938b..8c3d062 100644
---- a/Lib/ensurepip/__init__.py
-+++ b/Lib/ensurepip/__init__.py
-@@ -1,8 +1,10 @@
- import os
- import os.path
- import pkgutil
-+import shutil
- import sys
- import tempfile
-+from ensurepip import rewheel
-
-
- __all__ = ["version", "bootstrap"]
-@@ -24,8 +26,15 @@ def _run_pip(args, additional_paths=None):
- sys.path = additional_paths + sys.path
-
- # Install the bundled software
-- import pip._internal
-- return pip._internal.main(args)
-+ try:
-+ # pip 10
-+ from pip._internal import main
-+ except ImportError:
-+ # pip 9
-+ from pip import main
-+ if args[0] in ["install", "list", "wheel"]:
-+ args.append('--pre')
-+ return main(args)
-
-
- def version():
-@@ -88,20 +97,39 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
- # omit pip and easy_install
- os.environ["ENSUREPIP_OPTIONS"] = "install"
-
-+ whls = []
-+ rewheel_dir = None
-+ # try to see if we have system-wide versions of _PROJECTS
-+ dep_records = rewheel.find_system_records([p[0] for p in _PROJECTS])
-+ # TODO: check if system-wide versions are the newest ones
-+ # if --upgrade is used?
-+ if all(dep_records):
-+ # if we have all _PROJECTS installed system-wide, we'll recreate
-+ # wheels from them and install those
-+ rewheel_dir = tempfile.TemporaryDirectory()
-+ for dr in dep_records:
-+ new_whl = rewheel.rewheel_from_record(dr, rewheel_dir.name)
-+ whls.append(os.path.join(rewheel_dir.name, new_whl))
-+ else:
-+ # if we don't have all the _PROJECTS installed system-wide,
-+ # let's just fall back to bundled wheels
-+ for project, version in _PROJECTS:
-+ whl = os.path.join(
-+ os.path.dirname(__file__),
-+ "_bundled",
-+ "{}-{}-py2.py3-none-any.whl".format(project, version)
-+ )
-+ whls.append(whl)
-+
- with tempfile.TemporaryDirectory() as tmpdir:
- # Put our bundled wheels into a temporary directory and construct the
- # additional paths that need added to sys.path
- additional_paths = []
-- for project, version in _PROJECTS:
-- wheel_name = "{}-{}-py2.py3-none-any.whl".format(project,
version)
-- whl = pkgutil.get_data(
-- "ensurepip",
-- "_bundled/{}".format(wheel_name),
-- )
-- with open(os.path.join(tmpdir, wheel_name), "wb") as fp:
-- fp.write(whl)
--
-- additional_paths.append(os.path.join(tmpdir, wheel_name))
-+ for whl in whls:
-+ shutil.copy(whl, tmpdir)
-+ additional_paths.append(os.path.join(tmpdir, os.path.basename(whl)))
-+ if rewheel_dir:
-+ rewheel_dir.cleanup()
-
- # Construct the arguments to be passed to the pip command
- args = ["install", "--no-index", "--find-links",
tmpdir]
-diff --git a/Lib/ensurepip/rewheel/__init__.py b/Lib/ensurepip/rewheel/__init__.py
-new file mode 100644
-index 0000000..753c764
---- /dev/null
-+++ b/Lib/ensurepip/rewheel/__init__.py
-@@ -0,0 +1,143 @@
-+import argparse
-+import codecs
-+import csv
-+import email.parser
-+import os
-+import io
-+import re
-+import site
-+import subprocess
-+import sys
-+import zipfile
-+
-+def run():
-+ parser = argparse.ArgumentParser(description='Recreate wheel of package with
given RECORD.')
-+ parser.add_argument('record_path',
-+ help='Path to RECORD file')
-+ parser.add_argument('-o', '--output-dir',
-+ help='Dir where to place the wheel, defaults to current
working dir.',
-+ dest='outdir',
-+ default=os.path.curdir)
-+
-+ ns = parser.parse_args()
-+ retcode = 0
-+ try:
-+ print(rewheel_from_record(**vars(ns)))
-+ except BaseException as e:
-+ print('Failed: {}'.format(e))
-+ retcode = 1
-+ sys.exit(1)
-+
-+def find_system_records(projects):
-+ """Return list of paths to RECORD files for system-installed
projects.
-+
-+ If a project is not installed, the resulting list contains None instead
-+ of a path to its RECORD
-+ """
-+ records = []
-+ # get system site-packages dirs
-+ sys_sitepack = site.getsitepackages([sys.base_prefix, sys.base_exec_prefix])
-+ sys_sitepack = [sp for sp in sys_sitepack if os.path.exists(sp)]
-+ # try to find all projects in all system site-packages
-+ for project in projects:
-+ path = None
-+ for sp in sys_sitepack:
-+ dist_info_re = os.path.join(sp, project) +
r'-[^\{0}]+\.dist-info'.format(os.sep)
-+ candidates = [os.path.join(sp, p) for p in os.listdir(sp)]
-+ # filter out candidate dirs based on the above regexp
-+ filtered = [c for c in candidates if re.match(dist_info_re, c)]
-+ # if we have 0 or 2 or more dirs, something is wrong...
-+ if len(filtered) == 1:
-+ path = filtered[0]
-+ if path is not None:
-+ records.append(os.path.join(path, 'RECORD'))
-+ else:
-+ records.append(None)
-+ return records
-+
-+def rewheel_from_record(record_path, outdir):
-+ """Recreates a whee of package with given record_path and returns
path
-+ to the newly created wheel."""
-+ site_dir = os.path.dirname(os.path.dirname(record_path))
-+ record_relpath = record_path[len(site_dir):].strip(os.path.sep)
-+ to_write, to_omit = get_records_to_pack(site_dir, record_relpath)
-+ new_wheel_name = get_wheel_name(record_path)
-+ new_wheel_path = os.path.join(outdir, new_wheel_name + '.whl')
-+
-+ new_wheel = zipfile.ZipFile(new_wheel_path, mode='w',
compression=zipfile.ZIP_DEFLATED)
-+ # we need to write a new record with just the files that we will write,
-+ # e.g. not binaries and *.pyc/*.pyo files
-+ new_record = io.StringIO()
-+ writer = csv.writer(new_record)
-+
-+ # handle files that we can write straight away
-+ for f, sha_hash, size in to_write:
-+ new_wheel.write(os.path.join(site_dir, f), arcname=f)
-+ writer.writerow([f, sha_hash,size])
-+
-+ # rewrite the old wheel file with a new computed one
-+ writer.writerow([record_relpath, '', ''])
-+ new_wheel.writestr(record_relpath, new_record.getvalue())
-+
-+ new_wheel.close()
-+
-+ return new_wheel.filename
-+
-+def get_wheel_name(record_path):
-+ """Return proper name of the wheel, without .whl."""
-+
-+ wheel_info_path = os.path.join(os.path.dirname(record_path), 'WHEEL')
-+ with codecs.open(wheel_info_path, encoding='utf-8') as wheel_info_file:
-+ wheel_info = email.parser.Parser().parsestr(wheel_info_file.read())
-+
-+ metadata_path = os.path.join(os.path.dirname(record_path), 'METADATA')
-+ with codecs.open(metadata_path, encoding='utf-8') as metadata_file:
-+ metadata = email.parser.Parser().parsestr(metadata_file.read())
-+
-+ # construct name parts according to wheel spec
-+ distribution = metadata.get('Name')
-+ version = metadata.get('Version')
-+ build_tag = '' # nothing for now
-+ lang_tag = []
-+ for t in wheel_info.get_all('Tag'):
-+ lang_tag.append(t.split('-')[0])
-+ lang_tag = '.'.join(lang_tag)
-+ abi_tag, plat_tag = wheel_info.get('Tag').split('-')[1:3]
-+ # leave out build tag, if it is empty
-+ to_join = filter(None, [distribution, version, build_tag, lang_tag, abi_tag,
plat_tag])
-+ return '-'.join(list(to_join))
-+
-+def get_records_to_pack(site_dir, record_relpath):
-+ """Accepts path of sitedir and path of RECORD file relative to it.
-+ Returns two lists:
-+ - list of files that can be written to new RECORD straight away
-+ - list of files that shouldn't be written or need some processing
-+ (pyc and pyo files, scripts)
-+ """
-+ record_file_path = os.path.join(site_dir, record_relpath)
-+ with codecs.open(record_file_path, encoding='utf-8') as record_file:
-+ record_contents = record_file.read()
-+ # temporary fix for
https://github.com/pypa/pip/issues/1376
-+ # we need to ignore files under ".data" directory
-+ data_dir = os.path.dirname(record_relpath).strip(os.path.sep)
-+ data_dir = data_dir[:-len('dist-info')] + 'data'
-+
-+ to_write = []
-+ to_omit = []
-+ for l in record_contents.splitlines():
-+ spl = l.split(',')
-+ if len(spl) == 3:
-+ # new record will omit (or write differently):
-+ # - abs paths, paths with ".." (entry points),
-+ # - pyc+pyo files
-+ # - the old RECORD file
-+ # TODO: is there any better way to recognize an entry point?
-+ if os.path.isabs(spl[0]) or spl[0].startswith('..') or \
-+ spl[0].endswith('.pyc') or spl[0].endswith('.pyo') or \
-+ spl[0] == record_relpath or spl[0].startswith(data_dir):
-+ to_omit.append(spl)
-+ else:
-+ to_write.append(spl)
-+ else:
-+ pass # bad RECORD or empty line
-+ return to_write, to_omit
-diff --git a/Makefile.pre.in b/Makefile.pre.in
-index d07b312..1c6720e 100644
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -1301,7 +1301,7 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
- test/test_asyncio \
- collections concurrent concurrent/futures encodings \
- email email/mime test/test_email test/test_email/data \
-- ensurepip ensurepip/_bundled \
-+ ensurepip ensurepip/_bundled ensurepip/rewheel \
- html json test/test_json http dbm xmlrpc \
- sqlite3 sqlite3/test \
- logging csv wsgiref urllib \
diff --git a/00205-make-libpl-respect-lib64.patch b/00205-make-libpl-respect-lib64.patch
deleted file mode 100644
index 3e7c797..0000000
--- a/00205-make-libpl-respect-lib64.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up Python-3.5.0/Makefile.pre.in.lib Python-3.5.0/Makefile.pre.in
---- Python-3.5.0/Makefile.pre.in.lib 2015-09-21 15:39:47.928286620 +0200
-+++ Python-3.5.0/Makefile.pre.in 2015-09-21 15:42:58.004042762 +0200
-@@ -1340,7 +1340,7 @@ inclinstall:
-
- # Install the library and miscellaneous stuff needed for extending/embedding
- # This goes into $(exec_prefix)
--LIBPL= @LIBPL@
-+LIBPL= $(LIBDEST)/config-$(LDVERSION)-$(MULTIARCH)
-
- # pkgconfig directory
- LIBPC= $(LIBDIR)/pkgconfig
diff --git a/00251-change-user-install-location.patch
b/00251-change-user-install-location.patch
deleted file mode 100644
index 4104449..0000000
--- a/00251-change-user-install-location.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
-index 0258d3d..4ebf50a 100644
---- a/Lib/distutils/command/install.py
-+++ b/Lib/distutils/command/install.py
-@@ -418,8 +418,19 @@ class install(Command):
- raise DistutilsOptionError(
- "must not supply exec-prefix without prefix")
-
-- self.prefix = os.path.normpath(sys.prefix)
-- self.exec_prefix = os.path.normpath(sys.exec_prefix)
-+ # self.prefix is set to sys.prefix + /local/
-+ # if neither RPM build nor virtual environment is
-+ # detected to make pip and distutils install packages
-+ # into the separate location.
-+ if (not (hasattr(sys, 'real_prefix') or
-+ sys.prefix != sys.base_prefix) and
-+ 'RPM_BUILD_ROOT' not in os.environ):
-+ addition = "/local"
-+ else:
-+ addition = ""
-+
-+ self.prefix = os.path.normpath(sys.prefix) + addition
-+ self.exec_prefix = os.path.normpath(sys.exec_prefix) + addition
-
- else:
- if self.exec_prefix is None:
-diff --git a/Lib/site.py b/Lib/site.py
-index 0fc9200..c95202e 100644
---- a/Lib/site.py
-+++ b/Lib/site.py
-@@ -322,7 +322,14 @@ def getsitepackages(prefixes=None):
- return sitepackages
-
- def addsitepackages(known_paths, prefixes=None):
-- """Add site-packages to sys.path"""
-+ """Add site-packages to sys.path
-+
-+ '/usr/local' is included in PREFIXES if RPM build is not detected
-+ to make packages installed into this location visible.
-+
-+ """
-+ if ENABLE_USER_SITE and 'RPM_BUILD_ROOT' not in os.environ:
-+ PREFIXES.insert(0, "/usr/local")
- for sitedir in getsitepackages(prefixes):
- if os.path.isdir(sitedir):
- addsitedir(sitedir, known_paths)
diff --git a/00274-fix-arch-names.patch b/00274-fix-arch-names.patch
deleted file mode 100644
index c8e53c1..0000000
--- a/00274-fix-arch-names.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-diff --git a/config.sub b/config.sub
-index ba37cf9..52a9ec6 100755
---- a/config.sub
-+++ b/config.sub
-@@ -1042,7 +1042,7 @@ case $basic_machine in
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
-- ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed
's/^[^-]*-//'`
-+ ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo "$basic_machine" | sed
's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little)
- basic_machine=powerpc64le-unknown
-diff --git a/configure.ac b/configure.ac
-index 2535969..9fb3193 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -765,9 +765,9 @@ cat >> conftest.c <<EOF
- alpha-linux-gnu
- # elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
- # if defined(__ARMEL__)
-- arm-linux-gnueabihf
-+ arm-linux-gnueabi
- # else
-- armeb-linux-gnueabihf
-+ armeb-linux-gnueabi
- # endif
- # elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
- # if defined(__ARMEL__)
-@@ -807,7 +807,7 @@ cat >> conftest.c <<EOF
- # elif _MIPS_SIM == _ABIN32
- mips64el-linux-gnuabin32
- # elif _MIPS_SIM == _ABI64
-- mips64el-linux-gnuabi64
-+ mips64el-linux-gnu
- # else
- # error unknown platform triplet
- # endif
-@@ -817,7 +817,7 @@ cat >> conftest.c <<EOF
- # elif _MIPS_SIM == _ABIN32
- mips64-linux-gnuabin32
- # elif _MIPS_SIM == _ABI64
-- mips64-linux-gnuabi64
-+ mips64-linux-gnu
- # else
- # error unknown platform triplet
- # endif
-@@ -827,9 +827,9 @@ cat >> conftest.c <<EOF
- powerpc-linux-gnuspe
- # elif defined(__powerpc64__)
- # if defined(__LITTLE_ENDIAN__)
-- powerpc64le-linux-gnu
-+ ppc64le-linux-gnu
- # else
-- powerpc64-linux-gnu
-+ ppc64-linux-gnu
- # endif
- # elif defined(__powerpc__)
- powerpc-linux-gnu
diff --git a/00291-setup-Link-ctypes-against-dl-explicitly.patch
b/00291-setup-Link-ctypes-against-dl-explicitly.patch
deleted file mode 100644
index 4bf4801..0000000
--- a/00291-setup-Link-ctypes-against-dl-explicitly.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From aae2ef0bace0e38f4ee5aaa4642aa32450a84216 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82(a)fedoraproject.org>
-Date: Tue, 23 Jan 2018 14:43:43 +0100
-Subject: [PATCH] setup: Link ctypes against dl explicitly
-
----
- setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index c23628a2a9..9e40bb53e6 100644
---- a/setup.py
-+++ b/setup.py
-@@ -1935,7 +1935,7 @@ class PyBuildExt(build_ext):
- self.use_system_libffi = False
- include_dirs = []
- extra_compile_args = []
-- extra_link_args = []
-+ extra_link_args = ['-ldl']
- sources = ['_ctypes/_ctypes.c',
- '_ctypes/callbacks.c',
- '_ctypes/callproc.c',
---
-2.16.1
-
diff --git a/README.md b/README.md
deleted file mode 100644
index 42bf07d..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# python37
-
-The python37 package
\ No newline at end of file
diff --git a/check-pyc-and-pyo-timestamps.py b/check-pyc-and-pyo-timestamps.py
deleted file mode 100644
index 262a985..0000000
--- a/check-pyc-and-pyo-timestamps.py
+++ /dev/null
@@ -1,62 +0,0 @@
-"""Checks if all *.pyc and *.pyo files have later mtime than their *.py
files."""
-
-import importlib.util
-import os
-import sys
-
-# list of test and other files that we expect not to have bytecode
-not_compiled = [
- '/usr/bin/pathfix.py',
- 'test/bad_coding.py',
- 'test/bad_coding2.py',
- 'test/badsyntax_3131.py',
- 'test/badsyntax_future3.py',
- 'test/badsyntax_future4.py',
- 'test/badsyntax_future5.py',
- 'test/badsyntax_future6.py',
- 'test/badsyntax_future7.py',
- 'test/badsyntax_future8.py',
- 'test/badsyntax_future9.py',
- 'test/badsyntax_future10.py',
- 'test/badsyntax_async1.py',
- 'test/badsyntax_async2.py',
- 'test/badsyntax_async3.py',
- 'test/badsyntax_async4.py',
- 'test/badsyntax_async5.py',
- 'test/badsyntax_async6.py',
- 'test/badsyntax_async7.py',
- 'test/badsyntax_async8.py',
- 'test/badsyntax_async9.py',
- 'test/badsyntax_pep3120.py',
- 'lib2to3/tests/data/bom.py',
- 'lib2to3/tests/data/crlf.py',
- 'lib2to3/tests/data/different_encoding.py',
- 'lib2to3/tests/data/false_encoding.py',
- 'lib2to3/tests/data/py2_test_grammar.py',
- '.debug-gdb.py',
-]
-failed = 0
-
-
-def bytecode_expected(source):
- for f in not_compiled:
- if source.endswith(f):
- return False
- return True
-
-
-compiled = filter(lambda f: bytecode_expected(f), sys.argv[1:])
-for f in compiled:
- # check both pyo and pyc
- to_check = map(lambda b: importlib.util.cache_from_source(f, b), (True, False))
- f_mtime = os.path.getmtime(f)
- for c in to_check:
- c_mtime = os.path.getmtime(c)
- if c_mtime < f_mtime:
- sys.stderr.write('Failed bytecompilation timestamps check: ')
- sys.stderr.write('Bytecode file {} is older than source file
{}.\n'.format(c, f))
- failed += 1
-
-if failed:
- sys.stderr.write('\n{} files failed bytecompilation timestamps
check.\n'.format(failed))
- sys.exit(1)
diff --git a/dead.package b/dead.package
new file mode 100644
index 0000000..f3293b6
--- /dev/null
+++ b/dead.package
@@ -0,0 +1 @@
+Provided by the python3 package. Will be reintroduced when python3 is Python 3.8.
diff --git a/idle3.appdata.xml b/idle3.appdata.xml
deleted file mode 100644
index 94f87a2..0000000
--- a/idle3.appdata.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- Copyright 2017 Zbigniew Jędrzejewski-Szmek -->
-<application>
- <id type="desktop">idle3.desktop</id>
- <name>IDLE3</name>
- <metadata_licence>CC0</metadata_licence>
- <project_license>Python-2.0</project_license>
- <summary>Python 3 Integrated Development and Learning
Environment</summary>
- <description>
- <p>
- IDLE is Python’s Integrated Development and Learning Environment.
- The GUI is uniform between Windows, Unix, and Mac OS X.
- IDLE provides an easy way to start writing, running, and debugging
- Python code.
- </p>
- <p>
- IDLE is written in pure Python, and uses the tkinter GUI toolkit.
- It provides:
- </p>
- <ul>
- <li>a Python shell window (interactive interpreter) with colorizing of code
input, output, and error messages,</li>
- <li>a multi-window text editor with multiple undo, Python colorizing, smart
indent, call tips, auto completion, and other features,</li>
- <li>search within any window, replace within editor windows, and search
through multiple files (grep),</li>
- <li>a debugger with persistent breakpoints, stepping, and viewing of global
and local namespaces.</li>
- </ul>
- </description>
- <url
type="homepage">https://docs.python.org/3/library/idle.html&...
- <screenshots>
- <screenshot
type="default">http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-main-window.png</screenshot>
-
<screenshot>http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-class-browser.png</screenshot>
-
<screenshot>http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-code-viewer.png</screenshot>
- </screenshots>
- <update_contact>zbyszek(a)in.waw.pl</update_contact>
-</application>
diff --git a/idle3.desktop b/idle3.desktop
deleted file mode 100644
index dc1d3c3..0000000
--- a/idle3.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Name=IDLE 3
-Comment=Python 3 Integrated Development and Learning Environment
-Exec=idle3 %F
-TryExec=idle3
-Terminal=false
-Type=Application
-Icon=idle3
-Categories=Development;IDE;
-MimeType=text/x-python;
\ No newline at end of file
diff --git a/python37.rpmlintrc b/python37.rpmlintrc
deleted file mode 100644
index 6c1ce83..0000000
--- a/python37.rpmlintrc
+++ /dev/null
@@ -1,75 +0,0 @@
-# KNOWN BUGS:
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1489816
-addFilter(r'crypto-policy-non-compliance-openssl')
-
-
-# TESTS:
-addFilter(r'(zero-length|pem-certificate|uncompressed-zip)
/usr/lib(64)?/python3.\d/test')
-
-
-# OTHER DELIBERATES:
-# chroot function
-addFilter(r'missing-call-to-chdir-with-chroot')
-
-# intentionally unversioned and selfobsoleted
-addFilter(r'unversioned-explicit-obsoletes python')
-addFilter(r'self-obsoletion python3\d obsoletes python3\d')
-
-# intentionally hardcoded
-addFilter(r'hardcoded-library-path in
%{_prefix}/lib/(debug/%{_libdir}|python%{pybasever})')
-
-# intentional for our pythonXY package
-addFilter(r'python3\d\.[^:]+: (E|W): devel-file-in-non-devel-package')
-
-# we have non binary stuff, python files
-addFilter(r'only-non-binary-in-usr-lib')
-
-# some devel files that are deliberately needed
-addFilter(r'devel-file-in-non-devel-package
/usr/include/python3\.\dm/pyconfig-(32|64)\.h')
-addFilter(r'devel-file-in-non-devel-package
/usr/lib64/python3\.\d/distutils/tests/xxmodule\.c')
-
-
-# SORRY, NOT SORRY:
-# manual pages
-addFilter(r'no-manual-page-for-binary
(idle|pydoc|pyvenv|2to3|python3-debug|pathfix\.py)')
-addFilter(r'no-manual-page-for-binary python3.*-config$')
-addFilter(r'no-manual-page-for-binary python3.\dd?m$')
-
-# missing documentation from subpackages
-addFilter(r'^python3\d?-(debug|tkinter|test|idle)\.[^:]+: (E|W):
no-documentation')
-
-# platform python is obsoleted, but not provided
-addFilter(r'obsolete-not-provided platform-python')
-
-
-# RPMLINT IMPERFECTIONS
-#
https://github.com/rpm-software-management/rpmlint/issues/123
-addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found
3393')
-#
https://github.com/rpm-software-management/rpmlint/pull/133
-addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found
3394')
-
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1550562
-#
https://github.com/rpm-software-management/rpmlint/issues/128
-addFilter(r'python-bytecode-inconsistent-mtime .* 1970')
-
-# debugsource
-addFilter(r'^python3\d?-debugsource\.[^:]+: (E|W): no-documentation')
-
-# debuginfo
-addFilter(r'^python3\d?-debuginfo\.[^:]+: (E|W): useless-provides
debuginfo\(build-id\)')
-
-# this is OK for F28+
-addFilter(r'library-without-ldconfig-post')
-
-# debug package contains devel and non-devel files
-addFilter(r'python3\d?-debug.[^:]+: (E|W):
(non-)?devel-file-in-(non-)?devel-package')
-
-# this goes to other subpackage, hence not actually dangling, the read error is bogus
-addFilter(r'dangling-relative-symlink /usr/lib(64)?/pkgconfig/python-3\.\ddm\.pc
python-3\.\d\.pc')
-addFilter(r'read-error /usr/lib(64)?/pkgconfig/python-3\.\ddm\.pc \[Errno 2\]')
-
-# we need this macro to evaluate, even if the line starts with #
-addFilter(r'macro-in-comment %\{_pyconfig(32|64)_h\}')
-
-# SPELLING ERRORS
-addFilter(r'spelling-error .* en_US (bytecode|pyc|filename|tkinter|namespaces|pytest)
')
diff --git a/python37.spec b/python37.spec
deleted file mode 100644
index c43b59e..0000000
--- a/python37.spec
+++ /dev/null
@@ -1,1626 +0,0 @@
-# ==================
-# Top-level metadata
-# ==================
-
-%global pybasever 3.7
-
-# pybasever without the dot:
-%global pyshortver 37
-
-Name: python%{pyshortver}
-Summary: Version %{pybasever} of the Python interpreter
-URL:
https://www.python.org/
-
-
-# WARNING When rebasing to a new Python version,
-# remember to update the python3-docs package as well
-Version: %{pybasever}.0
-Release: 1%{?dist}
-License: Python
-
-
-# ==================================
-# Conditionals controlling the build
-# ==================================
-
-# Note that the bcond macros are named for the CLI option they create.
-# "%%bcond_without" means "ENABLE by default and create a --without
option"
-
-
-# Flat package, i.e. python36, python37, python38 for tox etc.
-# warning: changes some other defaults
-# in Fedora, never turn this on for the python3 package
-# and always keep it on for python37 etc.
-# WARNING: This does not change the package name and summary above
-%bcond_without flatpackage
-
-
-# Expensive optimizations (mainly, profile-guided optimizations)
-%ifarch %{ix86} x86_64
-%bcond_without optimizations
-%else
-# On some architectures, the optimized build takes tens of hours, possibly
-# longer than Koji's 24-hour timeout. Disable optimizations here.
-%bcond_with optimizations
-%endif
-
-# Run the test suite in %%check
-%bcond_without tests
-
-# Ability to reuse RPM-installed pip using rewheel
-%if %{with flatpackage}
-%bcond_with rewheel
-%else
-%bcond_without rewheel
-%endif
-
-# Extra build for debugging the interpreter or C-API extensions
-# (the -debug subpackages)
-%if %{with flatpackage}
-%bcond_with debug_build
-%else
-%bcond_without debug_build
-%endif
-
-# Support for the GDB debugger
-%bcond_without gdb_hooks
-
-# The dbm.gnu module (key-value database)
-%bcond_without gdbm
-
-# Main interpreter loop optimization
-%bcond_without computed_gotos
-
-# Support for the Valgrind debugger/profiler
-%ifnarch s390 %{mips} riscv64
-%bcond_without valgrind
-%else
-# Some arches don't have valgrind, disable support for it there.
-%bcond_with valgrind
-%endif
-
-
-# ==================================
-# Notes from bootstraping Python 3.6
-# ==================================
-#
-# New Python major version (3.X) break ABI and bytecode compatibility,
-# so all packages depending on it need to be rebuilt.
-#
-# Due to a dependency cycle between Python, gdb, rpm, pip, setuptools, wheel,
-# and other packages, this isn't straightforward.
-# Build in the following order:
-#
-# 1. At the same time:
-# - gdb without python support (add %%global _without_python 1 on top of
-# gdb's SPEC file)
-# - python-rpm-generators
-# (this can be done also during step 2., but should be done before 3.)
-# 2. python3 without rewheel (use %%bcond_with rewheel instead of
-# %%bcond_without)
-# 3. gdb with python support (remove %%global _without_python 1 on top of
-# gdb's SPEC file)
-# 4. rpm
-# 5. python-setuptools with bootstrap set to 1
-# 6. python-pip with build_wheel set to 0
-# 7. python-wheel with %%bcond_without bootstrap
-# 8. python-setuptools with bootstrap set to 0 and also with_check set to 0
-# 9. python-pip with build_wheel set to 1
-# 10. pyparsing
-# 11. python3 with rewheel
-#
-# Then the most important packages have to be built, in dependency order.
-# These were:
-# python-sphinx, pytest, python-requests, cloud-init, dnf, anaconda, abrt
-#
-# After these have been built, a targeted rebuild should be done for the rest.
-
-
-# =====================
-# General global macros
-# =====================
-
-%global pylibdir %{_libdir}/python%{pybasever}
-%global dynload_dir %{pylibdir}/lib-dynload
-
-# ABIFLAGS, LDVERSION and SOABI are in the upstream configure.ac
-# See PEP 3149 for some background:
http://www.python.org/dev/peps/pep-3149/
-%global ABIFLAGS_optimized m
-%global ABIFLAGS_debug dm
-
-%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized}
-%global LDVERSION_debug %{pybasever}%{ABIFLAGS_debug}
-
-%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{_arch}-linux%{_gnu}
-%global SOABI_debug cpython-%{pyshortver}%{ABIFLAGS_debug}-%{_arch}-linux%{_gnu}
-
-# All bytecode files are in a __pycache__ subdirectory, with a name
-# reflecting the version of the bytecode.
-# See PEP 3147:
http://www.python.org/dev/peps/pep-3147/
-# For example,
-# foo/bar.py
-# has bytecode at:
-# foo/__pycache__/bar.cpython-%%{pyshortver}.pyc
-# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-1.pyc
-# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-2.pyc
-%global bytecode_suffixes .cpython-%{pyshortver}*.pyc
-
-# Python's configure script defines SOVERSION, and this is used in the Makefile
-# to determine INSTSONAME, the name of the libpython DSO:
-# LDLIBRARY='libpython$(VERSION).so'
-# INSTSONAME="$LDLIBRARY".$SOVERSION
-# We mirror this here in order to make it easier to add the -gdb.py hooks.
-# (if these get out of sync, the payload of the libs subpackage will fail
-# and halt the build)
-%global py_SOVERSION 1.0
-%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.%{py_SOVERSION}
-%global py_INSTSONAME_debug libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
-
-# Disable automatic bytecompilation. The python3 binary is not yet be
-# available in /usr/bin when Python is built. Also, the bytecompilation fails
-# on files that test invalid syntax.
-%undefine py_auto_byte_compile
-
-# For multilib support, files that are different between 32- and 64-bit arches
-# need different filenames. Use "64" or "32" according to the word
size.
-# Currently, the best way to determine an architecture's word size happens to
-# be checking %%{_lib}.
-%if "%{_lib}" == "lib64"
-%global wordsize 64
-%else
-%global wordsize 32
-%endif
-
-
-# =======================
-# Build-time requirements
-# =======================
-
-# (keep this list alphabetized)
-
-BuildRequires: autoconf
-BuildRequires: bluez-libs-devel
-BuildRequires: bzip2
-BuildRequires: bzip2-devel
-BuildRequires: desktop-file-utils
-BuildRequires: expat-devel
-
-BuildRequires: findutils
-BuildRequires: gcc-c++
-%if %{with gdbm}
-BuildRequires: gdbm-devel >= 1:1.13
-%endif
-BuildRequires: glibc-devel
-BuildRequires: gmp-devel
-BuildRequires: libappstream-glib
-BuildRequires: libffi-devel
-BuildRequires: libnsl2-devel
-BuildRequires: libtirpc-devel
-BuildRequires: libGL-devel
-BuildRequires: libuuid-devel
-BuildRequires: libX11-devel
-BuildRequires: ncurses-devel
-
-BuildRequires: openssl-devel
-BuildRequires: pkgconfig
-BuildRequires: readline-devel
-BuildRequires: sqlite-devel
-BuildRequires: gdb
-
-BuildRequires: tar
-BuildRequires: tcl-devel
-BuildRequires: tix-devel
-BuildRequires: tk-devel
-
-%if %{with valgrind}
-BuildRequires: valgrind-devel
-%endif
-
-BuildRequires: xz-devel
-BuildRequires: zlib-devel
-
-BuildRequires: /usr/bin/dtrace
-
-# workaround
http://bugs.python.org/issue19804 (test_uuid requires ifconfig)
-BuildRequires: /usr/sbin/ifconfig
-
-%if %{with rewheel}
-BuildRequires: python3-setuptools
-BuildRequires: python3-pip
-%endif
-
-
-# =======================
-# Source code and patches
-# =======================
-
-Source:
https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
-
-# A simple script to check timestamps of bytecode files
-# Run in check section with Python that is currently being built
-# Written by bkabrda
-Source8: check-pyc-and-pyo-timestamps.py
-
-# Desktop menu entry for idle3
-Source10: idle3.desktop
-
-# AppData file for idle3
-Source11: idle3.appdata.xml
-
-# 00001 #
-# Fixup distutils/unixccompiler.py to remove standard library path from rpath:
-# Was Patch0 in ivazquez' python3000 specfile:
-Patch1: 00001-rpath.patch
-
-# 00102 #
-# Change the various install paths to use /usr/lib64/ instead or /usr/lib
-# Only used when "%%{_lib}" == "lib64"
-# Not yet sent upstream.
-Patch102: 00102-lib64.patch
-
-# 00111 #
-# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
-# a libpythonMAJOR.MINOR.a
-# See
https://bugzilla.redhat.com/show_bug.cgi?id=556092
-# Downstream only: not appropriate for upstream
-Patch111: 00111-no-static-lib.patch
-
-# 00132 #
-# Add non-standard hooks to unittest for use in the "check" phase below, when
-# running selftests within the build:
-# @unittest._skipInRpmBuild(reason)
-# for tests that hang or fail intermittently within the build environment, and:
-# @unittest._expectedFailureInRpmBuild
-# for tests that always fail within the build environment
-#
-# The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the
-# environment, which we set manually in the appropriate portion of the "check"
-# phase below (and which potentially other python-* rpms could set, to reuse
-# these unittest hooks in their own "check" phases)
-Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch
-
-# 00155 #
-# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid
-# generating SELinux denials on "import ctypes" and "import uuid"
when
-# embedding Python within httpd
-# See
https://bugzilla.redhat.com/show_bug.cgi?id=814391
-Patch155: 00155-avoid-ctypes-thunks.patch
-
-# 00160 #
-# Python 3.3 added os.SEEK_DATA and os.SEEK_HOLE, which may be present in the
-# header files in the build chroot, but may not be supported in the running
-# kernel, hence we disable this test in an rpm build.
-# Adding these was upstream issue
http://bugs.python.org/issue10142
-# Not yet sent upstream
-Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch
-
-# 00163 #
-# Some tests within test_socket fail intermittently when run inside Koji;
-# disable them using unittest._skipInRpmBuild
-# Not yet sent upstream
-Patch163: 00163-disable-parts-of-test_socket-in-rpm-build.patch
-
-# 00170 #
-# In debug builds, try to print repr() when a C-level assert fails in the
-# garbage collector (typically indicating a reference-counting error
-# somewhere else e.g in an extension module)
-# The new macros/functions within gcmodule.c are hidden to avoid exposing
-# them within the extension API.
-# Sent upstream:
http://bugs.python.org/issue9263
-# See
https://bugzilla.redhat.com/show_bug.cgi?id=614680
-Patch170: 00170-gc-assertions.patch
-
-# 00178 #
-# Don't duplicate various FLAGS in sysconfig values
-#
http://bugs.python.org/issue17679
-# Does not affect python2 AFAICS (different sysconfig values initialization)
-Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch
-
-# 00189 #
-# Add the rewheel module, allowing to recreate wheels from already installed
-# ones
-#
https://github.com/bkabrda/rewheel
-Patch189: 00189-add-rewheel-module.patch
-
-# 00205 #
-# LIBPL variable in makefile takes LIBPL from configure.ac
-# but the LIBPL variable defined there doesn't respect libdir macro
-Patch205: 00205-make-libpl-respect-lib64.patch
-
-# 00251
-# Set values of prefix and exec_prefix in distutils install command
-# to /usr/local if executable is /usr/bin/python* and RPM build
-# is not detected to make pip and distutils install into separate location
-# Fedora Change:
https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
-Patch251: 00251-change-user-install-location.patch
-
-# 00274 #
-# Upstream uses Debian-style architecture naming. Change to match Fedora.
-Patch274: 00274-fix-arch-names.patch
-
-# 00291 #
-# Build fails with undefined references to dlopen / dlsym otherwise.
-# See:
https://bugzilla.redhat.com/show_bug.cgi?id=1537489
-# and:
https://src.fedoraproject.org/rpms/redhat-rpm-config/c/078af19
-Patch291: 00291-setup-Link-ctypes-against-dl-explicitly.patch
-
-# (New patches go here ^^^)
-#
-# When adding new patches to "python" and "python3" in Fedora, EL,
etc.,
-# please try to keep the patch numbers in-sync between all specfiles.
-#
-# More information, and a patch number catalog, is at:
-#
-#
https://fedoraproject.org/wiki/SIGs/Python/PythonPatches
-
-
-# ==========================================
-# Descriptions, and metadata for subpackages
-# ==========================================
-
-%if %{without flatpackage}
-
-# Packages with Python modules in standard locations automatically
-# depend on python(abi). Provide that here.
-Provides: python(abi) = %{pybasever}
-
-# For backward compatibility only, remove in F29:
-Provides: system-python(abi) = %{pybasever}
-Provides: system-python = %{version}-%{release}
-Provides: system-python%{?_isa} = %{version}-%{release}
-Obsoletes: system-python < %{version}-%{release}
-
-Requires: %{name}-libs%{?_isa} = %{version}-%{release}
-
-# In order to support multiple Python interpreters for development purposes,
-# packages with the naming scheme flatpackage (e.g. python35) exist for
-# non-default versions of Python 3.
-# For consistency, and to keep the upgrade path clean, we Provide/Obsolete
-# these names here.
-Provides: python%{pyshortver} = %{version}-%{release}
-# Note that using Obsoletes without package version is not standard practice.
-# Here we assert that *any* version of the system's default interpreter is
-# preferable to an "extra" interpreter. For example, python3-3.6.1 will
-# replace python36-3.6.2.
-Obsoletes: python%{pyshortver}
-
-# Shall be removed in Fedora 31
-# The release is bumped to 20, so we can do f27 platform-python updates
-# If the release in f27 ever goes >= 20, raise it here
-# If platform-python is ever reintroduced, make it higher version than this:
-%global platpyver 3.6.2-20
-Obsoletes: platform-python < %{platpyver}
-
-%if %{with rewheel}
-Requires: python3-setuptools
-Requires: python3-pip
-%endif
-
-# This prevents ALL subpackages built from this spec to require
-# /usr/bin/python3*. Granularity per subpackage is impossible.
-# It's intended for the libs package not to drag in the interpreter, see
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1547131
-# All others require %%{name} anyway.
-%global __requires_exclude ^/usr/bin/python3
-
-
-# The description used both for the SRPM and the main `python3` subpackage:
-%description
-Python is an accessible, high-level, dynamically typed, interpreted programming
-language, designed with an emphasis on code readability.
-It includes an extensive standard library, and has a vast ecosystem of
-third-party libraries.
-
-The %{name} package provides the "python3" executable: the reference
-interpreter for the Python language, version 3.
-The majority of its standard library is provided in the %{name}-libs package,
-which should be installed automatically along with %{name}.
-The remaining parts of the Python standard library are broken out into the
-%{name}-tkinter and %{name}-test packages, which may need to be installed
-separately.
-
-Documentation for Python is provided in the %{name}-docs package.
-
-Packages containing additional libraries for Python are generally named with
-the "%{name}-" prefix.
-
-
-%package libs
-Summary: Python runtime libraries
-
-# The "enum" module is included in the standard library.
-# Provide an upgrade path from the external library.
-Provides: python3-enum34 = 1.0.4-5%{?dist}
-Obsoletes: python3-enum34 < 1.0.4-5%{?dist}
-
-# Python 3 built with glibc >= 2.24.90-26 needs to require it
-# See
https://bugzilla.redhat.com/show_bug.cgi?id=1410644
-Requires: glibc%{?_isa} >= 2.24.90-26
-
-%if %{with gdbm}
-# When built with this (as guarded by the BuildRequires above), require it
-Requires: gdbm%{?_isa} >= 1:1.13
-%endif
-
-# There are files in the standard library that have python shebang.
-# We've filtered the automatic requirement out so libs are installable without
-# the main package. This however makes it pulled in by default.
-# See
https://bugzilla.redhat.com/show_bug.cgi?id=1547131
-Recommends: %{name}%{?_isa} = %{version}-%{release}
-
-# For backward compatibility only, remove in F29:
-Provides: system-python-libs = %{version}-%{release}
-Provides: system-python-libs%{?_isa} = %{version}-%{release}
-Obsoletes: system-python-libs < %{version}-%{release}
-
-# Shall be removed in Fedora 31
-Obsoletes: platform-python-libs < %{platpyver}
-Obsoletes: platform-python-libs-devel < %{platpyver}
-
-%description libs
-This package contains runtime libraries for use by Python:
-- the majority of the Python standard library
-- a dynamically linked library for use by applications that embed Python as
- a scripting language, and by the main "python3" executable
-
-
-%package devel
-Summary: Libraries and header files needed for Python development
-Requires: %{name} = %{version}-%{release}
-Requires: %{name}-libs%{?_isa} = %{version}-%{release}
-BuildRequires: python-rpm-macros
-Requires: python-rpm-macros
-Requires: python3-rpm-macros
-
-%if %{with rewheel}
-# without rewheel is used to bootstrap setuptools+pip
-# python3-rpm-generators needs python3-setuptools, so we cannot have it yet
-Requires: python3-rpm-generators
-%endif
-
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1217376
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1496757
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1218294
-# TODO change to a specific subpackage once available (#1218294)
-Requires: redhat-rpm-config
-
-Provides: %{name}-2to3 = %{version}-%{release}
-Provides: 2to3 = %{version}-%{release}
-
-Conflicts: %{name} < %{version}-%{release}
-
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1111275
-# /usr/bin/2to3 was moved from python2-tools to python3-tools
-# TODO Remove in Fedora 29
-Conflicts: python2-tools < 2.7.13-17
-Conflicts: python-tools < 2.7.13-17
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1312030
-# /usr/bin/2to3 was moved from python3-tools to python3-devel
-# TODO Remove in Fedora 30
-Conflicts: python3-tools < 3.7
-
-# Shall be removed in Fedora 31
-Obsoletes: platform-python-devel < %{platpyver}
-
-%description devel
-This package contains the header files and configuration needed to compile
-Python extension modules (typically written in C or C++), to embed Python
-into other programs, and to make binary distributions for Python libraries.
-
-It also contains the necessary macros to build RPM packages with Python modules
-and 2to3 tool, an automatic source converter from Python 2.X.
-
-
-%package idle
-Summary: A basic graphical development environment for Python
-Requires: %{name} = %{version}-%{release}
-Requires: %{name}-tkinter = %{version}-%{release}
-
-Provides: idle3 = %{version}-%{release}
-
-Provides: %{name}-tools = %{version}-%{release}
-Provides: %{name}-tools%{?_isa} = %{version}-%{release}
-Obsoletes: %{name}-tools < %{version}-%{release}
-
-# Shall be removed in Fedora 31
-Obsoletes: platform-python-tools < %{platpyver}
-
-%description idle
-IDLE is Python’s Integrated Development and Learning Environment.
-
-IDLE has the following features: Python shell window (interactive
-interpreter) with colorizing of code input, output, and error messages;
-multi-window text editor with multiple undo, Python colorizing,
-smart indent, call tips, auto completion, and other features;
-search within any window, replace within editor windows, and
-search through multiple files (grep); debugger with persistent
-breakpoints, stepping, and viewing of global and local namespaces;
-configuration, browsers, and other dialogs.
-
-
-%package tkinter
-Summary: A GUI toolkit for Python
-Requires: %{name} = %{version}-%{release}
-
-# Shall be removed in Fedora 31
-Obsoletes: platform-python-tkinter < %{platpyver}
-
-%description tkinter
-The Tkinter (Tk interface) library is a graphical user interface toolkit for
-the Python programming language.
-
-
-%package test
-Summary: The self-test suite for the main python3 package
-Requires: %{name} = %{version}-%{release}
-
-# Shall be removed in Fedora 31
-Obsoletes: platform-python-test < %{platpyver}
-
-%description test
-The self-test suite for the Python interpreter.
-
-This is only useful to test Python itself. For testing general Python code,
-you should use the unittest module from %{name}-libs, or a library such as
-%{name}-pytest or %{name}-nose.
-
-
-%if %{with debug_build}
-%package debug
-Summary: Debug version of the Python runtime
-
-# The debug build is an all-in-one package version of the regular build, and
-# shares the same .py/.pyc files and directories as the regular build. Hence
-# we depend on all of the subpackages of the regular build:
-Requires: %{name}%{?_isa} = %{version}-%{release}
-Requires: %{name}-libs%{?_isa} = %{version}-%{release}
-Requires: %{name}-devel%{?_isa} = %{version}-%{release}
-Requires: %{name}-test%{?_isa} = %{version}-%{release}
-Requires: %{name}-tkinter%{?_isa} = %{version}-%{release}
-Requires: %{name}-idle%{?_isa} = %{version}-%{release}
-
-%description debug
-python3-debug provides a version of the Python runtime with numerous debugging
-features enabled, aimed at advanced Python users such as developers of Python
-extension modules.
-
-This version uses more memory and will be slower than the regular Python build,
-but is useful for tracking down reference-counting issues and other bugs.
-
-The bytecode format is unchanged, so that .pyc files are compatible between
-this and the standard version of Python, but the debugging features mean that
-C/C++ extension modules are ABI-incompatible and must be built for each version
-separately.
-
-The debug build shares installation directories with the standard Python
-runtime, so that .py and .pyc files can be shared.
-Compiled extension modules use a special ABI flag ("d") in the filename,
-so extensions for both versions can co-exist in the same directory.
-%endif # with debug_build
-
-%else # with flatpackage
-
-Requires: redhat-rpm-config
-
-# We'll not provide this, on purpose
-# No package in Fedora shall ever depend on flatpackage via this
-%global __requires_exclude ^python\\(abi\\) = 3\\..$
-%global __provides_exclude ^python\\(abi\\) = 3\\..$
-
-# We keep those inside on purpose
-Provides: bundled(python3-pip) = 10.0.1
-Provides: bundled(python3-setuptools) = 39.0.1
-
-# The description for the flat package
-%description
-Python %{pybasever} package for developers.
-
-This package exists to allow developers to test their code against a newer
-version of Python. This is not a full Python stack and if you wish to run
-your applications with Python %{pybasever}, update your Fedora to a newer
-version once Python %{pybasever} is stable.
-
-%endif # with flatpackage
-
-# ======================================================
-# The prep phase of the build:
-# ======================================================
-
-%prep
-%setup -q -n Python-%{version}%{?prerel}
-
-# Remove bundled libraries to ensure that we're using the system copy.
-rm -r Modules/expat
-
-%if %{with rewheel}
-%global pip_version %(pip3 --version | cut -d' ' -f2)
-sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION =
"%{pip_version}"'/ Lib/ensurepip/__init__.py
-%endif
-
-#
-# Apply patches:
-#
-%patch1 -p1
-
-%if "%{_lib}" == "lib64"
-%patch102 -p1
-%endif
-%patch111 -p1
-%patch132 -p1
-%patch155 -p1
-%patch160 -p1
-%patch163 -p1
-%patch170 -p1
-%patch178 -p1
-
-%if %{with rewheel}
-%patch189 -p1
-%endif
-
-%patch205 -p1
-%patch251 -p1
-%patch274 -p1
-%patch291 -p1
-
-
-# Remove files that should be generated by the build
-# (This is after patching, so that we can use patches directly from upstream)
-rm configure pyconfig.h.in
-
-
-# ======================================================
-# Configuring and building the code:
-# ======================================================
-
-%build
-
-# Regenerate the configure script and pyconfig.h.in
-autoconf
-autoheader
-
-# Remember the current directory (which has sources and the configure script),
-# so we can refer to it after we "cd" elsewhere.
-topdir=$(pwd)
-
-# Get proper option names from bconds
-%if %{with computed_gotos}
-%global computed_gotos_flag yes
-%else
-%global computed_gotos_flag no
-%endif
-
-%if %{with optimizations}
-%global optimizations_flag "--enable-optimizations"
-%else
-%global optimizations_flag "--disable-optimizations"
-%endif
-
-# Set common compiler/linker flags
-export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
-export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
-export CPPFLAGS="$(pkg-config --cflags-only-I libffi)"
-export OPT="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
-export LINKCC="gcc"
-export CFLAGS="$CFLAGS $(pkg-config --cflags openssl)"
-export LDFLAGS="$RPM_LD_FLAGS -g $(pkg-config --libs-only-L openssl)"
-
-# We can build several different configurations of Python: regular and debug.
-# Define a common function that does one build:
-BuildPython() {
- ConfName=$1
- ExtraConfigArgs=$2
- MoreCFlags=$3
-
- # Each build is done in its own directory
- ConfDir=build/$ConfName
- echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName
- mkdir -p $ConfDir
- pushd $ConfDir
-
- # Normally, %%configure looks for the "configure" script in the current
- # directory.
- # Since we changed directories, we need to tell %%configure where to look.
- %global _configure $topdir/configure
-
-%configure \
- --enable-ipv6 \
- --enable-shared \
- --with-computed-gotos=%{computed_gotos_flag} \
- --with-dbmliborder=gdbm:ndbm:bdb \
- --with-system-expat \
- --with-system-ffi \
- --enable-loadable-sqlite-extensions \
- --with-dtrace \
- --with-lto \
- --with-ssl-default-suites=openssl \
-%if %{with valgrind}
- --with-valgrind \
-%endif
- $ExtraConfigArgs \
- %{nil}
-
- # Invoke the build
- make EXTRA_CFLAGS="$CFLAGS $MoreCFlags" %{?_smp_mflags}
-
- popd
- echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfName
-}
-
-# Call the above to build each configuration.
-
-%if %{with debug_build}
-BuildPython debug \
- "--without-ensurepip --with-pydebug" \
- "-O0"
-%endif # with debug_build
-
-BuildPython optimized \
- "--without-ensurepip %{optimizations_flag}" \
- ""
-
-# ======================================================
-# Installing the built code:
-# ======================================================
-
-%install
-
-# As in %%build, remember the current directory
-topdir=$(pwd)
-
-# We install a collection of hooks for gdb that make it easier to debug
-# executables linked against libpython3* (such as /usr/bin/python3 itself)
-#
-# These hooks are implemented in Python itself (though they are for the version
-# of python that gdb is linked with)
-#
-# gdb-archer looks for them in the same path as the ELF file or its .debug
-# file, with a -gdb.py suffix.
-# We put them next to the debug file, because ldconfig would complain if
-# it found non-library files directly in /usr/lib/
-# (see
https://bugzilla.redhat.com/show_bug.cgi?id=562980)
-#
-# We'll put these files in the debuginfo package by installing them to e.g.:
-# /usr/lib/debug/usr/lib/libpython3.2.so.1.0.debug-gdb.py
-# (note that the debug path is /usr/lib/debug for both 32/64 bit)
-#
-# See
https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
-# information
-
-%if %{with gdb_hooks}
-DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir}
-mkdir -p %{buildroot}$DirHoldingGdbPy
-%endif # with gdb_hooks
-
-# Multilib support for pyconfig.h
-# 32- and 64-bit versions of pyconfig.h are different. For multilib support
-# (making it possible to install 32- and 64-bit versions simultaneously),
-# we need to install them under different filenames, and to make the common
-# "pyconfig.h" include the right file based on architecture.
-# See
https://bugzilla.redhat.com/show_bug.cgi?id=192747
-# Filanames are defined here:
-%global _pyconfig32_h pyconfig-32.h
-%global _pyconfig64_h pyconfig-64.h
-%global _pyconfig_h pyconfig-%{wordsize}.h
-
-# Use a common function to do an install for all our configurations:
-InstallPython() {
-
- ConfName=$1
- PyInstSoName=$2
- MoreCFlags=$3
- LDVersion=$4
-
- # Switch to the directory with this configuration's built files
- ConfDir=build/$ConfName
- echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
- mkdir -p $ConfDir
- pushd $ConfDir
-
- make \
- DESTDIR=%{buildroot} \
- INSTALL="install -p" \
- EXTRA_CFLAGS="$MoreCFlags" \
- install
-
- popd
-
-%if %{with gdb_hooks}
- # See comment on $DirHoldingGdbPy above
- PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName-%{version}-%{release}.%{_arch}.debug-gdb.py
- cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
-%endif # with gdb_hooks
-
- # Rename the -devel script that differs on different arches to arch specific name
- mv %{buildroot}%{_bindir}/python${LDVersion}-{,`uname -m`-}config
- echo -e '#!/bin/sh\nexec `dirname $0`/python'${LDVersion}'-`uname
-m`-config "$@"' > \
- %{buildroot}%{_bindir}/python${LDVersion}-config
- echo '[ $? -eq 127 ] && echo "Could not find
python'${LDVersion}'-`uname -m`-config. Look around to see available arches."
>&2' >> \
- %{buildroot}%{_bindir}/python${LDVersion}-config
- chmod +x %{buildroot}%{_bindir}/python${LDVersion}-config
-
- # Make python3-devel multilib-ready
- mv %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h \
- %{buildroot}%{_includedir}/python${LDVersion}/%{_pyconfig_h}
- cat > %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h << EOF
-#include <bits/wordsize.h>
-
-#if __WORDSIZE == 32
-#include "%{_pyconfig32_h}"
-#elif __WORDSIZE == 64
-#include "%{_pyconfig64_h}"
-#else
-#error "Unknown word size"
-#endif
-EOF
-
- echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
-}
-
-# Install the "debug" build first; any common files will be overridden with
-# later builds
-%if %{with debug_build}
-InstallPython debug \
- %{py_INSTSONAME_debug} \
- -O0 \
- %{LDVERSION_debug}
-%endif # with debug_build
-
-# Now the optimized build:
-InstallPython optimized \
- %{py_INSTSONAME_optimized} \
- "" \
- %{LDVERSION_optimized}
-
-# Install directories for additional packages
-install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__
-%if "%{_lib}" == "lib64"
-# The 64-bit version needs to create "site-packages" in /usr/lib/ (for
-# pure-Python modules) as well as in /usr/lib64/ (for packages with extension
-# modules).
-# Note that rpmlint will complain about hardcoded library path;
-# this is intentional.
-install -d -m 0755
%{buildroot}%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__
-%endif
-
-%if %{without flatpackage}
-# add idle3 to menu
-install -D -m 0644 Lib/idlelib/Icons/idle_16.png
%{buildroot}%{_datadir}/icons/hicolor/16x16/apps/idle3.png
-install -D -m 0644 Lib/idlelib/Icons/idle_32.png
%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/idle3.png
-install -D -m 0644 Lib/idlelib/Icons/idle_48.png
%{buildroot}%{_datadir}/icons/hicolor/48x48/apps/idle3.png
-desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE10}
-
-# Install and validate appdata file
-mkdir -p %{buildroot}%{_metainfodir}
-cp -a %{SOURCE11} %{buildroot}%{_metainfodir}
-appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/idle3.appdata.xml
-%endif
-
-# Make sure distutils looks at the right pyconfig.h file
-# See
https://bugzilla.redhat.com/show_bug.cgi?id=201434
-# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate
-# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py
-# when python starts up (see
https://bugzilla.redhat.com/show_bug.cgi?id=653058)
-#
-# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h
-# variants:
-sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \
- %{buildroot}%{pylibdir}/distutils/sysconfig.py \
- %{buildroot}%{pylibdir}/sysconfig.py
-
-# Install pathfix.py to bindir
-# See
https://github.com/fedora-python/python-rpm-porting/issues/24
-cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/
-
-# Switch all shebangs to refer to the specific Python version.
-# This currently only covers files matching ^[a-zA-Z0-9_]+\.py$,
-# so handle files named using other naming scheme separately.
-LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
- Tools/scripts/pathfix.py \
- -i "%{_bindir}/python%{pybasever}" -pn \
- %{buildroot} \
- %{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py}
-
-# Remove tests for python3-tools which was removed in
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1312030
-rm -rf %{buildroot}%{pylibdir}/test/test_tools
-
-# 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 {} \; \) \)
-
-# 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 {} \;
-
-# Get rid of a stray copy of the license:
-rm %{buildroot}%{pylibdir}/LICENSE.txt
-
-# Do bytecompilation with the newly installed interpreter.
-# This is similar to the script in macros.pybytecompile
-# compile *.pyc
-find %{buildroot} -type f -a -name "*.py" -print0 | \
- LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
- PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever}
%{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
- xargs -0 %{buildroot}%{_bindir}/python%{pybasever} -O -c 'import py_compile, sys;
[py_compile.compile(f, dfile=f.partition("%{buildroot}")[2], optimize=opt) for
opt in range(3) for f in sys.argv[1:]]' || :
-
-# Since we have pathfix.py in bindir, this is created, but we don't want it
-rm -rf %{buildroot}%{_bindir}/__pycache__
-
-# Fixup permissions for shared libraries from non-standard 555 to standard 755:
-find %{buildroot} -perm 555 -exec chmod 755 {} \;
-
-# Create "/usr/bin/python3-debug", a symlink to the python3 debug binary, to
-# avoid the user having to know the precise version and ABI flags.
-# See e.g.
https://bugzilla.redhat.com/show_bug.cgi?id=676748
-%if %{with debug_build} && %{without flatpackage}
-ln -s \
- %{_bindir}/python%{LDVERSION_debug} \
- %{buildroot}%{_bindir}/python3-debug
-%endif
-
-# System Python: Link the executable to libexec
-# This is for backwards compatibility only and should be removed in Fedora 29
-%if %{without flatpackage}
-mkdir -p %{buildroot}%{_libexecdir}
-ln -s %{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/system-python
-%endif
-
-# There's 2to3-X.X executable and 2to3 soft link to it.
-# No reason to have both, so keep only 2to3 as an executable.
-# See
https://bugzilla.redhat.com/show_bug.cgi?id=1111275
-mv %{buildroot}%{_bindir}/2to3-%{pybasever} %{buildroot}%{_bindir}/2to3
-
-%if %{with flatpackage}
-# Remove stuff that would conflict with python3 package
-rm %{buildroot}%{_bindir}/python3
-rm %{buildroot}%{_bindir}/pydoc3
-rm %{buildroot}%{_bindir}/pathfix.py
-rm %{buildroot}%{_bindir}/idle3
-rm %{buildroot}%{_bindir}/python3-*
-rm %{buildroot}%{_bindir}/pyvenv
-rm %{buildroot}%{_bindir}/2to3
-rm %{buildroot}%{_libdir}/libpython3.so
-rm %{buildroot}%{_mandir}/man1/python3.1*
-rm %{buildroot}%{_libdir}/pkgconfig/python3.pc
-%endif
-
-
-# ======================================================
-# Checks for packaging issues
-# ======================================================
-
-%check
-
-# first of all, check timestamps of bytecode files
-find %{buildroot} -type f -a -name "*.py" -print0 | \
- LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
- PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever}
%{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
- xargs -0 %{buildroot}%{_bindir}/python%{pybasever} %{SOURCE8}
-
-# Ensure that the curses module was linked against libncursesw.so, rather than
-# libncurses.so
-# See
https://bugzilla.redhat.com/show_bug.cgi?id=539917
-ldd %{buildroot}/%{dynload_dir}/_curses*.so \
- | grep curses \
- | grep libncurses.so && (echo "_curses.so linked against
libncurses.so" ; exit 1)
-
-# Ensure that the debug modules are linked against the debug libpython, and
-# likewise for the optimized modules and libpython:
-for Module in %{buildroot}/%{dynload_dir}/*.so ; do
- case $Module in
- *.%{SOABI_debug})
- ldd $Module | grep %{py_INSTSONAME_optimized} &&
- (echo Debug module $Module linked against optimized
%{py_INSTSONAME_optimized} ; exit 1)
-
- ;;
- *.%{SOABI_optimized})
- ldd $Module | grep %{py_INSTSONAME_debug} &&
- (echo Optimized module $Module linked against debug %{py_INSTSONAME_debug} ;
exit 1)
- ;;
- esac
-done
-
-
-# ======================================================
-# Running the upstream test suite
-# ======================================================
-
-topdir=$(pwd)
-CheckPython() {
- ConfName=$1
- ConfDir=$(pwd)/build/$ConfName
-
- echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
-
- # Note that we're running the tests using the version of the code in the
- # builddir, not in the buildroot.
-
- # Run the upstream test suite, setting "WITHIN_PYTHON_RPM_BUILD" so that the
- # our non-standard decorators take effect on the relevant tests:
- # @unittest._skipInRpmBuild(reason)
- # @unittest._expectedFailureInRpmBuild
- WITHIN_PYTHON_RPM_BUILD= \
- LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
- -wW --slowest --findleaks \
- -x test_distutils \
- -x test_bdist_rpm \
- %ifarch %{mips64}
- -x test_ctypes \
- %endif
- %ifarch %{power64} s390 s390x armv7hl %{mips}
- -x test_gdb \
- %endif
- %ifarch ppc64le
- -x test_buffer \
- %endif
-
- echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
-
-}
-
-%if %{with tests}
-
-# Check each of the configurations:
-%if %{with debug_build}
-CheckPython debug
-%endif # with debug_build
-CheckPython optimized
-
-%endif # with tests
-
-
-%files
-%license LICENSE
-%doc README.rst
-
-%if %{without flatpackage}
-%{_bindir}/pydoc*
-%{_bindir}/python3
-%{_bindir}/pyvenv
-# Remove in Fedora 29:
-%{_libexecdir}/system-python
-%else
-%{_bindir}/pydoc%{pybasever}
-%endif
-
-%{_bindir}/python%{pybasever}
-%{_bindir}/python%{pybasever}m
-%{_bindir}/pyvenv-%{pybasever}
-%{_mandir}/*/*
-
-
-%if %{without flatpackage}
-%files libs
-%license LICENSE
-%doc README.rst
-%endif
-
-%dir %{pylibdir}
-%dir %{dynload_dir}
-
-%{pylibdir}/lib2to3
-%if %{without flatpackage}
-%exclude %{pylibdir}/lib2to3/tests
-%endif
-
-%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}/xmlrpc
-
-%dir %{pylibdir}/ensurepip/
-%dir %{pylibdir}/ensurepip/__pycache__/
-%{pylibdir}/ensurepip/*.py
-%{pylibdir}/ensurepip/__pycache__/*%{bytecode_suffixes}
-
-%if %{without flatpackage}
-%exclude %{pylibdir}/ensurepip/_bundled
-%else
-%dir %{pylibdir}/ensurepip/_bundled
-%{pylibdir}/ensurepip/_bundled/*.whl
-%endif
-
-%if %{with rewheel}
-%dir %{pylibdir}/ensurepip/rewheel/
-%dir %{pylibdir}/ensurepip/rewheel/__pycache__/
-%{pylibdir}/ensurepip/rewheel/*.py
-%{pylibdir}/ensurepip/rewheel/__pycache__/*%{bytecode_suffixes}
-%endif
-
-%dir %{pylibdir}/test/
-%dir %{pylibdir}/test/__pycache__/
-%dir %{pylibdir}/test/support/
-%dir %{pylibdir}/test/support/__pycache__/
-%{pylibdir}/test/__init__.py
-%{pylibdir}/test/__pycache__/__init__%{bytecode_suffixes}
-%{pylibdir}/test/support/__init__.py
-%{pylibdir}/test/support/__pycache__/__init__%{bytecode_suffixes}
-
-%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
-
-%{dynload_dir}/_blake2.%{SOABI_optimized}.so
-%{dynload_dir}/_md5.%{SOABI_optimized}.so
-%{dynload_dir}/_sha1.%{SOABI_optimized}.so
-%{dynload_dir}/_sha256.%{SOABI_optimized}.so
-%{dynload_dir}/_sha3.%{SOABI_optimized}.so
-%{dynload_dir}/_sha512.%{SOABI_optimized}.so
-
-%{dynload_dir}/_asyncio.%{SOABI_optimized}.so
-%{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}/_contextvars.%{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
-%if %{with gdbm}
-%{dynload_dir}/_gdbm.%{SOABI_optimized}.so
-%endif
-%{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}/_queue.%{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}/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}/_uuid.%{SOABI_optimized}.so
-%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
-%{dynload_dir}/zlib.%{SOABI_optimized}.so
-
-%dir %{pylibdir}/site-packages/
-%dir %{pylibdir}/site-packages/__pycache__/
-%{pylibdir}/site-packages/README.txt
-%{pylibdir}/*.py
-%dir %{pylibdir}/__pycache__/
-%{pylibdir}/__pycache__/*%{bytecode_suffixes}
-
-%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
-%exclude %{pylibdir}/distutils/command/wininst-*.exe
-
-%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}/logging
-%{pylibdir}/multiprocessing
-
-%dir %{pylibdir}/sqlite3/
-%dir %{pylibdir}/sqlite3/__pycache__/
-%{pylibdir}/sqlite3/*.py
-%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes}
-
-%if %{without flatpackage}
-%exclude %{pylibdir}/turtle.py
-%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
-%endif
-
-%{pylibdir}/urllib
-%{pylibdir}/xml
-
-%if "%{_lib}" == "lib64"
-%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}
-%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages
-%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/
-%endif
-
-# "Makefile" and the config-32/64.h file are needed by
-# distutils/sysconfig.py:_init_posix(), so we include them in the core
-# package, along with their parent directories (bug 531901):
-%dir %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/
-%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile
-%dir %{_includedir}/python%{LDVERSION_optimized}/
-%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
-
-%{_libdir}/%{py_INSTSONAME_optimized}
-%if %{without flatpackage}
-%{_libdir}/libpython3.so
-%endif
-
-
-%if %{without flatpackage}
-%files devel
-%{_bindir}/2to3
-%endif
-
-%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/*
-%if %{without flatpackage}
-%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile
-%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
-%endif
-%{pylibdir}/distutils/command/wininst-*.exe
-%{_includedir}/python%{LDVERSION_optimized}/*.h
-%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
-
-%if %{without flatpackage}
-%{_bindir}/python3-config
-%{_libdir}/pkgconfig/python3.pc
-%{_bindir}/pathfix.py
-%endif
-
-%{_bindir}/python%{pybasever}-config
-%{_bindir}/python%{LDVERSION_optimized}-config
-%{_bindir}/python%{LDVERSION_optimized}-*-config
-%{_libdir}/libpython%{LDVERSION_optimized}.so
-%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
-%{_libdir}/pkgconfig/python-%{pybasever}.pc
-
-
-%if %{without flatpackage}
-%files idle
-
-%{_bindir}/idle*
-%else
-%{_bindir}/idle%{pybasever}
-%endif
-
-%{pylibdir}/idlelib
-
-%if %{without flatpackage}
-%{_metainfodir}/idle3.appdata.xml
-%{_datadir}/applications/idle3.desktop
-%{_datadir}/icons/hicolor/*/apps/idle3.*
-%endif
-
-%if %{without flatpackage}
-%files tkinter
-%endif
-
-%{pylibdir}/tkinter
-%if %{without flatpackage}
-%exclude %{pylibdir}/tkinter/test
-%endif
-%{dynload_dir}/_tkinter.%{SOABI_optimized}.so
-%{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}
-
-
-%if %{without flatpackage}
-%files test
-%endif
-
-%{pylibdir}/ctypes/test
-%{pylibdir}/distutils/tests
-%{pylibdir}/sqlite3/test
-%{pylibdir}/test
-%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so
-%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so
-%{dynload_dir}/_testcapi.%{SOABI_optimized}.so
-%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so
-%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so
-%{pylibdir}/lib2to3/tests
-%{pylibdir}/tkinter/test
-%{pylibdir}/unittest/test
-
-
-# We don't bother splitting the debug build out into further subpackages:
-# if you need it, you're probably a developer.
-
-# Hence the manifest is the combination of analogous files in the manifests of
-# all of the other subpackages
-
-%if %{with debug_build}
-%if %{without flatpackage}
-%files debug
-%{_bindir}/python3-debug
-%endif
-
-# Analog of the core subpackage's files:
-%{_bindir}/python%{LDVERSION_debug}
-
-# Analog of the -libs subpackage's files:
-# ...with debug builds of the built-in "extension" modules:
-
-%{dynload_dir}/_blake2.%{SOABI_debug}.so
-%{dynload_dir}/_md5.%{SOABI_debug}.so
-%{dynload_dir}/_sha1.%{SOABI_debug}.so
-%{dynload_dir}/_sha256.%{SOABI_debug}.so
-%{dynload_dir}/_sha3.%{SOABI_debug}.so
-%{dynload_dir}/_sha512.%{SOABI_debug}.so
-
-%{dynload_dir}/_asyncio.%{SOABI_debug}.so
-%{dynload_dir}/_bisect.%{SOABI_debug}.so
-%{dynload_dir}/_bz2.%{SOABI_debug}.so
-%{dynload_dir}/_codecs_cn.%{SOABI_debug}.so
-%{dynload_dir}/_codecs_hk.%{SOABI_debug}.so
-%{dynload_dir}/_codecs_iso2022.%{SOABI_debug}.so
-%{dynload_dir}/_codecs_jp.%{SOABI_debug}.so
-%{dynload_dir}/_codecs_kr.%{SOABI_debug}.so
-%{dynload_dir}/_codecs_tw.%{SOABI_debug}.so
-%{dynload_dir}/_contextvars.%{SOABI_debug}.so
-%{dynload_dir}/_crypt.%{SOABI_debug}.so
-%{dynload_dir}/_csv.%{SOABI_debug}.so
-%{dynload_dir}/_ctypes.%{SOABI_debug}.so
-%{dynload_dir}/_curses.%{SOABI_debug}.so
-%{dynload_dir}/_curses_panel.%{SOABI_debug}.so
-%{dynload_dir}/_dbm.%{SOABI_debug}.so
-%{dynload_dir}/_decimal.%{SOABI_debug}.so
-%{dynload_dir}/_elementtree.%{SOABI_debug}.so
-%if %{with gdbm}
-%{dynload_dir}/_gdbm.%{SOABI_debug}.so
-%endif
-%{dynload_dir}/_hashlib.%{SOABI_debug}.so
-%{dynload_dir}/_heapq.%{SOABI_debug}.so
-%{dynload_dir}/_json.%{SOABI_debug}.so
-%{dynload_dir}/_lsprof.%{SOABI_debug}.so
-%{dynload_dir}/_lzma.%{SOABI_debug}.so
-%{dynload_dir}/_multibytecodec.%{SOABI_debug}.so
-%{dynload_dir}/_multiprocessing.%{SOABI_debug}.so
-%{dynload_dir}/_opcode.%{SOABI_debug}.so
-%{dynload_dir}/_pickle.%{SOABI_debug}.so
-%{dynload_dir}/_posixsubprocess.%{SOABI_debug}.so
-%{dynload_dir}/_queue.%{SOABI_debug}.so
-%{dynload_dir}/_random.%{SOABI_debug}.so
-%{dynload_dir}/_socket.%{SOABI_debug}.so
-%{dynload_dir}/_sqlite3.%{SOABI_debug}.so
-%{dynload_dir}/_ssl.%{SOABI_debug}.so
-%{dynload_dir}/_struct.%{SOABI_debug}.so
-%{dynload_dir}/array.%{SOABI_debug}.so
-%{dynload_dir}/audioop.%{SOABI_debug}.so
-%{dynload_dir}/binascii.%{SOABI_debug}.so
-%{dynload_dir}/cmath.%{SOABI_debug}.so
-%{dynload_dir}/_datetime.%{SOABI_debug}.so
-%{dynload_dir}/fcntl.%{SOABI_debug}.so
-%{dynload_dir}/grp.%{SOABI_debug}.so
-%{dynload_dir}/math.%{SOABI_debug}.so
-%{dynload_dir}/mmap.%{SOABI_debug}.so
-%{dynload_dir}/nis.%{SOABI_debug}.so
-%{dynload_dir}/ossaudiodev.%{SOABI_debug}.so
-%{dynload_dir}/parser.%{SOABI_debug}.so
-%{dynload_dir}/pyexpat.%{SOABI_debug}.so
-%{dynload_dir}/readline.%{SOABI_debug}.so
-%{dynload_dir}/resource.%{SOABI_debug}.so
-%{dynload_dir}/select.%{SOABI_debug}.so
-%{dynload_dir}/spwd.%{SOABI_debug}.so
-%{dynload_dir}/syslog.%{SOABI_debug}.so
-%{dynload_dir}/termios.%{SOABI_debug}.so
-%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so
-%{dynload_dir}/unicodedata.%{SOABI_debug}.so
-%{dynload_dir}/_uuid.%{SOABI_debug}.so
-%{dynload_dir}/_xxtestfuzz.%{SOABI_debug}.so
-%{dynload_dir}/zlib.%{SOABI_debug}.so
-
-# No need to split things out the "Makefile" and the config-32/64.h file as we
-# do for the regular build above (bug 531901), since they're all in one package
-# now; they're listed below, under "-devel":
-
-%{_libdir}/%{py_INSTSONAME_debug}
-
-# Analog of the -devel subpackage's files:
-%{pylibdir}/config-%{LDVERSION_debug}-%{_arch}-linux%{_gnu}
-%{_includedir}/python%{LDVERSION_debug}
-%{_bindir}/python%{LDVERSION_debug}-config
-%{_bindir}/python%{LDVERSION_debug}-*-config
-%{_libdir}/libpython%{LDVERSION_debug}.so
-%{_libdir}/libpython%{LDVERSION_debug}.so.1.0
-%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc
-
-# Analog of the -tools subpackage's files:
-# None for now; we could build precanned versions that have the appropriate
-# shebang if needed
-
-# Analog of the tkinter subpackage's files:
-%{dynload_dir}/_tkinter.%{SOABI_debug}.so
-
-# Analog of the -test subpackage's files:
-%{dynload_dir}/_ctypes_test.%{SOABI_debug}.so
-%{dynload_dir}/_testbuffer.%{SOABI_debug}.so
-%{dynload_dir}/_testcapi.%{SOABI_debug}.so
-%{dynload_dir}/_testimportmultiple.%{SOABI_debug}.so
-
-%endif # with debug_build
-
-# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from ldconfig
-# See
https://bugzilla.redhat.com/show_bug.cgi?id=562980
-#
-# The /usr/lib/rpm/redhat/macros defines %%__debug_package to use
-# debugfiles.list, and it appears that everything below /usr/lib/debug and
-# (/usr/src/debug) gets added to this file (via LISTFILES) in
-# /usr/lib/rpm/find-debuginfo.sh
-#
-# Hence by installing it below /usr/lib/debug we ensure it is added to the
-# -debuginfo subpackage
-# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py
-# payload file would be unpackaged)
-
-# Workaround for
https://bugzilla.redhat.com/show_bug.cgi?id=1476593
-%undefine _debuginfo_subpackages
-
-# ======================================================
-# Finally, the changelog:
-# ======================================================
-
-%changelog
-* Wed Jun 27 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-1
-- Update to 3.7.0 final
-
-* Tue Jun 12 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.20.rc1
-- Update to 3.7.0rc1
-
-* Thu May 31 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.19.b5
-- Update to 3.7.0b5
-
-* Sat May 12 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.18.b4
-- Bump the bundled pip version to 10.0.1
-
-* Thu May 10 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.17.b4
-- Update to 3.7.0b4
-
-* Mon Apr 23 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.16.b3
-- Fix multiprocessing regression on newer glibcs
-- Enable test_multiprocessing_fork(server) and _spawn again
-Resolves: rhbz#1569933
-
-* Thu Apr 19 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.15.b3
-- Skip test_multiprocessing_fork(server) and _spawn for now
-
-* Thu Mar 29 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.14.b3
-- Update to 3.7.0b3
-
-* Sat Mar 24 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.13.b2
-- Fix broken macro invocation and broken building of C Python extensions
-Resolves: rhbz#1560103
-
-* Wed Feb 28 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.12.b2
-- Update to 3.7.0b2
-
-* Wed Feb 21 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.11.b1
-- Fix the py_byte_compile macro to work on Python 2
-- Remove the pybytecompile macro file from the flat package
-Resolves: rhbz#1484993
-
-* Wed Feb 21 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.10.b1
-- Filter out automatic /usr/bin/python3.X requirement,
- recommend the main package from libs instead
-Resolves: rhbz#1547131
-
-* Thu Feb 15 2018 Michal Cyprian <mcyprian(a)redhat.com> - 3.7.0-0.9.b1
-- Remove sys.executable check from change-user-install-location patch
-Resolves: rhbz#1532287
-
-* Wed Feb 14 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.8.b1
-- Readd ldconfig scriplets via macro (later removed on F28+ only)
-
-* Mon Feb 12 2018 Iryna Shcherbina <ishcherb(a)redhat.com> - 3.7.0-0.7.b1
-- Update to 3.7.0b1
-- Define TLS cipher suite on build time
-
-* Fri Feb 09 2018 Fedora Release Engineering <releng(a)fedoraproject.org> -
3.7.0-0.6.a4
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
-
-* Fri Jan 26 2018 Iryna Shcherbina <ishcherb(a)redhat.com> - 3.7.0-0.5.a4
-- Remove the python3-tools package (#rhbz 1312030)
-- Move /usr/bin/2to3 to python3-devel
-- Move /usr/bin/idle and idlelib to python3-idle
-- Provide python3-tools from python3-idle
-
-* Sat Jan 20 2018 Björn Esser <besser82(a)fedoraproject.org> - 3.7.0-0.4.a4
-- Rebuilt for switch to libxcrypt
-
-* Thu Jan 18 2018 Miro Hrončok <mhroncok(a)redhat.com> - 3.7.0-0.3.a4
-- Remove /usr/bin/python37 (#1526129)
-- Move install stuff from %%check to %%install, where it belongs (oops)
-
-* Tue Jan 09 2018 Miro Hrončok <mhroncok(a)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(a)redhat.com> - 3.7.0-0.1.a2
-- Update to 3.7.0 alpha 2
-- Removed merged patches 262, 277, 279
diff --git a/sources b/sources
deleted file mode 100644
index 099b345..0000000
--- a/sources
+++ /dev/null
@@ -1 +0,0 @@
-SHA512 (Python-3.7.0.tar.xz) =
8bb11233fb67ee9ab8ed1b72f8fdc62f66e26a6beaaeb92448bce681cf065269833b1658d3ed2459127f25ba43adb0eab73cf27c59834a2a803fb529b4216739