Compare commits
18 Commits
fb39860846
...
ef338dc7d0
Author | SHA1 | Date |
---|---|---|
Victor Stinner | ef338dc7d0 | |
Miro Hrončok | a5e818f217 | |
Miro Hrončok | 5d0f9111df | |
Charalampos Stratakis | 75a0703066 | |
Miro Hrončok | b13073ac76 | |
Igor Gnatenko | 789267ab76 | |
Fedora Release Engineering | ef2a83ef76 | |
Igor Gnatenko | 1d7cbe3b6c | |
Björn Esser | 284b905a2e | |
Miro Hrončok | 44b757bc09 | |
Miro Hrončok | ebba43dec3 | |
Miro Hrončok | 0dfe62335c | |
Petr Viktorin | 0052c9fa9d | |
Miro Hrončok | ae09a79125 | |
Miro Hrončok | e8ef86e1cf | |
Miro Hrončok | 4d74b7c9bf | |
Miro Hrončok | d60e5a4fc9 | |
Miro Hrončok | 8b06c12ed7 |
|
@ -20,10 +20,10 @@ index b9f1c6c..7b23714 100644
|
||||||
'scripts': '$base/bin',
|
'scripts': '$base/bin',
|
||||||
'data' : '$base',
|
'data' : '$base',
|
||||||
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
||||||
index 068d1ba..3e7f077 100644
|
index 031f809..ec5d584 100644
|
||||||
--- a/Lib/distutils/sysconfig.py
|
--- a/Lib/distutils/sysconfig.py
|
||||||
+++ b/Lib/distutils/sysconfig.py
|
+++ b/Lib/distutils/sysconfig.py
|
||||||
@@ -119,8 +119,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
@@ -120,8 +120,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":
|
||||||
|
@ -59,10 +59,10 @@ index c360802..868b7cb 100644
|
||||||
return sitepackages
|
return sitepackages
|
||||||
|
|
||||||
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
|
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
|
||||||
index d9a9324..e411e5c 100644
|
index b4384ee..349f688 100644
|
||||||
--- a/Lib/test/test_site.py
|
--- a/Lib/test/test_site.py
|
||||||
+++ b/Lib/test/test_site.py
|
+++ b/Lib/test/test_site.py
|
||||||
@@ -235,17 +235,20 @@ class HelperFunctionsTests(unittest.TestCase):
|
@@ -254,17 +254,20 @@ class HelperFunctionsTests(unittest.TestCase):
|
||||||
self.assertEqual(dirs[0], wanted)
|
self.assertEqual(dirs[0], wanted)
|
||||||
elif os.sep == '/':
|
elif os.sep == '/':
|
||||||
# OS X, Linux, FreeBSD, etc
|
# OS X, Linux, FreeBSD, etc
|
||||||
|
@ -86,12 +86,12 @@ index d9a9324..e411e5c 100644
|
||||||
+ wanted = os.path.join('xoxo', 'lib64', 'site-packages')
|
+ wanted = os.path.join('xoxo', 'lib64', 'site-packages')
|
||||||
self.assertEqual(dirs[1], wanted)
|
self.assertEqual(dirs[1], wanted)
|
||||||
|
|
||||||
class PthFile(object):
|
def test_no_home_directory(self):
|
||||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||||
index adae76b..ecb27f3 100644
|
index 4f59dd3..877698c 100644
|
||||||
--- a/Makefile.pre.in
|
--- a/Makefile.pre.in
|
||||||
+++ b/Makefile.pre.in
|
+++ b/Makefile.pre.in
|
||||||
@@ -111,7 +111,7 @@ LIBDIR= @libdir@
|
@@ -110,7 +110,7 @@ LIBDIR= @libdir@
|
||||||
MANDIR= @mandir@
|
MANDIR= @mandir@
|
||||||
INCLUDEDIR= @includedir@
|
INCLUDEDIR= @includedir@
|
||||||
CONFINCLUDEDIR= $(exec_prefix)/include
|
CONFINCLUDEDIR= $(exec_prefix)/include
|
||||||
|
@ -101,10 +101,10 @@ index adae76b..ecb27f3 100644
|
||||||
# Detailed destination directories
|
# Detailed destination directories
|
||||||
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
||||||
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
|
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
|
||||||
index fbfa1c1..138fb33 100644
|
index 2cf35a9..c4c88cb 100644
|
||||||
--- a/Modules/Setup.dist
|
--- a/Modules/Setup.dist
|
||||||
+++ b/Modules/Setup.dist
|
+++ b/Modules/Setup.dist
|
||||||
@@ -231,7 +231,7 @@
|
@@ -231,7 +231,7 @@ crypt cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems
|
||||||
# Some more UNIX dependent modules -- off by default, since these
|
# Some more UNIX dependent modules -- off by default, since these
|
||||||
# are not supported by all UNIX systems:
|
# are not supported by all UNIX systems:
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ index fbfa1c1..138fb33 100644
|
||||||
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
|
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
|
||||||
|
|
||||||
# Interface to the Expat XML parser
|
# Interface to the Expat XML parser
|
||||||
#
|
# More information on Expat can be found at www.libexpat.org.
|
||||||
diff --git a/Modules/getpath.c b/Modules/getpath.c
|
diff --git a/Modules/getpath.c b/Modules/getpath.c
|
||||||
index fd33a01..c5c86fd 100644
|
index fd33a01..c5c86fd 100644
|
||||||
--- a/Modules/getpath.c
|
--- a/Modules/getpath.c
|
||||||
|
@ -154,7 +154,7 @@ index fd33a01..c5c86fd 100644
|
||||||
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
|
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
|
||||||
|
|
||||||
diff --git a/setup.py b/setup.py
|
diff --git a/setup.py b/setup.py
|
||||||
index 99ac359..859b6c4 100644
|
index 0288a6b..7905f6f 100644
|
||||||
--- a/setup.py
|
--- a/setup.py
|
||||||
+++ b/setup.py
|
+++ b/setup.py
|
||||||
@@ -456,7 +456,7 @@ class PyBuildExt(build_ext):
|
@@ -456,7 +456,7 @@ class PyBuildExt(build_ext):
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- Python-2.7.5-orig/Tools/gdb/libpython.py 2013-05-12 03:32:54.000000000 +0000
|
|
||||||
+++ Python-2.7.5-orig/Tools/gdb/libpython.py 2013-09-15 09:56:25.494000000 +0000
|
|
||||||
@@ -887,6 +887,8 @@
|
|
||||||
newline character'''
|
|
||||||
if self.is_optimized_out():
|
|
||||||
return '(frame information optimized out)'
|
|
||||||
+ if self.filename() == '<string>':
|
|
||||||
+ return '(in an eval block)'
|
|
||||||
filename = self.filename()
|
|
||||||
try:
|
|
||||||
f = open(filename, 'r')
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
|
||||||
|
index 5021ebf..1903cc0 100644
|
||||||
|
--- a/Lib/ensurepip/__init__.py
|
||||||
|
+++ b/Lib/ensurepip/__init__.py
|
||||||
|
@@ -1,9 +1,10 @@
|
||||||
|
#!/usr/bin/env python2
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
+import distutils.version
|
||||||
|
+import glob
|
||||||
|
import os
|
||||||
|
import os.path
|
||||||
|
-import pkgutil
|
||||||
|
import shutil
|
||||||
|
import sys
|
||||||
|
import tempfile
|
||||||
|
@@ -12,9 +13,19 @@ import tempfile
|
||||||
|
__all__ = ["version", "bootstrap"]
|
||||||
|
|
||||||
|
|
||||||
|
-_SETUPTOOLS_VERSION = "40.6.2"
|
||||||
|
+_WHEEL_DIR = "/usr/share/python-wheels/"
|
||||||
|
|
||||||
|
-_PIP_VERSION = "18.1"
|
||||||
|
+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),
|
||||||
|
@@ -28,8 +39,13 @@ def _run_pip(args, additional_paths=None):
|
||||||
|
sys.path = additional_paths + sys.path
|
||||||
|
|
||||||
|
# Install the bundled software
|
||||||
|
- import pip._internal
|
||||||
|
- return pip._internal.main(args)
|
||||||
|
+ try:
|
||||||
|
+ # pip 10
|
||||||
|
+ from pip._internal import main
|
||||||
|
+ except ImportError:
|
||||||
|
+ # pip 9
|
||||||
|
+ from pip import main
|
||||||
|
+ return main(args)
|
||||||
|
|
||||||
|
|
||||||
|
def version():
|
||||||
|
@@ -100,12 +116,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))
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py
|
||||||
|
index 9def56e..c0df208 100755
|
||||||
|
--- a/Tools/gdb/libpython.py
|
||||||
|
+++ b/Tools/gdb/libpython.py
|
||||||
|
@@ -939,6 +939,9 @@ class PyFrameObjectPtr(PyObjectPtr):
|
||||||
|
if self.is_optimized_out():
|
||||||
|
return '(frame information optimized out)'
|
||||||
|
|
||||||
|
+ if self.filename() == '<string>':
|
||||||
|
+ return '(in an eval block)'
|
||||||
|
+
|
||||||
|
lineno = self.current_line_num()
|
||||||
|
if lineno is None:
|
||||||
|
return '(failed to get frame line number)'
|
|
@ -1,249 +0,0 @@
|
||||||
diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
|
|
||||||
index 89ed1ef..e2a4c25 100644
|
|
||||||
--- a/Lib/ensurepip/__init__.py
|
|
||||||
+++ b/Lib/ensurepip/__init__.py
|
|
||||||
@@ -7,6 +7,7 @@ import pkgutil
|
|
||||||
import shutil
|
|
||||||
import sys
|
|
||||||
import tempfile
|
|
||||||
+from ensurepip import rewheel
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ["version", "bootstrap"]
|
|
||||||
@@ -29,6 +30,8 @@ def _run_pip(args, additional_paths=None):
|
|
||||||
|
|
||||||
# Install the bundled software
|
|
||||||
import pip
|
|
||||||
+ if args[0] in ["install", "list", "wheel"]:
|
|
||||||
+ args.append('--pre')
|
|
||||||
return pip.main(args)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -93,21 +96,40 @@ def _bootstrap(root=None, upgrade=False, user=False,
|
|
||||||
# omit pip and easy_install
|
|
||||||
os.environ["ENSUREPIP_OPTIONS"] = "install"
|
|
||||||
|
|
||||||
+ whls = []
|
|
||||||
+ rewheel_dir = None
|
|
||||||
+ # try to see if we have system-wide versions of _PROJECTS
|
|
||||||
+ dep_records = rewheel.find_system_records([p[0] for p in _PROJECTS])
|
|
||||||
+ # TODO: check if system-wide versions are the newest ones
|
|
||||||
+ # if --upgrade is used?
|
|
||||||
+ if all(dep_records):
|
|
||||||
+ # if we have all _PROJECTS installed system-wide, we'll recreate
|
|
||||||
+ # wheels from them and install those
|
|
||||||
+ rewheel_dir = tempfile.mkdtemp()
|
|
||||||
+ for dr in dep_records:
|
|
||||||
+ new_whl = rewheel.rewheel_from_record(dr, rewheel_dir)
|
|
||||||
+ whls.append(os.path.join(rewheel_dir, new_whl))
|
|
||||||
+ else:
|
|
||||||
+ # if we don't have all the _PROJECTS installed system-wide,
|
|
||||||
+ # let's just fall back to bundled wheels
|
|
||||||
+ for project, version in _PROJECTS:
|
|
||||||
+ whl = os.path.join(
|
|
||||||
+ os.path.dirname(__file__),
|
|
||||||
+ "_bundled",
|
|
||||||
+ "{}-{}-py2.py3-none-any.whl".format(project, version)
|
|
||||||
+ )
|
|
||||||
+ whls.append(whl)
|
|
||||||
+
|
|
||||||
tmpdir = tempfile.mkdtemp()
|
|
||||||
try:
|
|
||||||
# Put our bundled wheels into a temporary directory and construct the
|
|
||||||
# additional paths that need added to sys.path
|
|
||||||
additional_paths = []
|
|
||||||
- for project, version in _PROJECTS:
|
|
||||||
- wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version)
|
|
||||||
- whl = pkgutil.get_data(
|
|
||||||
- "ensurepip",
|
|
||||||
- "_bundled/{}".format(wheel_name),
|
|
||||||
- )
|
|
||||||
- with open(os.path.join(tmpdir, wheel_name), "wb") as fp:
|
|
||||||
- fp.write(whl)
|
|
||||||
-
|
|
||||||
- additional_paths.append(os.path.join(tmpdir, wheel_name))
|
|
||||||
+ for whl in whls:
|
|
||||||
+ shutil.copy(whl, tmpdir)
|
|
||||||
+ additional_paths.append(os.path.join(tmpdir, os.path.basename(whl)))
|
|
||||||
+ if rewheel_dir:
|
|
||||||
+ shutil.rmtree(rewheel_dir)
|
|
||||||
|
|
||||||
# Construct the arguments to be passed to the pip command
|
|
||||||
args = ["install", "--no-index", "--find-links", tmpdir]
|
|
||||||
diff --git a/Lib/ensurepip/rewheel/__init__.py b/Lib/ensurepip/rewheel/__init__.py
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..75c2094
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/Lib/ensurepip/rewheel/__init__.py
|
|
||||||
@@ -0,0 +1,158 @@
|
|
||||||
+import argparse
|
|
||||||
+import codecs
|
|
||||||
+import csv
|
|
||||||
+import email.parser
|
|
||||||
+import os
|
|
||||||
+import io
|
|
||||||
+import re
|
|
||||||
+import site
|
|
||||||
+import subprocess
|
|
||||||
+import sys
|
|
||||||
+import zipfile
|
|
||||||
+
|
|
||||||
+def run():
|
|
||||||
+ parser = argparse.ArgumentParser(description='Recreate wheel of package with given RECORD.')
|
|
||||||
+ parser.add_argument('record_path',
|
|
||||||
+ help='Path to RECORD file')
|
|
||||||
+ parser.add_argument('-o', '--output-dir',
|
|
||||||
+ help='Dir where to place the wheel, defaults to current working dir.',
|
|
||||||
+ dest='outdir',
|
|
||||||
+ default=os.path.curdir)
|
|
||||||
+
|
|
||||||
+ ns = parser.parse_args()
|
|
||||||
+ retcode = 0
|
|
||||||
+ try:
|
|
||||||
+ print(rewheel_from_record(**vars(ns)))
|
|
||||||
+ except BaseException as e:
|
|
||||||
+ print('Failed: {}'.format(e))
|
|
||||||
+ retcode = 1
|
|
||||||
+ sys.exit(1)
|
|
||||||
+
|
|
||||||
+def find_system_records(projects):
|
|
||||||
+ """Return list of paths to RECORD files for system-installed projects.
|
|
||||||
+
|
|
||||||
+ If a project is not installed, the resulting list contains None instead
|
|
||||||
+ of a path to its RECORD
|
|
||||||
+ """
|
|
||||||
+ records = []
|
|
||||||
+ # get system site-packages dirs
|
|
||||||
+ if hasattr(sys, 'real_prefix'):
|
|
||||||
+ #we are in python2 virtualenv and sys.real_prefix is the original sys.prefix
|
|
||||||
+ _orig_prefixes = site.PREFIXES
|
|
||||||
+ setattr(site, 'PREFIXES', [sys.real_prefix]*2)
|
|
||||||
+ sys_sitepack = site.getsitepackages()
|
|
||||||
+ setattr(site, 'PREFIXES', _orig_prefixes)
|
|
||||||
+ elif hasattr(sys, 'base_prefix'): # python3 venv doesn't inject real_prefix to sys
|
|
||||||
+ # we are on python3 and base(_exec)_prefix is unchanged in venv
|
|
||||||
+ sys_sitepack = site.getsitepackages([sys.base_prefix, sys.base_exec_prefix])
|
|
||||||
+ else:
|
|
||||||
+ # we are in python2 without virtualenv
|
|
||||||
+ sys_sitepack = site.getsitepackages()
|
|
||||||
+
|
|
||||||
+ sys_sitepack = [sp for sp in sys_sitepack if os.path.exists(sp)]
|
|
||||||
+ # try to find all projects in all system site-packages
|
|
||||||
+ for project in projects:
|
|
||||||
+ path = None
|
|
||||||
+ for sp in sys_sitepack:
|
|
||||||
+ dist_info_re = os.path.join(sp, project) + '-[^\{0}]+\.dist-info'.format(os.sep)
|
|
||||||
+ candidates = [os.path.join(sp, p) for p in os.listdir(sp)]
|
|
||||||
+ # filter out candidate dirs based on the above regexp
|
|
||||||
+ filtered = [c for c in candidates if re.match(dist_info_re, c)]
|
|
||||||
+ # if we have 0 or 2 or more dirs, something is wrong...
|
|
||||||
+ if len(filtered) == 1:
|
|
||||||
+ path = filtered[0]
|
|
||||||
+ if path is not None:
|
|
||||||
+ records.append(os.path.join(path, 'RECORD'))
|
|
||||||
+ else:
|
|
||||||
+ records.append(None)
|
|
||||||
+ return records
|
|
||||||
+
|
|
||||||
+def rewheel_from_record(record_path, outdir):
|
|
||||||
+ """Recreates a whee of package with given record_path and returns path
|
|
||||||
+ to the newly created wheel."""
|
|
||||||
+ site_dir = os.path.dirname(os.path.dirname(record_path))
|
|
||||||
+ record_relpath = record_path[len(site_dir):].strip(os.path.sep)
|
|
||||||
+ to_write, to_omit = get_records_to_pack(site_dir, record_relpath)
|
|
||||||
+ new_wheel_name = get_wheel_name(record_path)
|
|
||||||
+ new_wheel_path = os.path.join(outdir, new_wheel_name + '.whl')
|
|
||||||
+
|
|
||||||
+ new_wheel = zipfile.ZipFile(new_wheel_path, mode='w', compression=zipfile.ZIP_DEFLATED)
|
|
||||||
+ # we need to write a new record with just the files that we will write,
|
|
||||||
+ # e.g. not binaries and *.pyc/*.pyo files
|
|
||||||
+ if sys.version_info[0] < 3:
|
|
||||||
+ new_record = io.BytesIO()
|
|
||||||
+ else:
|
|
||||||
+ new_record = io.StringIO()
|
|
||||||
+ writer = csv.writer(new_record)
|
|
||||||
+
|
|
||||||
+ # handle files that we can write straight away
|
|
||||||
+ for f, sha_hash, size in to_write:
|
|
||||||
+ new_wheel.write(os.path.join(site_dir, f), arcname=f)
|
|
||||||
+ writer.writerow([f, sha_hash,size])
|
|
||||||
+
|
|
||||||
+ # rewrite the old wheel file with a new computed one
|
|
||||||
+ writer.writerow([record_relpath, '', ''])
|
|
||||||
+ new_wheel.writestr(record_relpath, new_record.getvalue())
|
|
||||||
+
|
|
||||||
+ new_wheel.close()
|
|
||||||
+
|
|
||||||
+ return new_wheel.filename
|
|
||||||
+
|
|
||||||
+def get_wheel_name(record_path):
|
|
||||||
+ """Return proper name of the wheel, without .whl."""
|
|
||||||
+
|
|
||||||
+ wheel_info_path = os.path.join(os.path.dirname(record_path), 'WHEEL')
|
|
||||||
+ with codecs.open(wheel_info_path, encoding='utf-8') as wheel_info_file:
|
|
||||||
+ wheel_info = email.parser.Parser().parsestr(wheel_info_file.read().encode('utf-8'))
|
|
||||||
+
|
|
||||||
+ metadata_path = os.path.join(os.path.dirname(record_path), 'METADATA')
|
|
||||||
+ with codecs.open(metadata_path, encoding='utf-8') as metadata_file:
|
|
||||||
+ metadata = email.parser.Parser().parsestr(metadata_file.read().encode('utf-8'))
|
|
||||||
+
|
|
||||||
+ # construct name parts according to wheel spec
|
|
||||||
+ distribution = metadata.get('Name')
|
|
||||||
+ version = metadata.get('Version')
|
|
||||||
+ build_tag = '' # nothing for now
|
|
||||||
+ lang_tag = []
|
|
||||||
+ for t in wheel_info.get_all('Tag'):
|
|
||||||
+ lang_tag.append(t.split('-')[0])
|
|
||||||
+ lang_tag = '.'.join(lang_tag)
|
|
||||||
+ abi_tag, plat_tag = wheel_info.get('Tag').split('-')[1:3]
|
|
||||||
+ # leave out build tag, if it is empty
|
|
||||||
+ to_join = filter(None, [distribution, version, build_tag, lang_tag, abi_tag, plat_tag])
|
|
||||||
+ return '-'.join(list(to_join))
|
|
||||||
+
|
|
||||||
+def get_records_to_pack(site_dir, record_relpath):
|
|
||||||
+ """Accepts path of sitedir and path of RECORD file relative to it.
|
|
||||||
+ Returns two lists:
|
|
||||||
+ - list of files that can be written to new RECORD straight away
|
|
||||||
+ - list of files that shouldn't be written or need some processing
|
|
||||||
+ (pyc and pyo files, scripts)
|
|
||||||
+ """
|
|
||||||
+ record_file_path = os.path.join(site_dir, record_relpath)
|
|
||||||
+ with codecs.open(record_file_path, encoding='utf-8') as record_file:
|
|
||||||
+ record_contents = record_file.read()
|
|
||||||
+ # temporary fix for https://github.com/pypa/pip/issues/1376
|
|
||||||
+ # we need to ignore files under ".data" directory
|
|
||||||
+ data_dir = os.path.dirname(record_relpath).strip(os.path.sep)
|
|
||||||
+ data_dir = data_dir[:-len('dist-info')] + 'data'
|
|
||||||
+
|
|
||||||
+ to_write = []
|
|
||||||
+ to_omit = []
|
|
||||||
+ for l in record_contents.splitlines():
|
|
||||||
+ spl = l.split(',')
|
|
||||||
+ if len(spl) == 3:
|
|
||||||
+ # new record will omit (or write differently):
|
|
||||||
+ # - abs paths, paths with ".." (entry points),
|
|
||||||
+ # - pyc+pyo files
|
|
||||||
+ # - the old RECORD file
|
|
||||||
+ # TODO: is there any better way to recognize an entry point?
|
|
||||||
+ if os.path.isabs(spl[0]) or spl[0].startswith('..') or \
|
|
||||||
+ spl[0].endswith('.pyc') or spl[0].endswith('.pyo') or \
|
|
||||||
+ spl[0] == record_relpath or spl[0].startswith(data_dir):
|
|
||||||
+ to_omit.append(spl)
|
|
||||||
+ else:
|
|
||||||
+ to_write.append(spl)
|
|
||||||
+ else:
|
|
||||||
+ pass # bad RECORD or empty line
|
|
||||||
+ return to_write, to_omit
|
|
||||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
|
||||||
index 877698c..2c43611 100644
|
|
||||||
--- a/Makefile.pre.in
|
|
||||||
+++ b/Makefile.pre.in
|
|
||||||
@@ -1065,7 +1065,7 @@ LIBSUBDIRS= lib-tk lib-tk/test lib-tk/test/test_tkinter \
|
|
||||||
test/tracedmodules \
|
|
||||||
encodings compiler hotshot \
|
|
||||||
email email/mime email/test email/test/data \
|
|
||||||
- ensurepip ensurepip/_bundled \
|
|
||||||
+ ensurepip ensurepip/_bundled ensurepip/rewheel\
|
|
||||||
json json/tests \
|
|
||||||
sqlite3 sqlite3/test \
|
|
||||||
logging bsddb bsddb/test csv importlib wsgiref \
|
|
|
@ -1,5 +1,7 @@
|
||||||
--- Python-2.7.4/Modules/Setup.dist.rhconfig 2013-04-06 16:02:34.000000000 +0200
|
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
|
||||||
+++ Python-2.7.4/Modules/Setup.dist 2013-04-08 10:05:16.369985654 +0200
|
index bbc9222..2cf35a9 100644
|
||||||
|
--- a/Modules/Setup.dist
|
||||||
|
+++ b/Modules/Setup.dist
|
||||||
@@ -153,7 +153,7 @@ GLHACK=-Dclear=__GLclear
|
@@ -153,7 +153,7 @@ GLHACK=-Dclear=__GLclear
|
||||||
# modules are to be built as shared libraries (see above for more
|
# modules are to be built as shared libraries (see above for more
|
||||||
# detail; also note that *static* reverses this effect):
|
# detail; also note that *static* reverses this effect):
|
||||||
|
@ -9,7 +11,7 @@
|
||||||
|
|
||||||
# GNU readline. Unlike previous Python incarnations, GNU readline is
|
# GNU readline. Unlike previous Python incarnations, GNU readline is
|
||||||
# now incorporated in an optional module, configured in the Setup file
|
# now incorporated in an optional module, configured in the Setup file
|
||||||
@@ -163,77 +163,77 @@ GLHACK=-Dclear=__GLclear
|
@@ -163,33 +163,33 @@ GLHACK=-Dclear=__GLclear
|
||||||
# it, depending on your system -- see the GNU readline instructions.
|
# it, depending on your system -- see the GNU readline instructions.
|
||||||
# It's okay for this to be a shared library, too.
|
# It's okay for this to be a shared library, too.
|
||||||
|
|
||||||
|
@ -59,9 +61,7 @@
|
||||||
|
|
||||||
# Standard I/O baseline
|
# Standard I/O baseline
|
||||||
#_io -I$(srcdir)/Modules/_io _io/bufferedio.c _io/bytesio.c _io/fileio.c _io/iobase.c _io/_iomodule.c _io/stringio.c _io/textio.c
|
#_io -I$(srcdir)/Modules/_io _io/bufferedio.c _io/bytesio.c _io/fileio.c _io/iobase.c _io/_iomodule.c _io/stringio.c _io/textio.c
|
||||||
|
@@ -199,41 +199,41 @@ GLHACK=-Dclear=__GLclear
|
||||||
|
|
||||||
# Modules with some UNIX dependencies -- on by default:
|
|
||||||
# (If you have a really backward UNIX, select and socket may not be
|
# (If you have a really backward UNIX, select and socket may not be
|
||||||
# supported...)
|
# supported...)
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
|
|
||||||
|
|
||||||
# Multimedia modules -- off by default.
|
# Multimedia modules -- off by default.
|
||||||
@@ -238,8 +238,8 @@ GLHACK=-Dclear=__GLclear
|
@@ -241,8 +241,8 @@ GLHACK=-Dclear=__GLclear
|
||||||
# #993173 says audioop works on 64-bit platforms, though.
|
# #993173 says audioop works on 64-bit platforms, though.
|
||||||
# These represent audio samples or images as strings:
|
# These represent audio samples or images as strings:
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
|
|
||||||
|
|
||||||
# Note that the _md5 and _sha modules are normally only built if the
|
# Note that the _md5 and _sha modules are normally only built if the
|
||||||
@@ -249,14 +249,14 @@ GLHACK=-Dclear=__GLclear
|
@@ -252,14 +252,14 @@ GLHACK=-Dclear=__GLclear
|
||||||
# Message-Digest Algorithm, described in RFC 1321. The necessary files
|
# Message-Digest Algorithm, described in RFC 1321. The necessary files
|
||||||
# md5.c and md5.h are included here.
|
# md5.c and md5.h are included here.
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
|
|
||||||
|
|
||||||
# SGI IRIX specific modules -- off by default.
|
# SGI IRIX specific modules -- off by default.
|
||||||
@@ -303,12 +303,12 @@ GLHACK=-Dclear=__GLclear
|
@@ -306,12 +306,12 @@ GLHACK=-Dclear=__GLclear
|
||||||
# A Linux specific module -- off by default; this may also work on
|
# A Linux specific module -- off by default; this may also work on
|
||||||
# some *BSDs.
|
# some *BSDs.
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
|
|
||||||
|
|
||||||
# The _tkinter module.
|
# The _tkinter module.
|
||||||
@@ -323,7 +323,7 @@ GLHACK=-Dclear=__GLclear
|
@@ -326,7 +326,7 @@ GLHACK=-Dclear=__GLclear
|
||||||
# every system.
|
# every system.
|
||||||
|
|
||||||
# *** Always uncomment this (leave the leading underscore in!):
|
# *** Always uncomment this (leave the leading underscore in!):
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
|
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
|
||||||
# -L/usr/local/lib \
|
# -L/usr/local/lib \
|
||||||
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
|
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
|
||||||
@@ -333,7 +333,7 @@ GLHACK=-Dclear=__GLclear
|
@@ -336,7 +336,7 @@ GLHACK=-Dclear=__GLclear
|
||||||
# *** Or uncomment this for Solaris:
|
# *** Or uncomment this for Solaris:
|
||||||
# -I/usr/openwin/include \
|
# -I/usr/openwin/include \
|
||||||
# *** Uncomment and edit for Tix extension only:
|
# *** Uncomment and edit for Tix extension only:
|
||||||
|
@ -180,7 +180,7 @@
|
||||||
# *** Uncomment and edit for BLT extension only:
|
# *** Uncomment and edit for BLT extension only:
|
||||||
# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
|
# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
|
||||||
# *** Uncomment and edit for PIL (TkImaging) extension only:
|
# *** Uncomment and edit for PIL (TkImaging) extension only:
|
||||||
@@ -342,7 +342,7 @@ GLHACK=-Dclear=__GLclear
|
@@ -345,7 +345,7 @@ GLHACK=-Dclear=__GLclear
|
||||||
# *** Uncomment and edit for TOGL extension only:
|
# *** Uncomment and edit for TOGL extension only:
|
||||||
# -DWITH_TOGL togl.c \
|
# -DWITH_TOGL togl.c \
|
||||||
# *** Uncomment and edit to reflect your Tcl/Tk versions:
|
# *** Uncomment and edit to reflect your Tcl/Tk versions:
|
||||||
|
@ -189,7 +189,7 @@
|
||||||
# *** Uncomment and edit to reflect where your X11 libraries are:
|
# *** Uncomment and edit to reflect where your X11 libraries are:
|
||||||
# -L/usr/X11R6/lib \
|
# -L/usr/X11R6/lib \
|
||||||
# *** Or uncomment this for Solaris:
|
# *** Or uncomment this for Solaris:
|
||||||
@@ -352,7 +352,7 @@ GLHACK=-Dclear=__GLclear
|
@@ -355,7 +355,7 @@ GLHACK=-Dclear=__GLclear
|
||||||
# *** Uncomment for AIX:
|
# *** Uncomment for AIX:
|
||||||
# -lld \
|
# -lld \
|
||||||
# *** Always uncomment this; X11 libraries to link with:
|
# *** Always uncomment this; X11 libraries to link with:
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
|
|
||||||
# Lance Ellinghaus's syslog module
|
# Lance Ellinghaus's syslog module
|
||||||
#syslog syslogmodule.c # syslog daemon interface
|
#syslog syslogmodule.c # syslog daemon interface
|
||||||
@@ -374,7 +374,7 @@ GLHACK=-Dclear=__GLclear
|
@@ -377,7 +377,7 @@ GLHACK=-Dclear=__GLclear
|
||||||
# it is a highly experimental and dangerous device for calling
|
# it is a highly experimental and dangerous device for calling
|
||||||
# *arbitrary* C functions in *arbitrary* shared libraries:
|
# *arbitrary* C functions in *arbitrary* shared libraries:
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@
|
||||||
|
|
||||||
|
|
||||||
# Modules that provide persistent dictionary-like semantics. You will
|
# Modules that provide persistent dictionary-like semantics. You will
|
||||||
@@ -397,7 +397,7 @@ GLHACK=-Dclear=__GLclear
|
@@ -400,7 +400,7 @@ GLHACK=-Dclear=__GLclear
|
||||||
#
|
#
|
||||||
# First, look at Setup.config; configure may have set this for you.
|
# First, look at Setup.config; configure may have set this for you.
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
|
|
||||||
|
|
||||||
# Sleepycat Berkeley DB interface.
|
# Sleepycat Berkeley DB interface.
|
||||||
@@ -412,11 +412,9 @@ GLHACK=-Dclear=__GLclear
|
@@ -415,11 +415,9 @@ GLHACK=-Dclear=__GLclear
|
||||||
#
|
#
|
||||||
# Edit the variables DB and DBLIBVERto point to the db top directory
|
# Edit the variables DB and DBLIBVERto point to the db top directory
|
||||||
# and the subdirectory of PORT where you built it.
|
# and the subdirectory of PORT where you built it.
|
||||||
|
@ -231,7 +231,7 @@
|
||||||
|
|
||||||
# Historical Berkeley DB 1.85
|
# Historical Berkeley DB 1.85
|
||||||
#
|
#
|
||||||
@@ -431,14 +430,14 @@ GLHACK=-Dclear=__GLclear
|
@@ -434,14 +432,14 @@ GLHACK=-Dclear=__GLclear
|
||||||
|
|
||||||
|
|
||||||
# Helper module for various ascii-encoders
|
# Helper module for various ascii-encoders
|
||||||
|
@ -250,7 +250,7 @@
|
||||||
|
|
||||||
|
|
||||||
# Lee Busby's SIGFPE modules.
|
# Lee Busby's SIGFPE modules.
|
||||||
@@ -461,7 +460,7 @@ GLHACK=-Dclear=__GLclear
|
@@ -464,7 +462,7 @@ GLHACK=-Dclear=__GLclear
|
||||||
# Andrew Kuchling's zlib module.
|
# Andrew Kuchling's zlib module.
|
||||||
# This require zlib 1.1.3 (or later).
|
# This require zlib 1.1.3 (or later).
|
||||||
# See http://www.gzip.org/zlib/
|
# See http://www.gzip.org/zlib/
|
||||||
|
@ -258,20 +258,21 @@
|
||||||
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
|
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
|
||||||
|
|
||||||
# Interface to the Expat XML parser
|
# Interface to the Expat XML parser
|
||||||
#
|
# More information on Expat can be found at www.libexpat.org.
|
||||||
@@ -480,14 +479,14 @@ GLHACK=-Dclear=__GLclear
|
@@ -475,14 +473,14 @@ GLHACK=-Dclear=__GLclear
|
||||||
# Hye-Shik Chang's CJKCodecs
|
# Hye-Shik Chang's CJKCodecs
|
||||||
|
|
||||||
# multibytecodec is required for all the other CJK codec modules
|
# multibytecodec is required for all the other CJK codec modules
|
||||||
-#_multibytecodec cjkcodecs/multibytecodec.c
|
-#_multibytecodec cjkcodecs/multibytecodec.c
|
||||||
+_multibytecodec cjkcodecs/multibytecodec.c
|
-
|
||||||
|
|
||||||
-#_codecs_cn cjkcodecs/_codecs_cn.c
|
-#_codecs_cn cjkcodecs/_codecs_cn.c
|
||||||
-#_codecs_hk cjkcodecs/_codecs_hk.c
|
-#_codecs_hk cjkcodecs/_codecs_hk.c
|
||||||
-#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
|
-#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
|
||||||
-#_codecs_jp cjkcodecs/_codecs_jp.c
|
-#_codecs_jp cjkcodecs/_codecs_jp.c
|
||||||
-#_codecs_kr cjkcodecs/_codecs_kr.c
|
-#_codecs_kr cjkcodecs/_codecs_kr.c
|
||||||
-#_codecs_tw cjkcodecs/_codecs_tw.c
|
-#_codecs_tw cjkcodecs/_codecs_tw.c
|
||||||
|
+_multibytecodec cjkcodecs/multibytecodec.c
|
||||||
|
+
|
||||||
+_codecs_cn cjkcodecs/_codecs_cn.c
|
+_codecs_cn cjkcodecs/_codecs_cn.c
|
||||||
+_codecs_hk cjkcodecs/_codecs_hk.c
|
+_codecs_hk cjkcodecs/_codecs_hk.c
|
||||||
+_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
|
+_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
|
||||||
|
|
148
python2.spec
148
python2.spec
|
@ -5,8 +5,9 @@
|
||||||
# Note that the bcond macros are named for the CLI option they create.
|
# Note that the bcond macros are named for the CLI option they create.
|
||||||
# "%%bcond_without" means "ENABLE by default and create a --without option"
|
# "%%bcond_without" means "ENABLE by default and create a --without option"
|
||||||
|
|
||||||
# Ability to reuse RPM-installed pip using rewheel
|
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
|
||||||
%bcond_without rewheel
|
# Uses upstream bundled prebuilt wheels otherwise
|
||||||
|
%bcond_without rpmwheels
|
||||||
|
|
||||||
# Extra build for debugging the interpreter or C-API extensions
|
# Extra build for debugging the interpreter or C-API extensions
|
||||||
# (the -debug subpackages)
|
# (the -debug subpackages)
|
||||||
|
@ -104,6 +105,16 @@
|
||||||
# the rest of the build
|
# the rest of the build
|
||||||
%global regenerate_autotooling_patch 0
|
%global regenerate_autotooling_patch 0
|
||||||
|
|
||||||
|
# Python 2 is deprecated in Fedora 30+, see:
|
||||||
|
# https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
||||||
|
# This means that new packages MUST NOT depend on python2, even transitively
|
||||||
|
# see: https://fedoraproject.org/wiki/Packaging:Deprecating_Packages
|
||||||
|
# Python 2 will not be supported after 2019. Use the python3 package instead
|
||||||
|
# if possible.
|
||||||
|
%if 0%{fedora} >= 30
|
||||||
|
%global deprecated Provides: deprecated()
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
# ==================
|
# ==================
|
||||||
# Top-level metadata
|
# Top-level metadata
|
||||||
|
@ -111,13 +122,17 @@
|
||||||
Summary: An interpreted, interactive, object-oriented programming language
|
Summary: An interpreted, interactive, object-oriented programming language
|
||||||
Name: %{python}
|
Name: %{python}
|
||||||
# Remember to also rebase python2-docs when changing this:
|
# Remember to also rebase python2-docs when changing this:
|
||||||
Version: 2.7.15
|
%global general_version %{pybasever}.16
|
||||||
Release: 6%{?dist}
|
#global prerel ...
|
||||||
|
%global upstream_version %{general_version}%{?prerel}
|
||||||
|
Version: %{general_version}%{?prerel:~%{prerel}}
|
||||||
|
Release: 1%{?dist}
|
||||||
License: Python
|
License: Python
|
||||||
Group: Development/Languages
|
|
||||||
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
|
||||||
Provides: python(abi) = %{pybasever}
|
Provides: python(abi) = %{pybasever}
|
||||||
|
|
||||||
|
%?deprecated
|
||||||
|
|
||||||
|
|
||||||
# =======================
|
# =======================
|
||||||
# Build-time requirements
|
# Build-time requirements
|
||||||
|
@ -131,17 +146,19 @@ BuildRequires: bluez-libs-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: bzip2
|
BuildRequires: bzip2
|
||||||
BuildRequires: bzip2-devel
|
BuildRequires: bzip2-devel
|
||||||
|
BuildRequires: glibc-all-langpacks
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
BuildRequires: gmp-devel
|
BuildRequires: gmp-devel
|
||||||
BuildRequires: libdb-devel
|
BuildRequires: libdb-devel
|
||||||
BuildRequires: libffi-devel
|
BuildRequires: libffi-devel
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: openssl-devel
|
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: sqlite-devel
|
BuildRequires: sqlite-devel
|
||||||
BuildRequires: tcl-devel
|
BuildRequires: tcl-devel
|
||||||
|
|
||||||
|
BuildRequires: openssl-devel
|
||||||
|
|
||||||
# For the nis module
|
# For the nis module
|
||||||
BuildRequires: libnsl2-devel
|
BuildRequires: libnsl2-devel
|
||||||
BuildRequires: libtirpc-devel
|
BuildRequires: libtirpc-devel
|
||||||
|
@ -180,15 +197,10 @@ BuildRequires: valgrind-devel
|
||||||
|
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
|
||||||
%if %{with rewheel}
|
%if %{with rpmwheels}
|
||||||
BuildRequires: python2-setuptools
|
BuildRequires: python-setuptools-wheel
|
||||||
Requires: python2-setuptools
|
BuildRequires: python-pip-wheel
|
||||||
|
%endif
|
||||||
%if ! 0%{?_module_build}
|
|
||||||
BuildRequires: python2-pip
|
|
||||||
Requires: python2-pip
|
|
||||||
%endif # !module_build
|
|
||||||
%endif # rewheel
|
|
||||||
|
|
||||||
# Providing python27 as now multiple interpreters exist in Fedora
|
# Providing python27 as now multiple interpreters exist in Fedora
|
||||||
# alongside the system one e.g. python26, python33 etc
|
# alongside the system one e.g. python26, python33 etc
|
||||||
|
@ -200,12 +212,18 @@ Provides: python27 = %{version}-%{release}
|
||||||
# python2 back with fixed version, so we just use the path here:
|
# python2 back with fixed version, so we just use the path here:
|
||||||
Recommends: %{_bindir}/python
|
Recommends: %{_bindir}/python
|
||||||
|
|
||||||
|
# Previously, this was required for our rewheel patch to work.
|
||||||
|
# This is technically no longer needed, but we keep it recommended
|
||||||
|
# for the developer experience.
|
||||||
|
Recommends: python2-setuptools
|
||||||
|
Recommends: python2-pip
|
||||||
|
|
||||||
|
|
||||||
# =======================
|
# =======================
|
||||||
# Source code and patches
|
# Source code and patches
|
||||||
# =======================
|
# =======================
|
||||||
|
|
||||||
Source: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
|
Source: https://www.python.org/ftp/python/%{version}/Python-%{upstream_version}.tar.xz
|
||||||
|
|
||||||
# Work around bug 562906 until it's fixed in rpm-build by providing a fixed
|
# Work around bug 562906 until it's fixed in rpm-build by providing a fixed
|
||||||
# version of pythondeps.sh:
|
# version of pythondeps.sh:
|
||||||
|
@ -718,10 +736,15 @@ Patch185: 00185-urllib2-honors-noproxy-for-ftp.patch
|
||||||
Patch187: 00187-add-RPATH-to-pyexpat.patch
|
Patch187: 00187-add-RPATH-to-pyexpat.patch
|
||||||
|
|
||||||
# 00189 #
|
# 00189 #
|
||||||
|
# Instead of bundled wheels, use our RPM packaged wheels from
|
||||||
|
# /usr/share/python-wheels
|
||||||
|
Patch189: 00189-use-rpm-wheels.patch
|
||||||
|
|
||||||
|
# 00190 #
|
||||||
# Fixes gdb py-bt command not to raise exception while processing
|
# Fixes gdb py-bt command not to raise exception while processing
|
||||||
# statements from eval
|
# statements from eval
|
||||||
# rhbz#1008154 (patch by Attila Fazekas)
|
# rhbz#1008154 (patch by Attila Fazekas)
|
||||||
Patch189: 00189-gdb-py-bt-dont-raise-exception-from-eval.patch
|
Patch190: 00190-gdb-py-bt-dont-raise-exception-from-eval.patch
|
||||||
|
|
||||||
# 00191 #
|
# 00191 #
|
||||||
# Disabling NOOP test as it fails without internet connection
|
# Disabling NOOP test as it fails without internet connection
|
||||||
|
@ -734,9 +757,6 @@ Patch191: 00191-disable-NOOP.patch
|
||||||
# Patch provided by John C. Peterson
|
# Patch provided by John C. Peterson
|
||||||
Patch193: 00193-enable-loading-sqlite-extensions.patch
|
Patch193: 00193-enable-loading-sqlite-extensions.patch
|
||||||
|
|
||||||
# 00198 #
|
|
||||||
Patch198: 00198-add-rewheel-module.patch
|
|
||||||
|
|
||||||
# 00289 #
|
# 00289 #
|
||||||
# Disable automatic detection for the nis module
|
# Disable automatic detection for the nis module
|
||||||
# (we handle it it in Setup.dist, see Patch0)
|
# (we handle it it in Setup.dist, see Patch0)
|
||||||
|
@ -784,6 +804,7 @@ implementation is within the "python2-libs" package.
|
||||||
Summary: The "python" command that runs Python 2
|
Summary: The "python" command that runs Python 2
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
|
# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
|
||||||
|
%?deprecated
|
||||||
|
|
||||||
# In theory this could require any python2 version
|
# In theory this could require any python2 version
|
||||||
Requires: python2 == %{version}-%{release}
|
Requires: python2 == %{version}-%{release}
|
||||||
|
@ -797,7 +818,7 @@ This package contains /usr/bin/python - the "python" command that runs Python 2.
|
||||||
|
|
||||||
%package libs
|
%package libs
|
||||||
Summary: Runtime libraries for Python 2
|
Summary: Runtime libraries for Python 2
|
||||||
Group: Applications/System
|
%?deprecated
|
||||||
|
|
||||||
# Needed for ctypes, to load libraries, worked around for Live CDs size
|
# Needed for ctypes, to load libraries, worked around for Live CDs size
|
||||||
# Requires: binutils
|
# Requires: binutils
|
||||||
|
@ -816,6 +837,14 @@ Requires: glibc%{?_isa} >= 2.24.90-26
|
||||||
Requires: gdbm%{?_isa} >= 1:1.13
|
Requires: gdbm%{?_isa} >= 1:1.13
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with rpmwheels}
|
||||||
|
Requires: python-setuptools-wheel
|
||||||
|
Requires: python-pip-wheel
|
||||||
|
%else
|
||||||
|
Provides: bundled(python2-pip) = 18.1
|
||||||
|
Provides: bundled(python2-setuptools) = 40.6.2
|
||||||
|
%endif
|
||||||
|
|
||||||
Provides: python-libs = %{version}-%{release}
|
Provides: python-libs = %{version}-%{release}
|
||||||
Provides: python-libs%{?_isa} = %{version}-%{release}
|
Provides: python-libs%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
@ -824,7 +853,8 @@ This package contains files used to embed Python 2 into applications.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Libraries and header files needed for Python 2 development
|
Summary: Libraries and header files needed for Python 2 development
|
||||||
Group: Development/Libraries
|
%?deprecated
|
||||||
|
|
||||||
Requires: %{python}%{?_isa} = %{version}-%{release}
|
Requires: %{python}%{?_isa} = %{version}-%{release}
|
||||||
Requires: python-rpm-macros
|
Requires: python-rpm-macros
|
||||||
Requires: python2-rpm-macros
|
Requires: python2-rpm-macros
|
||||||
|
@ -837,6 +867,15 @@ Requires: pkgconfig
|
||||||
Requires: python3-rpm-generators
|
Requires: python3-rpm-generators
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# This is not "API" (packages that need setuptools should still BuildRequire it)
|
||||||
|
# However some packages apparently can build both with and without setuptools
|
||||||
|
# producing egg-info as file or directory (depending on setuptools presence).
|
||||||
|
# Directory-to-file updates are problematic in RPM, so we ensure setuptools is
|
||||||
|
# installed when -devel is required.
|
||||||
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=1623922
|
||||||
|
# See https://fedoraproject.org/wiki/Packaging:Directory_Replacement
|
||||||
|
Requires: python2-setuptools
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1217376
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1217376
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1496757
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1496757
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1218294
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1218294
|
||||||
|
@ -856,7 +895,8 @@ with and native libraries for Python 2
|
||||||
|
|
||||||
%package tools
|
%package tools
|
||||||
Summary: A collection of development tools included with Python 2
|
Summary: A collection of development tools included with Python 2
|
||||||
Group: Development/Tools
|
%?deprecated
|
||||||
|
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Requires: %{python}-tkinter = %{version}-%{release}
|
Requires: %{python}-tkinter = %{version}-%{release}
|
||||||
|
|
||||||
|
@ -870,7 +910,8 @@ color editor (pynche), and a python gettext program (pygettext.py).
|
||||||
|
|
||||||
%package tkinter
|
%package tkinter
|
||||||
Summary: A graphical user interface for the Python 2 scripting language
|
Summary: A graphical user interface for the Python 2 scripting language
|
||||||
Group: Development/Languages
|
%?deprecated
|
||||||
|
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
Provides: tkinter = %{version}-%{release}
|
Provides: tkinter = %{version}-%{release}
|
||||||
|
@ -890,7 +931,8 @@ user interface for Python 2 programming.
|
||||||
|
|
||||||
%package test
|
%package test
|
||||||
Summary: The test modules from the main python2 package
|
Summary: The test modules from the main python2 package
|
||||||
Group: Development/Languages
|
%?deprecated
|
||||||
|
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
Provides: python-test = %{version}-%{release}
|
Provides: python-test = %{version}-%{release}
|
||||||
|
@ -908,7 +950,7 @@ code that uses more than just unittest and/or test.support.
|
||||||
%if %{with debug_build}
|
%if %{with debug_build}
|
||||||
%package debug
|
%package debug
|
||||||
Summary: Debug version of the Python 2 runtime
|
Summary: Debug version of the Python 2 runtime
|
||||||
Group: Applications/System
|
%?deprecated
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -947,7 +989,7 @@ load its own extensions.
|
||||||
# ======================================================
|
# ======================================================
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n Python-%{version}
|
%setup -q -n Python-%{upstream_version}
|
||||||
|
|
||||||
%if 0%{?with_systemtap}
|
%if 0%{?with_systemtap}
|
||||||
# Provide an example of usage of the tapset:
|
# Provide an example of usage of the tapset:
|
||||||
|
@ -1056,15 +1098,17 @@ mv Modules/cryptmodule.c Modules/_cryptmodule.c
|
||||||
%patch181 -p1
|
%patch181 -p1
|
||||||
%patch185 -p1
|
%patch185 -p1
|
||||||
%patch187 -p1
|
%patch187 -p1
|
||||||
|
|
||||||
|
%if %{with rpmwheels}
|
||||||
%patch189 -p1
|
%patch189 -p1
|
||||||
|
rm Lib/ensurepip/_bundled/*.whl
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%patch190 -p1
|
||||||
%patch191 -p1
|
%patch191 -p1
|
||||||
%patch193 -p1
|
%patch193 -p1
|
||||||
%if %{with rewheel}
|
|
||||||
%patch198 -p1
|
|
||||||
%endif
|
|
||||||
%patch289 -p1
|
%patch289 -p1
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?_module_build}
|
%if 0%{?_module_build}
|
||||||
%patch4000 -p1
|
%patch4000 -p1
|
||||||
%endif
|
%endif
|
||||||
|
@ -1522,6 +1566,8 @@ CheckPython() {
|
||||||
BinaryName=$2
|
BinaryName=$2
|
||||||
ConfDir=$(pwd)/build/$ConfName
|
ConfDir=$(pwd)/build/$ConfName
|
||||||
|
|
||||||
|
export OPENSSL_CONF=/non-existing-file
|
||||||
|
|
||||||
echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
|
echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
|
||||||
|
|
||||||
# Note that we're running the tests using the version of the code in the
|
# Note that we're running the tests using the version of the code in the
|
||||||
|
@ -1607,7 +1653,7 @@ CheckPython \
|
||||||
%{dynload_dir}/_sha512module.so
|
%{dynload_dir}/_sha512module.so
|
||||||
%{dynload_dir}/_shamodule.so
|
%{dynload_dir}/_shamodule.so
|
||||||
|
|
||||||
%{dynload_dir}/Python-%{version}-py%{pybasever}.egg-info
|
%{dynload_dir}/Python-%{upstream_version}-py%{pybasever}.egg-info
|
||||||
%{dynload_dir}/_bisectmodule.so
|
%{dynload_dir}/_bisectmodule.so
|
||||||
%{dynload_dir}/_bsddb.so
|
%{dynload_dir}/_bsddb.so
|
||||||
%{dynload_dir}/_codecs_cn.so
|
%{dynload_dir}/_codecs_cn.so
|
||||||
|
@ -1746,11 +1792,11 @@ CheckPython \
|
||||||
|
|
||||||
%dir %{pylibdir}/ensurepip/
|
%dir %{pylibdir}/ensurepip/
|
||||||
%{pylibdir}/ensurepip/*.py*
|
%{pylibdir}/ensurepip/*.py*
|
||||||
|
%if %{with rpmwheels}
|
||||||
%exclude %{pylibdir}/ensurepip/_bundled
|
%exclude %{pylibdir}/ensurepip/_bundled
|
||||||
|
%else
|
||||||
%if %{with rewheel}
|
%dir %{pylibdir}/ensurepip/_bundled
|
||||||
%dir %{pylibdir}/ensurepip/rewheel/
|
%{pylibdir}/ensurepip/_bundled/*.whl
|
||||||
%{pylibdir}/ensurepip/rewheel/*.py*
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -1962,6 +2008,36 @@ CheckPython \
|
||||||
# ======================================================
|
# ======================================================
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 04 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.16-1
|
||||||
|
- Update to 2.7.16 final
|
||||||
|
|
||||||
|
* Tue Feb 19 2019 Charalampos Stratakis <cstratak@redhat.com> - 2.7.16~rc1-1
|
||||||
|
- Update to 2.7.16rc1
|
||||||
|
|
||||||
|
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.7.15-14
|
||||||
|
- Rebuild for readline 8.0
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.15-13
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 2.7.15-12
|
||||||
|
- Rebuilt for libcrypt.so.2 (#1666033)
|
||||||
|
|
||||||
|
* Mon Sep 24 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7.15-11
|
||||||
|
- Security fix for CVE-2018-14647 (#1631822)
|
||||||
|
|
||||||
|
* Thu Sep 20 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7.15-10
|
||||||
|
- Security fix for CVE-2018-1000802 (#1631662)
|
||||||
|
|
||||||
|
* Thu Sep 06 2018 Petr Viktorin <pviktori@redhat.com> - 2.7.15-9
|
||||||
|
- Deprecate python2 and all subpackages in Fedora 30+ (#1625773)
|
||||||
|
|
||||||
|
* Thu Aug 30 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7.15-8
|
||||||
|
- Require python2-setuptools from python2-devel to prevent packaging errors (#1623922)
|
||||||
|
|
||||||
|
* Tue Aug 21 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7.15-7
|
||||||
|
- Use RPM built wheels of pip and setuptools in ensurepip instead of our rewheel patch
|
||||||
|
|
||||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.15-6
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.15-6
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
||||||
SHA512 (Python-2.7.15.tar.xz) = 27ea43eb45fc68f3d2469d5f07636e10801dee11635a430ec8ec922ed790bb426b072da94df885e4dfa1ea8b7a24f2f56dd92f9b0f51e162330f161216bd6de6
|
SHA512 (Python-2.7.16.tar.xz) = 16e814e8dcffc707b595ca2919bd2fa3db0d15794c63d977364652c4a5b92e90e72b8c9e1cc83b5020398bd90a1b397dbdd7cb931c49f1aa4af6ef95414b43e0
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- role: standard-test-basic
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
repositories:
|
||||||
|
- repo: "https://src.fedoraproject.org/tests/python.git"
|
||||||
|
dest: "python"
|
||||||
|
tests:
|
||||||
|
- smoke:
|
||||||
|
dir: python/smoke
|
||||||
|
run: METHOD=virtualenv VERSION=2.7 ./venv.sh
|
||||||
|
required_packages:
|
||||||
|
- gcc
|
||||||
|
- virtualenv
|
||||||
|
- python3-tox
|
||||||
|
- python2-devel
|
||||||
|
- glibc-all-langpacks # for locale tests
|
Loading…
Reference in New Issue