Package init
This commit is contained in:
commit
2d9ea79e82
19
00001-rpath.patch
Normal file
19
00001-rpath.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
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)
|
||||||
192
00102-lib64.patch
Normal file
192
00102-lib64.patch
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
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:
|
||||||
53
00111-no-static-lib.patch
Normal file
53
00111-no-static-lib.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||||
|
index 0db0dd0..bd8f769 100644
|
||||||
|
--- a/Makefile.pre.in
|
||||||
|
+++ b/Makefile.pre.in
|
||||||
|
@@ -574,7 +574,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_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
|
||||||
|
|
||||||
|
platform: $(BUILDPYTHON) pybuilddir.txt
|
||||||
|
@@ -622,12 +622,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); \
|
||||||
|
@@ -715,7 +709,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_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
@@ -1483,17 +1477,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
|
||||||
46
00132-add-rpmbuild-hooks-to-unittest.patch
Normal file
46
00132-add-rpmbuild-hooks-to-unittest.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
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)
|
||||||
15
00155-avoid-ctypes-thunks.patch
Normal file
15
00155-avoid-ctypes-thunks.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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
|
||||||
11
00160-disable-test_fs_holes-in-rpm-build.patch
Normal file
11
00160-disable-test_fs_holes-in-rpm-build.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
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):
|
||||||
311
00170-gc-assertions.patch
Normal file
311
00170-gc-assertions.patch
Normal file
@ -0,0 +1,311 @@
|
|||||||
|
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 8d806db..dc8bb16 100644
|
||||||
|
--- a/Lib/test/test_gc.py
|
||||||
|
+++ b/Lib/test/test_gc.py
|
||||||
|
@@ -1,10 +1,12 @@
|
||||||
|
import unittest
|
||||||
|
from test.support import (verbose, refcount_test, run_unittest,
|
||||||
|
strip_python_stderr, cpython_only, start_threads,
|
||||||
|
- temp_dir, requires_type_collecting, TESTFN, unlink)
|
||||||
|
+ temp_dir, requires_type_collecting, TESTFN, unlink,
|
||||||
|
+ import_module)
|
||||||
|
from test.support.script_helper import assert_python_ok, make_script
|
||||||
|
|
||||||
|
import sys
|
||||||
|
+import sysconfig
|
||||||
|
import time
|
||||||
|
import gc
|
||||||
|
import weakref
|
||||||
|
@@ -46,6 +48,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.
|
||||||
|
@@ -878,6 +882,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 4d701cb..388dd78 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);
|
||||||
|
@@ -717,12 +723,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. */
|
||||||
30
00178-dont-duplicate-flags-in-sysconfig.patch
Normal file
30
00178-dont-duplicate-flags-in-sysconfig.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
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:
|
||||||
51
00189-use-rpm-wheels.patch
Normal file
51
00189-use-rpm-wheels.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
|
||||||
|
index 4748ba4..fc02255 100644
|
||||||
|
--- a/Lib/ensurepip/__init__.py
|
||||||
|
+++ b/Lib/ensurepip/__init__.py
|
||||||
|
@@ -1,16 +1,27 @@
|
||||||
|
+import distutils.version
|
||||||
|
+import glob
|
||||||
|
import os
|
||||||
|
import os.path
|
||||||
|
-import pkgutil
|
||||||
|
import sys
|
||||||
|
import tempfile
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ["version", "bootstrap"]
|
||||||
|
|
||||||
|
+_WHEEL_DIR = "/usr/share/python-wheels/"
|
||||||
|
|
||||||
|
-_SETUPTOOLS_VERSION = "40.8.0"
|
||||||
|
|
||||||
|
-_PIP_VERSION = "19.0.3"
|
||||||
|
+def _get_most_recent_wheel_version(pkg):
|
||||||
|
+ prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg))
|
||||||
|
+ suffix = "-py2.py3-none-any.whl"
|
||||||
|
+ pattern = "{}*{}".format(prefix, suffix)
|
||||||
|
+ versions = (p[len(prefix):-len(suffix)] for p in glob.glob(pattern))
|
||||||
|
+ return str(max(versions, key=distutils.version.LooseVersion))
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools")
|
||||||
|
+
|
||||||
|
+_PIP_VERSION = _get_most_recent_wheel_version("pip")
|
||||||
|
|
||||||
|
_PROJECTS = [
|
||||||
|
("setuptools", _SETUPTOOLS_VERSION),
|
||||||
|
@@ -94,12 +105,9 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
|
||||||
|
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)
|
||||||
|
+ with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp:
|
||||||
|
+ with open(os.path.join(tmpdir, wheel_name), "wb") as fp:
|
||||||
|
+ fp.write(sfp.read())
|
||||||
|
|
||||||
|
additional_paths.append(os.path.join(tmpdir, wheel_name))
|
||||||
|
|
||||||
12
00205-make-libpl-respect-lib64.patch
Normal file
12
00205-make-libpl-respect-lib64.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
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
|
||||||
46
00251-change-user-install-location.patch
Normal file
46
00251-change-user-install-location.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
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)
|
||||||
80
00274-fix-arch-names.patch
Normal file
80
00274-fix-arch-names.patch
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
From 3b0d3a25576e74c2ac1eb25136ae811bdbdd7c6c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Orsava <torsava@redhat.com>
|
||||||
|
Date: Thu, 14 Feb 2019 16:08:57 +0100
|
||||||
|
Subject: [PATCH] Upstream uses Debian-style architecture naming. Change to
|
||||||
|
match Fedora / RHEL
|
||||||
|
|
||||||
|
---
|
||||||
|
config.sub | 2 +-
|
||||||
|
configure.ac | 16 ++++++++--------
|
||||||
|
2 files changed, 9 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/config.sub b/config.sub
|
||||||
|
index 40ea5df..932128b 100755
|
||||||
|
--- a/config.sub
|
||||||
|
+++ b/config.sub
|
||||||
|
@@ -1045,7 +1045,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 a075ce3..b7f2ee3 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -788,9 +788,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__)
|
||||||
|
@@ -810,7 +810,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
|
||||||
|
@@ -820,22 +820,22 @@ 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
|
||||||
|
# elif defined(__or1k__)
|
||||||
|
or1k-linux-gnu
|
||||||
|
# elif defined(__powerpc__) && defined(__SPE__)
|
||||||
|
- powerpc-linux-gnuspe
|
||||||
|
+ ppc-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
|
||||||
|
+ ppc-linux-gnu
|
||||||
|
# elif defined(__s390x__)
|
||||||
|
s390x-linux-gnu
|
||||||
|
# elif defined(__s390__)
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
13
00316-mark-bdist_wininst-unsupported.patch
Normal file
13
00316-mark-bdist_wininst-unsupported.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
|
||||||
|
index 0871a4f..8796b68 100644
|
||||||
|
--- a/Lib/distutils/command/bdist_wininst.py
|
||||||
|
+++ b/Lib/distutils/command/bdist_wininst.py
|
||||||
|
@@ -12,6 +12,8 @@ from distutils.sysconfig import get_python_version
|
||||||
|
from distutils import log
|
||||||
|
|
||||||
|
class bdist_wininst(Command):
|
||||||
|
+ # Marker for tests that we have the unsupported bdist_wininst
|
||||||
|
+ _unsupported = True
|
||||||
|
|
||||||
|
description = "create an executable installer for MS Windows"
|
||||||
|
|
||||||
BIN
Python-3.7.4.tar.xz
Normal file
BIN
Python-3.7.4.tar.xz
Normal file
Binary file not shown.
9
pyconfig.h
Normal file
9
pyconfig.h
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#include <bits/wordsize.h>
|
||||||
|
|
||||||
|
#if __WORDSIZE == 32
|
||||||
|
#include "pyconfig-32.h"
|
||||||
|
#elif __WORDSIZE == 64
|
||||||
|
#include "pyconfig-64.h"
|
||||||
|
#else
|
||||||
|
#error "Unknown word size"
|
||||||
|
#endif
|
||||||
771
python3.spec
Normal file
771
python3.spec
Normal file
@ -0,0 +1,771 @@
|
|||||||
|
Name: python3
|
||||||
|
Summary: Interpreter of the Python3 programming language
|
||||||
|
URL: https://www.python.org/
|
||||||
|
|
||||||
|
Version: 3.7.4
|
||||||
|
Release: 1
|
||||||
|
License: Python
|
||||||
|
|
||||||
|
%global branchversion 3.7
|
||||||
|
%global pyshortver 37
|
||||||
|
|
||||||
|
%ifarch %{ix86} x86_64
|
||||||
|
%bcond_without optimizations
|
||||||
|
%else
|
||||||
|
%bcond_with optimizations
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%global pylibdir %{_libdir}/python%{branchversion}
|
||||||
|
%global dynload_dir %{pylibdir}/lib-dynload
|
||||||
|
|
||||||
|
# See http://www.python.org/dev/peps/pep-3149/
|
||||||
|
%global ABIFLAGS_optimized m
|
||||||
|
%global ABIFLAGS_debug dm
|
||||||
|
|
||||||
|
%global LDVERSION_optimized %{branchversion}m
|
||||||
|
%global LDVERSION_debug %{branchversion}dm
|
||||||
|
|
||||||
|
%global SOABI_optimized cpython-%{pyshortver}m-%{_arch}-linux%{_gnu}
|
||||||
|
%global SOABI_debug cpython-%{pyshortver}dm-%{_arch}-linux%{_gnu}
|
||||||
|
|
||||||
|
# See http://www.python.org/dev/peps/pep-3147/
|
||||||
|
%global bytecode_suffixes .cpython-%{pyshortver}*.pyc
|
||||||
|
|
||||||
|
%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.1.0
|
||||||
|
%global py_INSTSONAME_debug libpython%{LDVERSION_debug}.so.1.0
|
||||||
|
|
||||||
|
%undefine py_auto_byte_compile
|
||||||
|
|
||||||
|
%global wordsize 64
|
||||||
|
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: bluez-libs-devel
|
||||||
|
BuildRequires: bzip2
|
||||||
|
BuildRequires: bzip2-devel
|
||||||
|
BuildRequires: desktop-file-utils
|
||||||
|
BuildRequires: expat-devel
|
||||||
|
|
||||||
|
BuildRequires: findutils
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: gdbm-devel
|
||||||
|
BuildRequires: glibc-all-langpacks
|
||||||
|
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: openEuler-rpm-config
|
||||||
|
BuildRequires: sqlite-devel
|
||||||
|
BuildRequires: gdb
|
||||||
|
|
||||||
|
BuildRequires: tar
|
||||||
|
BuildRequires: tcl-devel
|
||||||
|
BuildRequires: tix-devel
|
||||||
|
BuildRequires: tk-devel
|
||||||
|
|
||||||
|
BuildRequires: valgrind-devel
|
||||||
|
|
||||||
|
BuildRequires: xz-devel
|
||||||
|
BuildRequires: zlib-devel
|
||||||
|
|
||||||
|
BuildRequires: systemtap-sdt-devel
|
||||||
|
|
||||||
|
BuildRequires: net-tools
|
||||||
|
|
||||||
|
BuildRequires: python-setuptools-wheel
|
||||||
|
BuildRequires: python-pip-wheel
|
||||||
|
|
||||||
|
Source: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
|
||||||
|
Source1: pyconfig.h
|
||||||
|
|
||||||
|
Patch1: 00001-rpath.patch
|
||||||
|
Patch102: 00102-lib64.patch
|
||||||
|
Patch111: 00111-no-static-lib.patch
|
||||||
|
Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch
|
||||||
|
Patch155: 00155-avoid-ctypes-thunks.patch
|
||||||
|
Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch
|
||||||
|
Patch170: 00170-gc-assertions.patch
|
||||||
|
Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch
|
||||||
|
Patch189: 00189-use-rpm-wheels.patch
|
||||||
|
Patch205: 00205-make-libpl-respect-lib64.patch
|
||||||
|
Patch251: 00251-change-user-install-location.patch
|
||||||
|
Patch274: 00274-fix-arch-names.patch
|
||||||
|
Patch316: 00316-mark-bdist_wininst-unsupported.patch
|
||||||
|
|
||||||
|
Provides: python%{branchversion} = %{version}-%{release}
|
||||||
|
Provides: python(abi) = %{branchversion}
|
||||||
|
|
||||||
|
Provides: python%{pyshortver} = %{version}-%{release}
|
||||||
|
Obsoletes: python%{pyshortver}
|
||||||
|
|
||||||
|
Requires: python-setuptools-wheel
|
||||||
|
Requires: python-pip-wheel
|
||||||
|
Provides: python3-libs
|
||||||
|
Obsoletes: python3-libs
|
||||||
|
|
||||||
|
Recommends: python3-setuptools
|
||||||
|
Recommends: python3-pip
|
||||||
|
|
||||||
|
%global __requires_exclude ^/usr/bin/python3
|
||||||
|
|
||||||
|
%description
|
||||||
|
Python combines remarkable power with very clear syntax. It has modules,
|
||||||
|
classes, exceptions, very high level dynamic data types, and dynamic
|
||||||
|
typing. There are interfaces to many system calls and libraries, as well
|
||||||
|
as to various windowing systems. New built-in modules are easily written
|
||||||
|
in C or C++ (or other languages, depending on the chosen implementation).
|
||||||
|
Python is also usable as an extension language for applications written
|
||||||
|
in other languages that need easy-to-use scripting or automation interfaces.
|
||||||
|
|
||||||
|
This package Provides python version 3.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Libraries and header files needed for Python development
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: python-rpm-macros
|
||||||
|
Requires: python3-rpm-macros
|
||||||
|
Requires: python3-rpm-generators
|
||||||
|
Requires: python3-setuptools
|
||||||
|
Provides: %{name}-2to3 = %{version}-%{release}
|
||||||
|
Provides: 2to3 = %{version}-%{release}
|
||||||
|
Conflicts: %{name} < %{version}-%{release}
|
||||||
|
Provides: python3-idle
|
||||||
|
Obsoletes: python3-idle
|
||||||
|
Provides: python3-test
|
||||||
|
Obsoletes: python3-test
|
||||||
|
Provides: python3-tkinter
|
||||||
|
Obsoletes: python3-tkinter
|
||||||
|
Provides: %{name}-tools = %{version}-%{release}
|
||||||
|
Obsoletes: %{name}-tools < %{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains the header files and configuration needed to develop
|
||||||
|
python3 modules.
|
||||||
|
|
||||||
|
%package debug
|
||||||
|
Summary: Debug version of the Python runtime
|
||||||
|
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Requires: %{name}-devel = %{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.
|
||||||
|
|
||||||
|
%package_help
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n Python-%{version}
|
||||||
|
find -name '*.exe' -print -delete
|
||||||
|
rm -r Modules/expat
|
||||||
|
|
||||||
|
%patch1 -p1
|
||||||
|
%patch102 -p1
|
||||||
|
%patch111 -p1
|
||||||
|
%patch132 -p1
|
||||||
|
%patch155 -p1
|
||||||
|
%patch160 -p1
|
||||||
|
%patch170 -p1
|
||||||
|
%patch178 -p1
|
||||||
|
|
||||||
|
%patch189 -p1
|
||||||
|
rm Lib/ensurepip/_bundled/*.whl
|
||||||
|
%patch205 -p1
|
||||||
|
%patch251 -p1
|
||||||
|
%patch274 -p1
|
||||||
|
%patch316 -p1
|
||||||
|
|
||||||
|
rm configure pyconfig.h.in
|
||||||
|
|
||||||
|
%build
|
||||||
|
autoconf
|
||||||
|
autoheader
|
||||||
|
|
||||||
|
topdir=$(pwd)
|
||||||
|
|
||||||
|
%if %{with optimizations}
|
||||||
|
%global optimizations_flag "--enable-optimizations"
|
||||||
|
%else
|
||||||
|
%global optimizations_flag "--disable-optimizations"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%global extension_cflags ""
|
||||||
|
%global extension_ldflags ""
|
||||||
|
|
||||||
|
export CFLAGS="%{extension_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
|
||||||
|
export CFLAGS_NODIST="%{build_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
|
||||||
|
export CXXFLAGS="%{extension_cxxflags} -D_GNU_SOURCE -fPIC -fwrapv"
|
||||||
|
export CPPFLAGS="$(pkg-config --cflags-only-I libffi)"
|
||||||
|
export OPT="%{extension_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
|
||||||
|
export LINKCC="gcc"
|
||||||
|
export CFLAGS="$CFLAGS $(pkg-config --cflags openssl)"
|
||||||
|
export LDFLAGS="%{extension_ldflags} -g $(pkg-config --libs-only-L openssl)"
|
||||||
|
export LDFLAGS_NODIST="%{build_ldflags} -g $(pkg-config --libs-only-L openssl)"
|
||||||
|
|
||||||
|
DebugBuildDir=build/debug
|
||||||
|
mkdir -p ${DebugBuildDir}
|
||||||
|
pushd ${DebugBuildDir}
|
||||||
|
|
||||||
|
%global _configure $topdir/configure
|
||||||
|
|
||||||
|
%configure \
|
||||||
|
--enable-ipv6 \
|
||||||
|
--enable-shared \
|
||||||
|
--with-computed-gotos=yes \
|
||||||
|
--with-dbmliborder=gdbm:ndbm:bdb \
|
||||||
|
--with-system-expat \
|
||||||
|
--with-system-ffi \
|
||||||
|
--enable-loadable-sqlite-extensions \
|
||||||
|
--with-dtrace \
|
||||||
|
--with-lto \
|
||||||
|
--with-ssl-default-suites=openssl \
|
||||||
|
--with-valgrind \
|
||||||
|
--without-ensurepip \
|
||||||
|
--with-pydebug
|
||||||
|
|
||||||
|
%make_build EXTRA_CFLAGS="$CFLAGS -Og"
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
OptimizedBuildDir=build/optimized
|
||||||
|
mkdir -p ${OptimizedBuildDir}
|
||||||
|
pushd ${OptimizedBuildDir}
|
||||||
|
|
||||||
|
%global _configure $topdir/configure
|
||||||
|
|
||||||
|
%configure \
|
||||||
|
--enable-ipv6 \
|
||||||
|
--enable-shared \
|
||||||
|
--with-computed-gotos=yes \
|
||||||
|
--with-dbmliborder=gdbm:ndbm:bdb \
|
||||||
|
--with-system-expat \
|
||||||
|
--with-system-ffi \
|
||||||
|
--enable-loadable-sqlite-extensions \
|
||||||
|
--with-dtrace \
|
||||||
|
--with-lto \
|
||||||
|
--with-ssl-default-suites=openssl \
|
||||||
|
--with-valgrind \
|
||||||
|
--without-ensurepip \
|
||||||
|
%{optimizations_flag}
|
||||||
|
|
||||||
|
%make_build EXTRA_CFLAGS="$CFLAGS"
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
%install
|
||||||
|
|
||||||
|
topdir=$(pwd)
|
||||||
|
|
||||||
|
DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir}
|
||||||
|
mkdir -p %{buildroot}$DirHoldingGdbPy
|
||||||
|
|
||||||
|
%global _pyconfig32_h pyconfig-32.h
|
||||||
|
%global _pyconfig64_h pyconfig-64.h
|
||||||
|
%global _pyconfig_h pyconfig-%{wordsize}.h
|
||||||
|
|
||||||
|
DebugBuildDir=build/debug
|
||||||
|
mkdir -p ${DebugBuildDir}
|
||||||
|
pushd ${DebugBuildDir}
|
||||||
|
make DESTDIR=%{buildroot} INSTALL="install -p" EXTRA_CFLAGS="-O0" install
|
||||||
|
popd
|
||||||
|
|
||||||
|
PathOfGdbPy=$DirHoldingGdbPy/%{py_INSTSONAME_debug}-%{version}-%{release}.%{_arch}.debug-gdb.py
|
||||||
|
cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
|
||||||
|
|
||||||
|
mv %{buildroot}%{_bindir}/python%{LDVERSION_debug}-{,`uname -m`-}config
|
||||||
|
echo -e '#!/bin/sh\nexec `dirname $0`/python'%{LDVERSION_debug}'-`uname -m`-config "$@"' > \
|
||||||
|
%{buildroot}%{_bindir}/python%{LDVERSION_debug}-config
|
||||||
|
echo '[ $? -eq 127 ] && echo "Could not find python'%{LDVERSION_debug}'-`uname -m`-config. Look around to see available arches." >&2' >> \
|
||||||
|
%{buildroot}%{_bindir}/python%{LDVERSION_debug}-config
|
||||||
|
chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_debug}-config
|
||||||
|
|
||||||
|
mv %{buildroot}%{_includedir}/python%{LDVERSION_debug}/pyconfig.h \
|
||||||
|
%{buildroot}%{_includedir}/python%{LDVERSION_debug}/%{_pyconfig_h}
|
||||||
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_includedir}/python%{LDVERSION_debug}/pyconfig.h
|
||||||
|
|
||||||
|
OptimizedBuildDir=build/optimized
|
||||||
|
mkdir -p ${OptimizedBuildDir}
|
||||||
|
pushd ${OptimizedBuildDir}
|
||||||
|
make DESTDIR=%{buildroot} INSTALL="install -p" EXTRA_CFLAGS="" install
|
||||||
|
popd
|
||||||
|
|
||||||
|
PathOfGdbPy=$DirHoldingGdbPy/%{py_INSTSONAME_optimized}-%{version}-%{release}.%{_arch}.debug-gdb.py
|
||||||
|
cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
|
||||||
|
|
||||||
|
mv %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-{,`uname -m`-}config
|
||||||
|
echo -e '#!/bin/sh\nexec `dirname $0`/python'%{LDVERSION_optimized}'-`uname -m`-config "$@"' > \
|
||||||
|
%{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
|
||||||
|
echo '[ $? -eq 127 ] && echo "Could not find python'%{LDVERSION_optimized}'-`uname -m`-config. Look around to see available arches." >&2' >> \
|
||||||
|
%{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
|
||||||
|
chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
|
||||||
|
|
||||||
|
mv %{buildroot}%{_includedir}/python%{LDVERSION_optimized}/pyconfig.h \
|
||||||
|
%{buildroot}%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
|
||||||
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_includedir}/python%{LDVERSION_optimized}/pyconfig.h
|
||||||
|
install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__
|
||||||
|
install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{branchversion}/site-packages/__pycache__
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \
|
||||||
|
%{buildroot}%{pylibdir}/distutils/sysconfig.py \
|
||||||
|
%{buildroot}%{pylibdir}/sysconfig.py
|
||||||
|
|
||||||
|
cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/
|
||||||
|
|
||||||
|
for tool in pygettext msgfmt; do
|
||||||
|
cp -p Tools/i18n/${tool}.py %{buildroot}%{_bindir}/${tool}%{branchversion}.py
|
||||||
|
ln -s ${tool}%{branchversion}.py %{buildroot}%{_bindir}/${tool}3.py
|
||||||
|
done
|
||||||
|
|
||||||
|
LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
|
||||||
|
Tools/scripts/pathfix.py \
|
||||||
|
-i "%{_bindir}/python%{branchversion}" -pn \
|
||||||
|
%{buildroot} \
|
||||||
|
%{buildroot}%{_bindir}/*%{branchversion}.py \
|
||||||
|
%{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py}
|
||||||
|
|
||||||
|
rm -rf %{buildroot}%{pylibdir}/test/test_tools
|
||||||
|
|
||||||
|
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 {} \; \) \)
|
||||||
|
|
||||||
|
find %{buildroot} -name \*.bat -exec rm {} \;
|
||||||
|
|
||||||
|
find %{buildroot}/ -name "*~" -exec rm -f {} \;
|
||||||
|
find . -name "*~" -exec rm -f {} \;
|
||||||
|
|
||||||
|
rm %{buildroot}%{pylibdir}/LICENSE.txt
|
||||||
|
|
||||||
|
find %{buildroot} -type f -a -name "*.py" -print0 | \
|
||||||
|
LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
|
||||||
|
PYTHONPATH="%{buildroot}%{_libdir}/python%{branchversion} %{buildroot}%{_libdir}/python%{branchversion}/site-packages" \
|
||||||
|
xargs -0 %{buildroot}%{_bindir}/python%{branchversion} -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:]]' || :
|
||||||
|
|
||||||
|
rm -rf %{buildroot}%{_bindir}/__pycache__
|
||||||
|
|
||||||
|
find %{buildroot} -perm 555 -exec chmod 755 {} \;
|
||||||
|
|
||||||
|
ln -s \
|
||||||
|
%{_bindir}/python%{LDVERSION_debug} \
|
||||||
|
%{buildroot}%{_bindir}/python3-debug
|
||||||
|
|
||||||
|
mv %{buildroot}%{_bindir}/2to3-%{branchversion} %{buildroot}%{_bindir}/2to3
|
||||||
|
|
||||||
|
%check
|
||||||
|
topdir=$(pwd)
|
||||||
|
|
||||||
|
export OPENSSL_CONF=/non-existing-file
|
||||||
|
|
||||||
|
LD_LIBRARY_PATH=$(pwd)/build/debug $(pwd)/build/debug/python -m test.pythoninfo
|
||||||
|
|
||||||
|
WITHIN_PYTHON_RPM_BUILD= \
|
||||||
|
LD_LIBRARY_PATH=$(pwd)/build/debug $(pwd)/build/debug/python -m test.regrtest \
|
||||||
|
-wW --slowest -j0 \
|
||||||
|
-x test_distutils \
|
||||||
|
-x test_bdist_rpm \
|
||||||
|
-x test_gdb \
|
||||||
|
-x test_socket \
|
||||||
|
-x test_asyncio
|
||||||
|
|
||||||
|
export OPENSSL_CONF=/non-existing-file
|
||||||
|
|
||||||
|
LD_LIBRARY_PATH=$(pwd)/build/optimized $(pwd)/build/optimized/python -m test.pythoninfo
|
||||||
|
|
||||||
|
WITHIN_PYTHON_RPM_BUILD= \
|
||||||
|
LD_LIBRARY_PATH=$(pwd)/build/optimized $(pwd)/build/optimized/python -m test.regrtest \
|
||||||
|
-wW --slowest -j0 \
|
||||||
|
-x test_distutils \
|
||||||
|
-x test_bdist_rpm \
|
||||||
|
-x test_gdb \
|
||||||
|
-x test_socket \
|
||||||
|
-x test_asyncio
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.rst
|
||||||
|
|
||||||
|
%{_bindir}/pydoc*
|
||||||
|
%{_bindir}/python3
|
||||||
|
%{_bindir}/pyvenv
|
||||||
|
|
||||||
|
%{_bindir}/python%{branchversion}
|
||||||
|
%{_bindir}/python%{branchversion}m
|
||||||
|
%{_bindir}/pyvenv-%{branchversion}
|
||||||
|
|
||||||
|
%dir %{pylibdir}
|
||||||
|
%dir %{dynload_dir}
|
||||||
|
|
||||||
|
%{pylibdir}/lib2to3
|
||||||
|
%exclude %{pylibdir}/lib2to3/tests
|
||||||
|
|
||||||
|
%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}
|
||||||
|
|
||||||
|
%exclude %{pylibdir}/ensurepip/_bundled
|
||||||
|
|
||||||
|
%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/*.py
|
||||||
|
%{pylibdir}/test/support/__pycache__/*%{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
|
||||||
|
%{dynload_dir}/_gdbm.%{SOABI_optimized}.so
|
||||||
|
%{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
|
||||||
|
|
||||||
|
%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}
|
||||||
|
|
||||||
|
%exclude %{pylibdir}/turtle.py
|
||||||
|
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
|
||||||
|
|
||||||
|
%{pylibdir}/urllib
|
||||||
|
%{pylibdir}/xml
|
||||||
|
|
||||||
|
%attr(0755,root,root) %dir %{_prefix}/lib/python%{branchversion}
|
||||||
|
%attr(0755,root,root) %dir %{_prefix}/lib/python%{branchversion}/site-packages
|
||||||
|
%attr(0755,root,root) %dir %{_prefix}/lib/python%{branchversion}/site-packages/__pycache__/
|
||||||
|
|
||||||
|
%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}
|
||||||
|
%{_libdir}/libpython3.so
|
||||||
|
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_bindir}/2to3
|
||||||
|
|
||||||
|
%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/*
|
||||||
|
%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile
|
||||||
|
%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
|
||||||
|
%{_includedir}/python%{LDVERSION_optimized}/*.h
|
||||||
|
%{_includedir}/python%{LDVERSION_optimized}/internal/
|
||||||
|
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
|
||||||
|
|
||||||
|
%{_bindir}/python3-config
|
||||||
|
%{_libdir}/pkgconfig/python3.pc
|
||||||
|
%{_bindir}/pathfix.py
|
||||||
|
%{_bindir}/pygettext3.py
|
||||||
|
%{_bindir}/msgfmt3.py
|
||||||
|
|
||||||
|
%{_bindir}/pygettext%{branchversion}.py
|
||||||
|
%{_bindir}/msgfmt%{branchversion}.py
|
||||||
|
|
||||||
|
%{_bindir}/python%{branchversion}-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-%{branchversion}.pc
|
||||||
|
|
||||||
|
%{_bindir}/idle*
|
||||||
|
%{pylibdir}/idlelib
|
||||||
|
|
||||||
|
%{_datadir}/icons/hicolor/*/apps/idle3.*
|
||||||
|
|
||||||
|
%{pylibdir}/tkinter
|
||||||
|
%exclude %{pylibdir}/tkinter/test
|
||||||
|
%{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}
|
||||||
|
|
||||||
|
%{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
|
||||||
|
|
||||||
|
%exclude %dir %{pylibdir}/test/
|
||||||
|
%exclude %dir %{pylibdir}/test/__pycache__/
|
||||||
|
%exclude %{pylibdir}/test/__init__.py
|
||||||
|
%exclude %{pylibdir}/test/__pycache__/__init__%{bytecode_suffixes}
|
||||||
|
%exclude %{pylibdir}/test/support/
|
||||||
|
|
||||||
|
%files debug
|
||||||
|
%{_bindir}/python3-debug
|
||||||
|
|
||||||
|
%{_bindir}/python%{LDVERSION_debug}
|
||||||
|
|
||||||
|
%{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
|
||||||
|
%{dynload_dir}/_gdbm.%{SOABI_debug}.so
|
||||||
|
%{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
|
||||||
|
|
||||||
|
%{_libdir}/%{py_INSTSONAME_debug}
|
||||||
|
|
||||||
|
%{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
|
||||||
|
|
||||||
|
%{dynload_dir}/_tkinter.%{SOABI_debug}.so
|
||||||
|
|
||||||
|
%{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
|
||||||
|
|
||||||
|
%undefine _debuginfo_subpackages
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%{_mandir}/*/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Aug 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.7.4-1
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user