Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d9f0c430ff | ||
|
d205ffd971 | ||
|
82f680a3b3 | ||
|
f199b0dd0d | ||
|
41c979f2fd | ||
|
bbd3a64230 | ||
|
30b27438ae | ||
|
9e2b618841 | ||
|
5a92b53214 | ||
|
d335e8943f | ||
|
f22eb7c48a | ||
|
f56bf4c622 | ||
|
b0d1a493f1 | ||
|
ddfa816cb1 | ||
|
af8f04adfc | ||
|
bc5ead97c2 | ||
|
311b0e4fee | ||
|
c7fb95b81b | ||
|
10edcbc293 | ||
|
8c8bf1e327 | ||
|
144849eafe | ||
|
cf09c35d6e |
@ -674,21 +674,6 @@ diff -up Python-3.3.0rc2/Makefile.pre.in.systemtap Python-3.3.0rc2/Makefile.pre.
|
|||||||
|
|
||||||
profile-removal:
|
profile-removal:
|
||||||
find . -name '*.gc??' -exec rm -f {} ';'
|
find . -name '*.gc??' -exec rm -f {} ';'
|
||||||
diff -up Python-3.3.0rc2/Misc/NEWS.systemtap Python-3.3.0rc2/Misc/NEWS
|
|
||||||
--- Python-3.3.0rc2/Misc/NEWS.systemtap 2012-09-09 05:11:05.000000000 -0400
|
|
||||||
+++ Python-3.3.0rc2/Misc/NEWS 2012-09-10 09:17:21.120511781 -0400
|
|
||||||
@@ -619,6 +619,11 @@ Core and Builtins
|
|
||||||
|
|
||||||
- Issue #15038: Optimize python Locks on Windows.
|
|
||||||
|
|
||||||
+- Issue #14776: Added a new --with-systemtap configure-time option, which adds
|
|
||||||
+ static markers for SystemTap so that SystemTap scripts can observe bytecode
|
|
||||||
+ frames being entered and exited and so generate reports on what Python code
|
|
||||||
+ is being exectuted.
|
|
||||||
+
|
|
||||||
Library
|
|
||||||
-------
|
|
||||||
|
|
||||||
diff -up Python-3.3.0rc2/pyconfig.h.in.systemtap Python-3.3.0rc2/pyconfig.h.in
|
diff -up Python-3.3.0rc2/pyconfig.h.in.systemtap Python-3.3.0rc2/pyconfig.h.in
|
||||||
--- Python-3.3.0rc2/pyconfig.h.in.systemtap 2012-09-09 05:11:14.000000000 -0400
|
--- Python-3.3.0rc2/pyconfig.h.in.systemtap 2012-09-09 05:11:14.000000000 -0400
|
||||||
+++ Python-3.3.0rc2/pyconfig.h.in 2012-09-10 09:17:21.120511781 -0400
|
+++ Python-3.3.0rc2/pyconfig.h.in 2012-09-10 09:17:21.120511781 -0400
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
--- Python-3.4.0b1/Lib/distutils/command/install.py.lib64 2013-11-24 21:36:54.000000000 +0100
|
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
|
||||||
+++ Python-3.4.0b1/Lib/distutils/command/install.py 2013-11-27 11:10:43.821150774 +0100
|
index 456511c..36d31e9 100644
|
||||||
|
--- a/Lib/distutils/command/install.py
|
||||||
|
+++ b/Lib/distutils/command/install.py
|
||||||
@@ -45,14 +45,14 @@ else:
|
@@ -45,14 +45,14 @@ else:
|
||||||
INSTALL_SCHEMES = {
|
INSTALL_SCHEMES = {
|
||||||
'unix_prefix': {
|
'unix_prefix': {
|
||||||
@ -17,9 +19,11 @@
|
|||||||
'headers': '$base/include/python/$dist_name',
|
'headers': '$base/include/python/$dist_name',
|
||||||
'scripts': '$base/bin',
|
'scripts': '$base/bin',
|
||||||
'data' : '$base',
|
'data' : '$base',
|
||||||
--- Python-3.4.0b1/Lib/distutils/sysconfig.py.lib64 2013-11-24 21:36:54.000000000 +0100
|
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
||||||
+++ Python-3.4.0b1/Lib/distutils/sysconfig.py 2013-11-27 11:10:43.821150774 +0100
|
index 75537db..e5da51c 100644
|
||||||
@@ -141,8 +141,12 @@
|
--- a/Lib/distutils/sysconfig.py
|
||||||
|
+++ b/Lib/distutils/sysconfig.py
|
||||||
|
@@ -141,8 +141,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
||||||
prefix = plat_specific and EXEC_PREFIX or PREFIX
|
prefix = plat_specific and EXEC_PREFIX or PREFIX
|
||||||
|
|
||||||
if os.name == "posix":
|
if os.name == "posix":
|
||||||
@ -33,9 +37,11 @@
|
|||||||
if standard_lib:
|
if standard_lib:
|
||||||
return libpython
|
return libpython
|
||||||
else:
|
else:
|
||||||
--- Python-3.4.0b1/Lib/site.py.lib64 2013-11-24 21:36:54.000000000 +0100
|
diff --git a/Lib/site.py b/Lib/site.py
|
||||||
+++ Python-3.4.0b1/Lib/site.py 2013-11-27 11:10:43.822150773 +0100
|
index 14f4f80..e31e0dd 100644
|
||||||
@@ -304,12 +304,16 @@
|
--- a/Lib/site.py
|
||||||
|
+++ b/Lib/site.py
|
||||||
|
@@ -303,11 +303,15 @@ def getsitepackages(prefixes=None):
|
||||||
seen.add(prefix)
|
seen.add(prefix)
|
||||||
|
|
||||||
if os.sep == '/':
|
if os.sep == '/':
|
||||||
@ -45,16 +51,17 @@
|
|||||||
sitepackages.append(os.path.join(prefix, "lib",
|
sitepackages.append(os.path.join(prefix, "lib",
|
||||||
"python" + sys.version[:3],
|
"python" + sys.version[:3],
|
||||||
"site-packages"))
|
"site-packages"))
|
||||||
sitepackages.append(os.path.join(prefix, "lib", "site-python"))
|
|
||||||
else:
|
else:
|
||||||
sitepackages.append(prefix)
|
sitepackages.append(prefix)
|
||||||
+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
|
+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
|
||||||
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
|
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
|
||||||
if sys.platform == "darwin":
|
if sys.platform == "darwin":
|
||||||
# for framework builds *only* we add the standard Apple
|
# for framework builds *only* we add the standard Apple
|
||||||
--- Python-3.4.0b1/Lib/sysconfig.py.lib64 2013-11-24 21:36:54.000000000 +0100
|
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
|
||||||
+++ Python-3.4.0b1/Lib/sysconfig.py 2013-11-27 11:10:43.822150773 +0100
|
index dbf7767..dba45c7 100644
|
||||||
@@ -20,10 +20,10 @@
|
--- a/Lib/sysconfig.py
|
||||||
|
+++ b/Lib/sysconfig.py
|
||||||
|
@@ -20,10 +20,10 @@ __all__ = [
|
||||||
|
|
||||||
_INSTALL_SCHEMES = {
|
_INSTALL_SCHEMES = {
|
||||||
'posix_prefix': {
|
'posix_prefix': {
|
||||||
@ -68,7 +75,7 @@
|
|||||||
'include':
|
'include':
|
||||||
'{installed_base}/include/python{py_version_short}{abiflags}',
|
'{installed_base}/include/python{py_version_short}{abiflags}',
|
||||||
'platinclude':
|
'platinclude':
|
||||||
@@ -61,10 +61,10 @@
|
@@ -61,10 +61,10 @@ _INSTALL_SCHEMES = {
|
||||||
'data': '{userbase}',
|
'data': '{userbase}',
|
||||||
},
|
},
|
||||||
'posix_user': {
|
'posix_user': {
|
||||||
@ -82,30 +89,37 @@
|
|||||||
'include': '{userbase}/include/python{py_version_short}',
|
'include': '{userbase}/include/python{py_version_short}',
|
||||||
'scripts': '{userbase}/bin',
|
'scripts': '{userbase}/bin',
|
||||||
'data': '{userbase}',
|
'data': '{userbase}',
|
||||||
--- Python-3.4.0b1/Lib/test/test_site.py.lib64 2013-11-24 21:36:55.000000000 +0100
|
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
|
||||||
+++ Python-3.4.0b1/Lib/test/test_site.py 2013-11-27 11:10:43.822150773 +0100
|
index c2f37f8..a0f6b8d 100644
|
||||||
@@ -244,12 +244,15 @@
|
--- a/Lib/test/test_site.py
|
||||||
self.assertEqual(dirs[2], wanted)
|
+++ b/Lib/test/test_site.py
|
||||||
|
@@ -244,15 +244,18 @@ class HelperFunctionsTests(unittest.TestCase):
|
||||||
elif os.sep == '/':
|
elif os.sep == '/':
|
||||||
# OS X non-framwework builds, Linux, FreeBSD, etc
|
# OS X non-framwework builds, Linux, FreeBSD, etc
|
||||||
- self.assertEqual(len(dirs), 2)
|
self.assertEqual(len(dirs), 1)
|
||||||
- wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
|
- wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
|
||||||
+ self.assertEqual(len(dirs), 3)
|
|
||||||
+ wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3],
|
+ wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3],
|
||||||
'site-packages')
|
'site-packages')
|
||||||
self.assertEqual(dirs[0], wanted)
|
self.assertEqual(dirs[0], wanted)
|
||||||
- wanted = os.path.join('xoxo', 'lib', 'site-python')
|
else:
|
||||||
|
# other platforms
|
||||||
|
- self.assertEqual(len(dirs), 2)
|
||||||
|
+ self.assertEqual(len(dirs), 3)
|
||||||
|
self.assertEqual(dirs[0], 'xoxo')
|
||||||
|
- wanted = os.path.join('xoxo', 'lib', 'site-packages')
|
||||||
+ wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
|
+ wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
|
||||||
+ 'site-packages')
|
+ 'site-packages')
|
||||||
self.assertEqual(dirs[1], wanted)
|
self.assertEqual(dirs[1], wanted)
|
||||||
+ wanted = os.path.join('xoxo', 'lib', 'site-python')
|
+ wanted = os.path.join('xoxo', 'lib', 'site-python')
|
||||||
+ self.assertEqual(dirs[2], wanted)
|
+ self.assertEqual(dirs[2], wanted)
|
||||||
else:
|
|
||||||
# other platforms
|
class PthFile(object):
|
||||||
self.assertEqual(len(dirs), 2)
|
"""Helper class for handling testing of .pth files"""
|
||||||
--- Python-3.4.0b1/Makefile.pre.in.lib64 2013-11-27 11:10:43.814150786 +0100
|
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||||
+++ Python-3.4.0b1/Makefile.pre.in 2013-11-27 11:10:43.823150771 +0100
|
index 43bc818..25b1c81 100644
|
||||||
@@ -115,7 +115,7 @@
|
--- a/Makefile.pre.in
|
||||||
|
+++ b/Makefile.pre.in
|
||||||
|
@@ -115,7 +115,7 @@ LIBDIR= @libdir@
|
||||||
MANDIR= @mandir@
|
MANDIR= @mandir@
|
||||||
INCLUDEDIR= @includedir@
|
INCLUDEDIR= @includedir@
|
||||||
CONFINCLUDEDIR= $(exec_prefix)/include
|
CONFINCLUDEDIR= $(exec_prefix)/include
|
||||||
@ -114,9 +128,11 @@
|
|||||||
ABIFLAGS= @ABIFLAGS@
|
ABIFLAGS= @ABIFLAGS@
|
||||||
|
|
||||||
# Detailed destination directories
|
# Detailed destination directories
|
||||||
--- Python-3.4.0b1/Modules/getpath.c.lib64 2013-11-24 21:36:56.000000000 +0100
|
diff --git a/Modules/getpath.c b/Modules/getpath.c
|
||||||
+++ Python-3.4.0b1/Modules/getpath.c 2013-11-27 11:17:33.619449704 +0100
|
index f26b8e9..64bb4cf 100644
|
||||||
@@ -122,8 +122,8 @@
|
--- a/Modules/getpath.c
|
||||||
|
+++ b/Modules/getpath.c
|
||||||
|
@@ -118,8 +118,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PYTHONPATH
|
#ifndef PYTHONPATH
|
||||||
@ -127,7 +143,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LANDMARK
|
#ifndef LANDMARK
|
||||||
@@ -498,7 +498,7 @@
|
@@ -494,7 +494,7 @@ calculate_path(void)
|
||||||
_pythonpath = _Py_char2wchar(PYTHONPATH, NULL);
|
_pythonpath = _Py_char2wchar(PYTHONPATH, NULL);
|
||||||
_prefix = _Py_char2wchar(PREFIX, NULL);
|
_prefix = _Py_char2wchar(PREFIX, NULL);
|
||||||
_exec_prefix = _Py_char2wchar(EXEC_PREFIX, NULL);
|
_exec_prefix = _Py_char2wchar(EXEC_PREFIX, NULL);
|
||||||
@ -136,7 +152,7 @@
|
|||||||
|
|
||||||
if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
|
if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
|
||||||
Py_FatalError(
|
Py_FatalError(
|
||||||
@@ -687,7 +687,7 @@
|
@@ -683,7 +683,7 @@ calculate_path(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
wcsncpy(zip_path, _prefix, MAXPATHLEN);
|
wcsncpy(zip_path, _prefix, MAXPATHLEN);
|
||||||
@ -145,7 +161,7 @@
|
|||||||
bufsz = wcslen(zip_path); /* Replace "00" with version */
|
bufsz = wcslen(zip_path); /* Replace "00" with version */
|
||||||
zip_path[bufsz - 6] = VERSION[0];
|
zip_path[bufsz - 6] = VERSION[0];
|
||||||
zip_path[bufsz - 5] = VERSION[2];
|
zip_path[bufsz - 5] = VERSION[2];
|
||||||
@@ -699,7 +699,7 @@
|
@@ -695,7 +695,7 @@ calculate_path(void)
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Could not find platform dependent libraries <exec_prefix>\n");
|
"Could not find platform dependent libraries <exec_prefix>\n");
|
||||||
wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
|
wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
|
||||||
@ -154,9 +170,11 @@
|
|||||||
}
|
}
|
||||||
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
|
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
|
||||||
|
|
||||||
--- Python-3.4.0b1/setup.py.lib64 2013-11-24 21:36:56.000000000 +0100
|
diff --git a/setup.py b/setup.py
|
||||||
+++ Python-3.4.0b1/setup.py 2013-11-27 11:10:43.824150769 +0100
|
index ef8d0f8..fb24a76 100644
|
||||||
@@ -441,7 +441,7 @@
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -455,7 +455,7 @@ class PyBuildExt(build_ext):
|
||||||
# directories (i.e. '.' and 'Include') must be first. See issue
|
# directories (i.e. '.' and 'Include') must be first. See issue
|
||||||
# 10520.
|
# 10520.
|
||||||
if not cross_compiling:
|
if not cross_compiling:
|
||||||
@ -165,7 +183,7 @@
|
|||||||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||||
# only change this for cross builds for 3.3, issues on Mageia
|
# only change this for cross builds for 3.3, issues on Mageia
|
||||||
if cross_compiling:
|
if cross_compiling:
|
||||||
@@ -718,11 +718,11 @@
|
@@ -732,11 +732,11 @@ class PyBuildExt(build_ext):
|
||||||
elif curses_library:
|
elif curses_library:
|
||||||
readline_libs.append(curses_library)
|
readline_libs.append(curses_library)
|
||||||
elif self.compiler.find_library_file(lib_dirs +
|
elif self.compiler.find_library_file(lib_dirs +
|
||||||
@ -179,7 +197,7 @@
|
|||||||
extra_link_args=readline_extra_link_args,
|
extra_link_args=readline_extra_link_args,
|
||||||
libraries=readline_libs) )
|
libraries=readline_libs) )
|
||||||
else:
|
else:
|
||||||
@@ -759,8 +759,8 @@
|
@@ -773,8 +773,8 @@ class PyBuildExt(build_ext):
|
||||||
if krb5_h:
|
if krb5_h:
|
||||||
ssl_incs += krb5_h
|
ssl_incs += krb5_h
|
||||||
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
|
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -up Python-3.3.0b2/Lib/test/test_sys.py.fix-COUNT_ALLOCS-failure-in-test_sys Python-3.3.0b2/Lib/test/test_sys.py
|
diff -up Python-3.3.0b2/Lib/test/test_sys.py.fix-COUNT_ALLOCS-failure-in-test_sys Python-3.3.0b2/Lib/test/test_sys.py
|
||||||
--- Python-3.3.0b2/Lib/test/test_sys.py.fix-COUNT_ALLOCS-failure-in-test_sys 2012-08-11 02:54:16.000000000 -0400
|
--- Python-3.3.0b2/Lib/test/test_sys.py.fix-COUNT_ALLOCS-failure-in-test_sys 2012-08-11 02:54:16.000000000 -0400
|
||||||
+++ Python-3.3.0b2/Lib/test/test_sys.py 2012-08-13 14:50:15.253720597 -0400
|
+++ Python-3.3.0b2/Lib/test/test_sys.py 2012-08-13 14:50:15.253720597 -0400
|
||||||
@@ -835,12 +835,17 @@ class SizeofTest(unittest.TestCase):
|
@@ -969,12 +969,17 @@ class SizeofTest(unittest.TestCase):
|
||||||
# type
|
# type
|
||||||
# static type: PyTypeObject
|
# static type: PyTypeObject
|
||||||
s = vsize('P2n15Pl4Pn9Pn11PIP')
|
s = vsize('P2n15Pl4Pn9Pn11PIP')
|
||||||
@ -11,7 +11,7 @@ diff -up Python-3.3.0b2/Lib/test/test_sys.py.fix-COUNT_ALLOCS-failure-in-test_sy
|
|||||||
check(int, s)
|
check(int, s)
|
||||||
# (PyTypeObject + PyNumberMethods + PyMappingMethods +
|
# (PyTypeObject + PyNumberMethods + PyMappingMethods +
|
||||||
# PySequenceMethods + PyBufferProcs + 4P)
|
# PySequenceMethods + PyBufferProcs + 4P)
|
||||||
s = vsize('P2n15Pl4Pn9Pn11PIP') + struct.calcsize('34P 3P 10P 2P 4P')
|
s = vsize('P2n17Pl4Pn9Pn11PIP') + struct.calcsize('34P 3P 10P 2P 4P')
|
||||||
# Separate block for PyDictKeysObject with 4 entries
|
# Separate block for PyDictKeysObject with 4 entries
|
||||||
s += struct.calcsize("2nPn") + 4*struct.calcsize("n2P")
|
s += struct.calcsize("2nPn") + 4*struct.calcsize("n2P")
|
||||||
+ if hasattr(sys, 'getcounts'):
|
+ if hasattr(sys, 'getcounts'):
|
||||||
|
37
brp-python-bytecompile-with-scl-python-35
Executable file
37
brp-python-bytecompile-with-scl-python-35
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Altered from brp-python-bytecompile
|
||||||
|
errors_terminate=$2
|
||||||
|
|
||||||
|
# If using normal root, avoid changing anything.
|
||||||
|
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If we don't have a python interpreter, exit.
|
||||||
|
python=$1
|
||||||
|
if [ ! -x "$python" ]; then
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Figure out how deep we need to descend. We could pick an insanely high
|
||||||
|
# number and hope it's enough, but somewhere, somebody's sure to run into it.
|
||||||
|
depth=`(find $RPM_BUILD_ROOT -type f -name "*.py" -print0 ; echo /) | \
|
||||||
|
xargs -0 -n 1 dirname | sed 's,[^/],,g' | sort -u | tail -n 1 | wc -c`
|
||||||
|
if [ -z "$depth" -o "$depth" -le "1" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Generate normal (.pyc) byte-compiled files.
|
||||||
|
$python -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, re.compile(r"'"/bin/|/sbin/"'"), quiet=1))'
|
||||||
|
if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
|
||||||
|
# One or more of the files had a syntax error
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Generate optimized (.pyo) byte-compiled files.
|
||||||
|
$python -O -c 'import compileall, re, sys; sys.exit(not compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, re.compile(r"'"/bin/|/sbin/"'"), quiet=1))' > /dev/null
|
||||||
|
if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
|
||||||
|
# One or more of the files had a syntax error
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
exit 0
|
@ -1,6 +1,24 @@
|
|||||||
%__python3 /usr/bin/python3
|
# define these macros in a way which will expand them to correct values even for non-scl-build, assuming 's/@scl@//'
|
||||||
%python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
%@scl@__python3
|
||||||
%python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
%@scl@__python %@scl@__python3
|
||||||
%python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")
|
%@scl@python3_sitelib %(%{?scl:scl enable @scl@ '}%{@scl@__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"%{?scl:'})
|
||||||
%python3_version_nodots %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3].replace('.',''))")
|
%@scl@python_sitelib %@scl@python3_sitelib
|
||||||
%py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
|
%@scl@python3_sitearch %(%{?scl:scl enable @scl@ '}%{@scl@__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))"%{?scl:'})
|
||||||
|
%@scl@python_sitearch %@scl@python3_sitearch
|
||||||
|
%@scl@python3_version %(%{?scl:scl enable @scl@ '}%{@scl@__python3} -c "import sys; sys.stdout.write(sys.version[:3])"%{?scl:'})
|
||||||
|
%@scl@python_version %@scl@python3_version
|
||||||
|
|
||||||
|
# these macros won't be needed if doing non-scl build, so define them in a way that won't overwrite system ones
|
||||||
|
%@scl@_os_install_post \
|
||||||
|
/usr/lib/rpm/brp-scl-compress %{_scl_root} \
|
||||||
|
%{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip} \
|
||||||
|
/usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \
|
||||||
|
} \
|
||||||
|
/usr/lib/rpm/brp-strip-static-archive %{__strip} \
|
||||||
|
%{!?_turn_off_bytecompile:scl enable @scl@ '/usr/lib/rpm/redhat/brp-python-bytecompile-with-scl-python-35 %@scl@__python3 %{?_python_bytecompile_errors_terminate_build} %{_scl_root}'} \
|
||||||
|
/usr/lib/rpm/brp-python-hardlink
|
||||||
|
|
||||||
|
%@scl@_python_provides /usr/lib/rpm/pythondeps-scl-35.sh --provides %{?scl:@scl@-}
|
||||||
|
%@scl@_python_requires /usr/lib/rpm/pythondeps-scl-35.sh --requires %{?scl:@scl@-}
|
||||||
|
|
||||||
|
%_python_bytecompile_errors_terminate_build 1
|
||||||
|
186
python3.spec
186
python3.spec
@ -1,6 +1,10 @@
|
|||||||
# ======================================================
|
# ======================================================
|
||||||
# Conditionals and other variables controlling the build
|
# Conditionals and other variables controlling the build
|
||||||
# ======================================================
|
# ======================================================
|
||||||
|
%{!?scl:%global pkg_name %{name}}
|
||||||
|
%{?scl:%scl_package python3}
|
||||||
|
# Turn off default SCL bytecompiling.
|
||||||
|
%{?scl:%global _turn_off_bytecompile 1}
|
||||||
|
|
||||||
# NOTES ON BOOTSTRAPING PYTHON 3.4:
|
# NOTES ON BOOTSTRAPING PYTHON 3.4:
|
||||||
#
|
#
|
||||||
@ -16,10 +20,10 @@
|
|||||||
|
|
||||||
%global with_rewheel 1
|
%global with_rewheel 1
|
||||||
|
|
||||||
%global pybasever 3.4
|
%global pybasever 3.5
|
||||||
|
|
||||||
# pybasever without the dot:
|
# pybasever without the dot:
|
||||||
%global pyshortver 34
|
%global pyshortver 35
|
||||||
|
|
||||||
%global pylibdir %{_libdir}/python%{pybasever}
|
%global pylibdir %{_libdir}/python%{pybasever}
|
||||||
%global dynload_dir %{pylibdir}/lib-dynload
|
%global dynload_dir %{pylibdir}/lib-dynload
|
||||||
@ -51,7 +55,7 @@
|
|||||||
# now has bytecode at:
|
# now has bytecode at:
|
||||||
# foo/__pycache__/bar.cpython-34.pyc
|
# foo/__pycache__/bar.cpython-34.pyc
|
||||||
# foo/__pycache__/bar.cpython-34.pyo
|
# foo/__pycache__/bar.cpython-34.pyo
|
||||||
%global bytecode_suffixes .cpython-34.py?
|
%global bytecode_suffixes .cpython-%{pyshortver}.py?
|
||||||
|
|
||||||
# Python's configure script defines SOVERSION, and this is used in the Makefile
|
# Python's configure script defines SOVERSION, and this is used in the Makefile
|
||||||
# to determine INSTSONAME, the name of the libpython DSO:
|
# to determine INSTSONAME, the name of the libpython DSO:
|
||||||
@ -96,11 +100,12 @@
|
|||||||
# (/usr/bin/python, rather than the freshly built python), thus leading to
|
# (/usr/bin/python, rather than the freshly built python), thus leading to
|
||||||
# numerous syntax errors, and incorrect magic numbers in the .pyc files. We
|
# numerous syntax errors, and incorrect magic numbers in the .pyc files. We
|
||||||
# thus override __os_install_post to avoid invoking this script:
|
# thus override __os_install_post to avoid invoking this script:
|
||||||
%global __os_install_post /usr/lib/rpm/brp-compress \
|
%global __os_install_post /usr/lib/rpm/brp-%{?scl:scl-}compress %{?_scl_root} \
|
||||||
%{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}} \
|
%{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}} \
|
||||||
/usr/lib/rpm/brp-strip-static-archive %{__strip} \
|
/usr/lib/rpm/brp-strip-static-archive %{__strip} \
|
||||||
/usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \
|
/usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \
|
||||||
/usr/lib/rpm/brp-python-hardlink
|
/usr/lib/rpm/brp-python-hardlink
|
||||||
|
|
||||||
# to remove the invocation of brp-python-bytecompile, whilst keeping the
|
# to remove the invocation of brp-python-bytecompile, whilst keeping the
|
||||||
# invocation of brp-python-hardlink (since this should still work for python3
|
# invocation of brp-python-hardlink (since this should still work for python3
|
||||||
# pyc/pyo files)
|
# pyc/pyo files)
|
||||||
@ -138,12 +143,14 @@
|
|||||||
# Top-level metadata
|
# Top-level metadata
|
||||||
# ==================
|
# ==================
|
||||||
Summary: Version 3 of the Python programming language aka Python 3000
|
Summary: Version 3 of the Python programming language aka Python 3000
|
||||||
Name: python3
|
Name: %{?scl_prefix}python3
|
||||||
Version: %{pybasever}.1
|
Version: %{pybasever}.0
|
||||||
Release: 12%{?dist}
|
Release: 0.15.20140703hg1492a42b8308%{?dist}
|
||||||
License: Python
|
License: Python
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
|
|
||||||
|
%{?scl:%global __provides_exclude ^pkgconfig}
|
||||||
|
%{?scl:%global __requires_exclude ^python\\(abi}
|
||||||
|
|
||||||
# =======================
|
# =======================
|
||||||
# Build-time requirements
|
# Build-time requirements
|
||||||
@ -151,6 +158,7 @@ Group: Development/Languages
|
|||||||
|
|
||||||
# (keep this list alphabetized)
|
# (keep this list alphabetized)
|
||||||
|
|
||||||
|
%{?scl:BuildRequires: %{scl}-runtime}
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: bluez-libs-devel
|
BuildRequires: bluez-libs-devel
|
||||||
BuildRequires: bzip2
|
BuildRequires: bzip2
|
||||||
@ -183,7 +191,7 @@ BuildRequires: sqlite-devel
|
|||||||
BuildRequires: systemtap-sdt-devel
|
BuildRequires: systemtap-sdt-devel
|
||||||
# (this introduces a dependency on "python", in that systemtap-sdt-devel's
|
# (this introduces a dependency on "python", in that systemtap-sdt-devel's
|
||||||
# /usr/bin/dtrace is a python 2 script)
|
# /usr/bin/dtrace is a python 2 script)
|
||||||
%global tapsetdir /usr/share/systemtap/tapset
|
%global tapsetdir %{_datadir}/systemtap/tapset
|
||||||
%endif # with_systemtap
|
%endif # with_systemtap
|
||||||
|
|
||||||
BuildRequires: tar
|
BuildRequires: tar
|
||||||
@ -199,8 +207,8 @@ BuildRequires: xz-devel
|
|||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
|
||||||
%if 0%{?with_rewheel}
|
%if 0%{?with_rewheel}
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: %{?scl_prefix}%{pkg_name}-setuptools
|
||||||
BuildRequires: python3-pip
|
BuildRequires: %{?scl_prefix}%{pkg_name}-pip
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
@ -208,7 +216,7 @@ BuildRequires: python3-pip
|
|||||||
# Source code and patches
|
# Source code and patches
|
||||||
# =======================
|
# =======================
|
||||||
|
|
||||||
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
|
Source0: python3-nightly-1492a42b8308.tar
|
||||||
|
|
||||||
# Avoid having various bogus auto-generated Provides lines for the various
|
# Avoid having various bogus auto-generated Provides lines for the various
|
||||||
# python c modules' SONAMEs:
|
# python c modules' SONAMEs:
|
||||||
@ -243,6 +251,13 @@ Source7: pyfuntop.stp
|
|||||||
# Written by bkabrda
|
# Written by bkabrda
|
||||||
Source8: check-pyc-and-pyo-timestamps.py
|
Source8: check-pyc-and-pyo-timestamps.py
|
||||||
|
|
||||||
|
# SCL-custom version of pythondeps.sh
|
||||||
|
# Append %%{pyshortver} to not collide with python27 or python33 SCL
|
||||||
|
Source9: pythondeps-scl-%{pyshortver}.sh
|
||||||
|
|
||||||
|
# Append %%{pyshortver} for the same reason here
|
||||||
|
Source10: brp-python-bytecompile-with-scl-python-%{pyshortver}
|
||||||
|
|
||||||
# Fixup distutils/unixccompiler.py to remove standard library path from rpath:
|
# Fixup distutils/unixccompiler.py to remove standard library path from rpath:
|
||||||
# Was Patch0 in ivazquez' python3000 specfile:
|
# Was Patch0 in ivazquez' python3000 specfile:
|
||||||
Patch1: Python-3.1.1-rpath.patch
|
Patch1: Python-3.1.1-rpath.patch
|
||||||
@ -724,13 +739,17 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|||||||
URL: http://www.python.org/
|
URL: http://www.python.org/
|
||||||
|
|
||||||
# See notes in bug 532118:
|
# See notes in bug 532118:
|
||||||
|
Provides: %{?scl_prefix}python(abi) = %{pybasever}
|
||||||
|
|
||||||
|
# This should not be here! It's an ugly workaround for prov/req filtering
|
||||||
Provides: python(abi) = %{pybasever}
|
Provides: python(abi) = %{pybasever}
|
||||||
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name}-libs%{?_isa} = %{version}-%{release}
|
||||||
|
%{?scl:Requires: %{scl}-runtime}
|
||||||
|
|
||||||
%if 0%{with_rewheel}
|
%if 0%{with_rewheel}
|
||||||
Requires: python3-setuptools
|
Requires: %{?scl_prefix}%{pkg_name}-setuptools
|
||||||
Requires: python3-pip
|
Requires: %{?scl_prefix}%{pkg_name}-pip
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -742,6 +761,7 @@ considerably, and a lot of deprecated features have finally been removed.
|
|||||||
%package libs
|
%package libs
|
||||||
Summary: Python 3 runtime libraries
|
Summary: Python 3 runtime libraries
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
|
%{?scl:Requires: %{scl}-runtime}
|
||||||
#Requires: %{name} = %{version}-%{release}
|
#Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME. We use
|
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME. We use
|
||||||
@ -756,9 +776,14 @@ This package contains files used to embed Python 3 into applications.
|
|||||||
%package devel
|
%package devel
|
||||||
Summary: Libraries and header files needed for Python 3 development
|
Summary: Libraries and header files needed for Python 3 development
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{name} = %{version}-%{release}
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
|
||||||
Conflicts: %{name} < %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name}-libs%{?_isa} = %{version}-%{release}
|
||||||
|
Conflicts: %{?scl_prefix}%{pkg_name} < %{version}-%{release}
|
||||||
|
|
||||||
|
%{?scl:Provides: %{?scl_prefix}pkgconfig(%{pkg_name}) = %{pybasever}}
|
||||||
|
%{?scl:Provides: %{?scl_prefix}pkgconfig(python-%{pybasever}) = %{pybasever}}
|
||||||
|
%{?scl:Provides: %{?scl_prefix}pkgconfig(python-%{pybasever}m) = %{pybasever}}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package contains libraries and header files used to build applications
|
This package contains libraries and header files used to build applications
|
||||||
@ -767,8 +792,9 @@ with and native libraries for Python 3
|
|||||||
%package tools
|
%package tools
|
||||||
Summary: A collection of tools included with Python 3
|
Summary: A collection of tools included with Python 3
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
Requires: %{name} = %{version}-%{release}
|
|
||||||
Requires: %{name}-tkinter = %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
|
||||||
|
Requires: %{?scl_prefix}%{pkg_name}-tkinter = %{version}-%{release}
|
||||||
|
|
||||||
%description tools
|
%description tools
|
||||||
This package contains several tools included with Python 3
|
This package contains several tools included with Python 3
|
||||||
@ -776,7 +802,7 @@ This package contains several tools included with Python 3
|
|||||||
%package tkinter
|
%package tkinter
|
||||||
Summary: A GUI toolkit for Python 3
|
Summary: A GUI toolkit for Python 3
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
|
||||||
|
|
||||||
%description tkinter
|
%description tkinter
|
||||||
The Tkinter (Tk interface) program is an graphical user interface for
|
The Tkinter (Tk interface) program is an graphical user interface for
|
||||||
@ -785,11 +811,11 @@ the Python scripting language.
|
|||||||
%package test
|
%package test
|
||||||
Summary: The test modules from the main python 3 package
|
Summary: The test modules from the main python 3 package
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
|
||||||
Requires: %{name}-tools = %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name}-tools = %{version}-%{release}
|
||||||
|
|
||||||
%description test
|
%description test
|
||||||
The test modules from the main %{name} package.
|
The test modules from the main %{?scl_prefix}%{pkg_name} package.
|
||||||
These are in a separate package to save space, as they are almost never used
|
These are in a separate package to save space, as they are almost never used
|
||||||
in production.
|
in production.
|
||||||
|
|
||||||
@ -804,12 +830,12 @@ Group: Applications/System
|
|||||||
# The debug build is an all-in-one package version of the regular build, and
|
# 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
|
# shares the same .py/.pyc files and directories as the regular build. Hence
|
||||||
# we depend on all of the subpackages of the regular build:
|
# we depend on all of the subpackages of the regular build:
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name}%{?_isa} = %{version}-%{release}
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name}-libs%{?_isa} = %{version}-%{release}
|
||||||
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name}-devel%{?_isa} = %{version}-%{release}
|
||||||
Requires: %{name}-test%{?_isa} = %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name}-test%{?_isa} = %{version}-%{release}
|
||||||
Requires: %{name}-tkinter%{?_isa} = %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name}-tkinter%{?_isa} = %{version}-%{release}
|
||||||
Requires: %{name}-tools%{?_isa} = %{version}-%{release}
|
Requires: %{?scl_prefix}%{pkg_name}-tools%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description debug
|
%description debug
|
||||||
python3-debug provides a version of the Python 3 runtime with numerous debugging
|
python3-debug provides a version of the Python 3 runtime with numerous debugging
|
||||||
@ -834,7 +860,7 @@ can load its own extensions.
|
|||||||
# ======================================================
|
# ======================================================
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n Python-%{version}%{?prerel}
|
%setup -q -n python3-nightly
|
||||||
chmod +x %{SOURCE1}
|
chmod +x %{SOURCE1}
|
||||||
|
|
||||||
%if 0%{?with_systemtap}
|
%if 0%{?with_systemtap}
|
||||||
@ -989,7 +1015,7 @@ sed --in-place \
|
|||||||
# ======================================================
|
# ======================================================
|
||||||
|
|
||||||
%build
|
%build
|
||||||
topdir=$(pwd)
|
export topdir=$(pwd)
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
|
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
|
||||||
export CXXFLAGS="$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 CPPFLAGS="`pkg-config --cflags-only-I libffi`"
|
||||||
@ -1072,9 +1098,11 @@ BuildPython() {
|
|||||||
popd
|
popd
|
||||||
echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfDir
|
echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfDir
|
||||||
}
|
}
|
||||||
|
export -f BuildPython
|
||||||
|
|
||||||
# Use "BuildPython" to support building with different configurations:
|
# Use "BuildPython" to support building with different configurations:
|
||||||
|
|
||||||
|
%{?scl:scl enable %scl - << \EOF}
|
||||||
%if 0%{?with_debug_build}
|
%if 0%{?with_debug_build}
|
||||||
BuildPython debug \
|
BuildPython debug \
|
||||||
python-debug \
|
python-debug \
|
||||||
@ -1092,6 +1120,7 @@ BuildPython optimized \
|
|||||||
python%{pybasever} \
|
python%{pybasever} \
|
||||||
"--without-ensurepip" \
|
"--without-ensurepip" \
|
||||||
true
|
true
|
||||||
|
%{?scl:EOF}
|
||||||
|
|
||||||
# ======================================================
|
# ======================================================
|
||||||
# Installing the built code:
|
# Installing the built code:
|
||||||
@ -1102,6 +1131,11 @@ topdir=$(pwd)
|
|||||||
rm -fr %{buildroot}
|
rm -fr %{buildroot}
|
||||||
mkdir -p %{buildroot}%{_prefix} %{buildroot}%{_mandir}
|
mkdir -p %{buildroot}%{_prefix} %{buildroot}%{_mandir}
|
||||||
|
|
||||||
|
# install SCL custom RPM scripts
|
||||||
|
%{?scl:mkdir -p %{buildroot}%{_root_prefix}/lib/rpm/redhat}
|
||||||
|
%{?scl:cp -a %{SOURCE9} %{buildroot}%{_root_prefix}/lib/rpm}
|
||||||
|
%{?scl:cp -a %{SOURCE10} %{buildroot}%{_root_prefix}/lib/rpm/redhat}
|
||||||
|
|
||||||
InstallPython() {
|
InstallPython() {
|
||||||
|
|
||||||
ConfName=$1
|
ConfName=$1
|
||||||
@ -1142,7 +1176,7 @@ make install DESTDIR=%{buildroot} INSTALL="install -p"
|
|||||||
# but doing so generated noise when ldconfig was rerun (rhbz:562980)
|
# but doing so generated noise when ldconfig was rerun (rhbz:562980)
|
||||||
#
|
#
|
||||||
%if 0%{?with_gdb_hooks}
|
%if 0%{?with_gdb_hooks}
|
||||||
DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir}
|
DirHoldingGdbPy=%{?scl:%_root_prefix}%{!?scl:%_prefix}/lib/debug/%{_libdir}
|
||||||
PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName.debug-gdb.py
|
PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName.debug-gdb.py
|
||||||
|
|
||||||
mkdir -p %{buildroot}$DirHoldingGdbPy
|
mkdir -p %{buildroot}$DirHoldingGdbPy
|
||||||
@ -1187,7 +1221,7 @@ cp -ar Tools/demo %{buildroot}%{pylibdir}/Tools/
|
|||||||
rm -f %{buildroot}%{pylibdir}/email/test/data/audiotest.au %{buildroot}%{pylibdir}/test/audiotest.au
|
rm -f %{buildroot}%{pylibdir}/email/test/data/audiotest.au %{buildroot}%{pylibdir}/test/audiotest.au
|
||||||
|
|
||||||
%if "%{_lib}" == "lib64"
|
%if "%{_lib}" == "lib64"
|
||||||
install -d -m 0755 %{buildroot}/usr/lib/python%{pybasever}/site-packages/__pycache__
|
install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Make python3-devel multilib-ready (bug #192747, #139911)
|
# Make python3-devel multilib-ready (bug #192747, #139911)
|
||||||
@ -1311,9 +1345,15 @@ find %{buildroot} \
|
|||||||
-perm 555 -exec chmod 755 {} \;
|
-perm 555 -exec chmod 755 {} \;
|
||||||
|
|
||||||
# Install macros for rpm:
|
# Install macros for rpm:
|
||||||
mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d/
|
mkdir -p %{buildroot}/%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm
|
||||||
install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d/
|
install -m 644 %{SOURCE2} %{buildroot}/%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm
|
||||||
install -m 644 %{SOURCE3} %{buildroot}/%{_rpmconfigdir}/macros.d/
|
install -m 644 %{SOURCE3} %{buildroot}/%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm
|
||||||
|
# Optionally rename macro files by appending scl name
|
||||||
|
pushd %{buildroot}/%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}
|
||||||
|
find -type f -name 'macros.py*' -exec mv {} {}%{?scl:.%{scl}} \;
|
||||||
|
popd
|
||||||
|
%{?scl:sed -i 's|^\(%@scl@__python3\)|\1 %{_bindir}/python3|' %{buildroot}%{_root_sysconfdir}/rpm/macros.python3.%{scl}}
|
||||||
|
%{?scl:sed -i 's|@scl@|%{scl}|g' %{buildroot}%{_root_sysconfdir}/rpm/macros.python3.%{scl}}
|
||||||
|
|
||||||
# Ensure that the curses module was linked against libncursesw.so, rather than
|
# Ensure that the curses module was linked against libncursesw.so, rather than
|
||||||
# libncurses.so (bug 539917)
|
# libncurses.so (bug 539917)
|
||||||
@ -1387,6 +1427,11 @@ echo '[ $? -eq 127 ] && echo "Could not find python%{LDVERSION_optimized}-`uname
|
|||||||
%{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
|
%{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
|
||||||
chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
|
chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
|
||||||
|
|
||||||
|
%if 0%{?scl:1}
|
||||||
|
ln -s python3 %{buildroot}%{_bindir}/python
|
||||||
|
%endif # scl
|
||||||
|
|
||||||
|
|
||||||
# ======================================================
|
# ======================================================
|
||||||
# Running the upstream test suite
|
# Running the upstream test suite
|
||||||
# ======================================================
|
# ======================================================
|
||||||
@ -1400,7 +1445,7 @@ find %{buildroot} -type f -a -name "*.py" -print0 | \
|
|||||||
xargs -0 %{buildroot}%{_bindir}/python%{pybasever} %{SOURCE8}
|
xargs -0 %{buildroot}%{_bindir}/python%{pybasever} %{SOURCE8}
|
||||||
|
|
||||||
|
|
||||||
topdir=$(pwd)
|
export topdir=$(pwd)
|
||||||
CheckPython() {
|
CheckPython() {
|
||||||
ConfName=$1
|
ConfName=$1
|
||||||
ConfDir=$(pwd)/build/$ConfName
|
ConfDir=$(pwd)/build/$ConfName
|
||||||
@ -1426,14 +1471,17 @@ CheckPython() {
|
|||||||
echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
|
echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
|
||||||
|
|
||||||
}
|
}
|
||||||
|
export -f CheckPython
|
||||||
|
|
||||||
%if 0%{run_selftest_suite}
|
%if 0%{run_selftest_suite}
|
||||||
|
|
||||||
|
%{?scl:scl enable %scl - << \EOF}
|
||||||
# Check each of the configurations:
|
# Check each of the configurations:
|
||||||
%if 0%{?with_debug_build}
|
%if 0%{?with_debug_build}
|
||||||
CheckPython debug
|
CheckPython debug
|
||||||
%endif # with_debug_build
|
%endif # with_debug_build
|
||||||
CheckPython optimized
|
CheckPython optimized
|
||||||
|
%{?scl:EOF}
|
||||||
|
|
||||||
%endif # run_selftest_suite
|
%endif # run_selftest_suite
|
||||||
|
|
||||||
@ -1459,11 +1507,13 @@ rm -fr %{buildroot}
|
|||||||
%files
|
%files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%doc LICENSE README
|
%doc LICENSE README
|
||||||
%{_bindir}/pydoc*
|
%{_bindir}/pydoc3
|
||||||
%{_bindir}/python3
|
%{_bindir}/python3
|
||||||
|
%{?scl:%{_bindir}/python}
|
||||||
|
%{_bindir}/pyvenv
|
||||||
|
%{_bindir}/pydoc%{pybasever}
|
||||||
%{_bindir}/python%{pybasever}
|
%{_bindir}/python%{pybasever}
|
||||||
%{_bindir}/python%{pybasever}m
|
%{_bindir}/python%{pybasever}m
|
||||||
%{_bindir}/pyvenv
|
|
||||||
%{_bindir}/pyvenv-%{pybasever}
|
%{_bindir}/pyvenv-%{pybasever}
|
||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
|
||||||
@ -1671,12 +1721,16 @@ rm -fr %{buildroot}
|
|||||||
%{_libdir}/%{py_INSTSONAME_optimized}
|
%{_libdir}/%{py_INSTSONAME_optimized}
|
||||||
%{_libdir}/libpython3.so
|
%{_libdir}/libpython3.so
|
||||||
%if 0%{?with_systemtap}
|
%if 0%{?with_systemtap}
|
||||||
|
%{?scl:%dir %{_datadir}/systemtap}
|
||||||
|
%{?scl:%dir %{tapsetdir}}
|
||||||
%{tapsetdir}/%{libpython_stp_optimized}
|
%{tapsetdir}/%{libpython_stp_optimized}
|
||||||
%doc systemtap-example.stp pyfuntop.stp
|
%doc systemtap-example.stp pyfuntop.stp
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
%{?scl:%{_root_prefix}/lib/rpm/pythondeps-scl-%{pyshortver}.sh}
|
||||||
|
%{?scl:%{_root_prefix}/lib/rpm/redhat/brp-python-bytecompile-with-scl-python-%{pyshortver}}
|
||||||
%{pylibdir}/config-%{LDVERSION_optimized}/*
|
%{pylibdir}/config-%{LDVERSION_optimized}/*
|
||||||
%exclude %{pylibdir}/config-%{LDVERSION_optimized}/Makefile
|
%exclude %{pylibdir}/config-%{LDVERSION_optimized}/Makefile
|
||||||
%{_includedir}/python%{LDVERSION_optimized}/*.h
|
%{_includedir}/python%{LDVERSION_optimized}/*.h
|
||||||
@ -1687,17 +1741,19 @@ rm -fr %{buildroot}
|
|||||||
%{_bindir}/python%{LDVERSION_optimized}-config
|
%{_bindir}/python%{LDVERSION_optimized}-config
|
||||||
%{_bindir}/python%{LDVERSION_optimized}-*-config
|
%{_bindir}/python%{LDVERSION_optimized}-*-config
|
||||||
%{_libdir}/libpython%{LDVERSION_optimized}.so
|
%{_libdir}/libpython%{LDVERSION_optimized}.so
|
||||||
|
%{?scl:%dir %{_libdir}/pkgconfig}
|
||||||
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
|
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
|
||||||
%{_libdir}/pkgconfig/python-%{pybasever}.pc
|
%{_libdir}/pkgconfig/python-%{pybasever}.pc
|
||||||
%{_libdir}/pkgconfig/python3.pc
|
%{_libdir}/pkgconfig/python3.pc
|
||||||
%{_rpmconfigdir}/macros.d/macros.python3
|
%config(noreplace) %{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm/macros.python3%{?scl:.%{scl}}
|
||||||
%{_rpmconfigdir}/macros.d/macros.pybytecompile
|
%config(noreplace) %{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm/macros.pybytecompile%{?scl:.%{scl}}
|
||||||
|
|
||||||
%files tools
|
%files tools
|
||||||
%defattr(-,root,root,755)
|
%defattr(-,root,root,755)
|
||||||
|
%{_bindir}/idle3
|
||||||
%{_bindir}/python3-2to3
|
%{_bindir}/python3-2to3
|
||||||
%{_bindir}/2to3-%{pybasever}
|
%{_bindir}/2to3-%{pybasever}
|
||||||
%{_bindir}/idle*
|
%{_bindir}/idle%{pybasever}
|
||||||
%{pylibdir}/Tools
|
%{pylibdir}/Tools
|
||||||
%doc %{pylibdir}/Doc
|
%doc %{pylibdir}/Doc
|
||||||
|
|
||||||
@ -1853,6 +1909,52 @@ rm -fr %{buildroot}
|
|||||||
# ======================================================
|
# ======================================================
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 03 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.15.20140703hg1492a42b8308
|
||||||
|
- Update to hg: 1492a42b8308
|
||||||
|
|
||||||
|
* Wed Jul 02 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.14.20140702hg438da6ae38fa
|
||||||
|
- Update to hg: 438da6ae38fa
|
||||||
|
|
||||||
|
* Tue Jul 01 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.13.20140701hg2e0a98178c07
|
||||||
|
- Update to hg: 2e0a98178c07
|
||||||
|
|
||||||
|
* Tue Jul 01 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.12.20140701hg669b43bffd87
|
||||||
|
- Update to hg: 669b43bffd87
|
||||||
|
|
||||||
|
* Mon Jun 30 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.11.20140630hg2d0fa8f383c8
|
||||||
|
- Update to hg: 2d0fa8f383c8
|
||||||
|
|
||||||
|
* Mon Jun 30 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.10.20140630hg3b5279b5bfd1
|
||||||
|
- Update to hg: 3b5279b5bfd1
|
||||||
|
|
||||||
|
* Sun Jun 29 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.9.20140629hg394e6bda5a70
|
||||||
|
- Update to hg: 394e6bda5a70
|
||||||
|
|
||||||
|
* Sun Jun 29 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.8.20140629hg54f94e753269
|
||||||
|
- Update to hg: 54f94e753269
|
||||||
|
|
||||||
|
* Sat Jun 28 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.7.20140628hg6dd4c2d30b0e
|
||||||
|
- Update to hg: 6dd4c2d30b0e
|
||||||
|
|
||||||
|
* Sat Jun 28 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.6.20140628hg8552f3031753
|
||||||
|
- Update to hg: 8552f3031753
|
||||||
|
|
||||||
|
* Sat Jun 28 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.5.20140628hg26287c059304
|
||||||
|
- Update to hg: 26287c059304
|
||||||
|
|
||||||
|
* Fri Jun 27 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.4.20140626hg3151f6f9df85
|
||||||
|
- Bootstrapping
|
||||||
|
|
||||||
|
* Thu Jun 26 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.3.20140626hg3151f6f9df85
|
||||||
|
- Update to hg: 3151f6f9df85
|
||||||
|
|
||||||
|
* Wed Jun 25 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.2.20140625hgb4130b2f7748
|
||||||
|
- Update to hg: b4130b2f7748
|
||||||
|
|
||||||
|
* Wed Jun 18 2014 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-0.1.20140618hg1e74350dd056
|
||||||
|
- Update to hg: 1e74350dd0561
|
||||||
|
- Use SCL
|
||||||
|
|
||||||
* Sun Jun 8 2014 Peter Robinson <pbrobinson@fedoraproject.org> 3.4.1-12
|
* Sun Jun 8 2014 Peter Robinson <pbrobinson@fedoraproject.org> 3.4.1-12
|
||||||
- aarch64 has valgrind, just list those that don't support it
|
- aarch64 has valgrind, just list those that don't support it
|
||||||
|
|
||||||
|
45
pythondeps-scl-35.sh
Executable file
45
pythondeps-scl-35.sh
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Altered from pythondeps.sh
|
||||||
|
# The second parameter is %{scl_prefix}, which is used to prefix python(abi).
|
||||||
|
|
||||||
|
[ $# -ge 1 ] || {
|
||||||
|
cat > /dev/null
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
-P|--provides)
|
||||||
|
shift
|
||||||
|
# Match buildroot/payload paths of the form
|
||||||
|
# /PATH/OF/BUILDROOT/%{_scl_root}/usr/bin/pythonMAJOR.MINOR
|
||||||
|
# generating a line of the form
|
||||||
|
# %{scl_prefix}python(abi) = MAJOR.MINOR
|
||||||
|
# (Don't match against -config tools e.g. /usr/bin/python2.6-config)
|
||||||
|
if [ "x$1" = "x" ]; then
|
||||||
|
grep "/usr/bin/python.\..$" \
|
||||||
|
| sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|"
|
||||||
|
else
|
||||||
|
grep "/opt/.*/usr/bin/python.\..$" \
|
||||||
|
| sed -e "s|.*/usr/bin/python\(.\..\)|$1python(abi) = \1|"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
-R|--requires)
|
||||||
|
shift
|
||||||
|
# Match buildroot paths of the form
|
||||||
|
# /PATH/OF/BUILDROOT/%{scl_root}/usr/lib/pythonMAJOR.MINOR/ and
|
||||||
|
# /PATH/OF/BUILDROOT/%{scl_root}/usr/lib64/pythonMAJOR.MINOR/
|
||||||
|
# generating (uniqely) lines of the form:
|
||||||
|
# %{scl_prefix}python(abi) = MAJOR.MINOR
|
||||||
|
if [ "x$1" = "x" ]; then
|
||||||
|
grep "/usr/lib[^/]*/python.\../.*" \
|
||||||
|
| sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \
|
||||||
|
| sort | uniq
|
||||||
|
else
|
||||||
|
grep "/opt/.*/usr/lib[^/]*/python.\../.*" \
|
||||||
|
| sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|$1python(abi) = \1|g" \
|
||||||
|
| sort | uniq
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user