Compare commits

..

70 Commits

Author SHA1 Message Date
Victor Stinner
ef338dc7d0 tests.yml now installs also glibc-all-langpacks
Install all locales to not skip test_locale tests.
2019-03-05 11:13:34 +00:00
Miro Hrončok
a5e818f217 Update to 2.7.16 final 2019-03-04 15:08:29 +01:00
Miro Hrončok
5d0f9111df Update bundled pip/setuptools versions 2019-03-01 15:10:33 +01:00
Charalampos Stratakis
75a0703066 Rebase to 2.7.16rc1 2019-02-28 10:19:21 +00:00
Miro Hrončok
b13073ac76 Fedora CI: Workaround for fedora-ci/general #31
https://pagure.io/fedora-ci/general/issue/31
2019-02-28 09:45:47 +01:00
Igor Gnatenko
789267ab76 Rebuild for readline 8.0 2019-02-17 09:30:52 +01:00
Fedora Release Engineering
ef2a83ef76 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-02 10:16:35 +00:00
Igor Gnatenko
1d7cbe3b6c Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:38 +01:00
Björn Esser
284b905a2e
Rebuilt for libcrypt.so.2 (#1666033) 2019-01-14 18:52:20 +01:00
Miro Hrončok
44b757bc09 BR glibc-all-langpacks to fix a FTBFS and avoid skipped tests
See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot

The tests failed with:

Some tests will be disabled: Test locale not supported
(tried en_US.UTF-8, en_US.US-ASCII, en_US)
...
======================================================================
ERROR: test_lookup_issue1813 (test.test_codecs.CodecsModuleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-2.7.15/Lib/locale.py", line 581, in setlocale
    return _setlocale(category, locale)
Error: unsupported locale setting
----------------------------------------------------------------------
...
======================================================================
ERROR: test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-2.7.15/Lib/locale.py", line 581, in setlocale
    return _setlocale(category, locale)
Error: unsupported locale setting
======================================================================
ERROR: test_setlocale_unicode (test.test_locale.TestMiscellaneous)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-2.7.15/Lib/locale.py", line 581, in setlocale
    return _setlocale(category, locale)
Error: unsupported locale setting
----------------------------------------------------------------------
2018-12-10 17:39:48 +01:00
Miro Hrončok
ebba43dec3 Security fix for CVE-2018-14647 (#1631822) 2018-09-24 13:08:08 +02:00
Miro Hrončok
0dfe62335c Security fix for CVE-2018-1000802 (#1631662) 2018-09-21 10:49:42 +02:00
Petr Viktorin
0052c9fa9d Deprecate python2 and all subpackages in Fedora 30+
See:
- https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
- https://fedoraproject.org/wiki/Packaging:Deprecating_Packages
2018-09-07 12:41:58 +02:00
Miro Hrončok
ae09a79125 Enable basic venv smoke test in the CI 2018-08-31 18:56:13 +02:00
Miro Hrončok
e8ef86e1cf Require python2-setuptools from python2-devel to prevent packaging errors (#1623922) 2018-08-30 15:46:34 +02:00
Miro Hrončok
4d74b7c9bf Use RPM built wheels of pip and setuptools in ensurepip instead of our rewheel patch 2018-08-23 17:49:59 +02:00
Miro Hrončok
d60e5a4fc9 Move patch 189 to 190 to make room for standardized 189
https://fedoraproject.org/wiki/SIGs/Python/PythonPatches
2018-08-23 17:49:59 +02:00
Miro Hrončok
8b06c12ed7 Temporarily use compat-openssl10-devel to workaround #1609291 2018-08-23 15:09:59 +02:00
Fedora Release Engineering
fb39860846 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 02:48:28 +00:00
Jason Tibbitts
f5b3292c68 Remove needless use of %defattr 2018-07-10 01:54:54 -05:00
Miro Hrončok
08290bc9c3 Add a workaround for broken %undefine __brp_python_bytecompile
See https://bugzilla.redhat.com/show_bug.cgi?id=1597664
2018-07-03 14:02:51 +02:00
Miro Hrončok
002eb7557e Move /usr/bin/python into a separate package
See https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package

Reverts https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build
2018-07-03 11:31:07 +02:00
Miro Hrončok
692623a0b9 pynche: Do not execute just python, but python2 2018-06-21 16:35:28 +02:00
Miro Hrončok
5ee9c1ec45 Rebuilt for Python 3.7 2018-06-13 18:34:16 +02:00
Miro Hrončok
2b53e7ec9b Bootstrap for Python 3.7 2018-06-13 15:40:42 +02:00
Charalampos Stratakis
4922a4e974 Fix loading of the gdb python plugin (rhbz#1578001)
Conditionalize permissions changes for the debug
shared library.
2018-05-15 14:28:59 +02:00
Miro Hrončok
ba2118865d Add a Python 3 bootstrapping bcond 2018-05-12 00:53:31 +02:00
Miro Hrončok
080ef9bdfb Coerce locale to UTF-8 encoding when running tests
Since 2.7.15, there is a test that shutil.copies to unicode filename.
2018-05-02 12:02:18 +02:00
Miro Hrončok
066c258587 Update to version 2.7.15
- Rebased patches: 165, 170, 198
- Refactored patches: 289
- Removed patches (included upstream): 280, 283, 284, 285, 287,
                                       293, 297, 298, 299
2018-05-02 12:02:18 +02:00
Miro Hrončok
3be16be9fa Bytecompile files manually, disable brp-python-bytecompile
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1572171
2018-04-28 17:12:13 +02:00
Tomas Orsava
b1a24b465f Change shebangs to the proper versioned binary 2018-04-26 10:35:56 +02:00
Miro Hrončok
4856e50ce1 Update the docs comment to mention python2-docs 2018-04-13 23:01:00 +02:00
Miro Hrončok
8545792aae Remove Obsoletes tag from when python was renamed to python2
Fedora 25 was last Fedora that had python, N+3 upgrades are not
supported, this can be merged to Fedora 28+.
2018-04-13 22:58:24 +02:00
Miro Hrončok
cc58e7d338 Fix broken SSL module (#1555081) 2018-03-14 11:33:05 +01:00
Charalampos Stratakis
e1abe5a026 Do not send IP addresses in SNI TLS extension 2018-03-13 17:09:14 +01:00
Petr Viktorin
5316098666 Fix -Wint-in-bool-context warnings 2018-02-27 11:07:57 +01:00
Florian Weimer
528a444ab6 Rebuild with new LDFLAGS from redhat-rpm-config 2018-02-24 18:25:24 +01:00
Miro Hrončok
b02c01e554 Move test.support and test.script_helper to python2-libs
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1528899

When moving files around, explicit conflicts should be added, however
the dependency chain here (python2-test requires exact version-release of
python2, python2 requires exact version-release of python2-libs) prevents
instalation of python2-libs with greater version-release than python2-test.
2018-02-15 17:04:45 +01:00
Igor Gnatenko
71264cf847
Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 09:28:24 +01:00
Igor Gnatenko
1bdc5fed8a Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 00:53:42 +01:00
Fedora Release Engineering
9c47bee6d8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 11:53:31 +00:00
Charalampos Stratakis
11b080bc3c Remove obsolete scriptlets that are now automatic. 2018-02-05 17:55:07 +01:00
Petr Viktorin
96b18273ae Add patch 289: Fix for over-aligned GC info 2018-01-31 13:40:48 +01:00
Petr Viktorin
7143d8af3a Warn/fail if /usr/bin/python is called with PYTHON_DISALLOW_AMBIGUOUS_VERSION
See https://fedoraproject.org/wiki/User:Pviktori/Avoid_usr_bin_python_in_RPM_Build
2018-01-30 13:48:45 +01:00
Björn Esser
9c6e188db0
Rebuilt for switch to libxcrypt 2018-01-20 23:07:40 +01:00
Petr Viktorin
3056bfd92a Build the nis module with tirpc 2018-01-17 14:56:25 +01:00
Miro Hrončok
75ba8b986c Rebuild for reverted gdbm 1:1.13 on F27 2018-01-17 13:41:09 +01:00
Charalampos Stratakis
f2b472093a Rebuild for gdbm 1.14 2018-01-11 15:10:39 +01:00
Charalampos Stratakis
cf221a53b1 Fix hanging of all threads when trying to access an inaccessible NFS server.
Also mask some macros in comments.
2017-12-11 13:35:09 +01:00
Miro Hrončok
3bebf16e16 Make the -devel package require redhat-rpm-config
Resolves: rhbz#1496757
2017-11-09 12:44:53 +01:00
Charalampos Stratakis
9d3ac306c1 Fix nondeterministic read in test_pty 2017-11-02 16:44:28 +01:00
Charalampos Stratakis
f948d41aff Add a new PYTHONSHOWREFCOUNT environment variable which when set
prints the number of references when using the debug build.
2017-11-02 16:42:42 +01:00
Troy Dawson
349b2233cb Require python2-setuptools even in modules 2017-10-23 10:20:54 -05:00
Iryna Shcherbina
6bc3f63023 Add patches for failing tests
- Replace COUNT_ALLOCS patches with upstreamed one
  (patches added: 283; patches removed: 125, 134, 135, 141)
  https://bugs.python.org/issue31692
- Add a patch to skip a failing test on s390x: 280
  https://bugs.python.org/issue31719
2017-10-18 17:53:55 +02:00
Iryna Shcherbina
9db4c321af Update to 2.7.14
- Refactored patches: 55, 112, 153
- Upstreamed patches: 250, 269, 270
2017-10-09 14:07:09 +02:00
Carl George
57e494a406 drop patch 173
This was resolved upstream in 3.3/3.4.  The fix was later backported to 2.7.7rc1.

https://bugs.python.org/issue19901
d82634d606
https://github.com/python/cpython/blob/2.7/Misc/NEWS.d/2.7.7rc1.rst
2017-09-20 13:43:54 -05:00
Tomas Orsava
e4e4dbbeea Switch some macros into bconds to facilitate modularity
Bconds can be switched on/off in modulemd whereas normal macros cannot be
redefined there.
2017-08-31 13:45:11 +02:00
Miro Hrončok
d2afb4596f Exclude /usr/bin/2to3 (rhbz#1111275) 2017-08-16 14:31:44 +02:00
Sanqui
db65c52e5c Do not generate debuginfo subpackages (#1476593) 2017-08-15 10:42:43 +02:00
Michal Cyprian
d99160d4df Revert "Add --executable option to install.py command"
This enhancement is currently not needed and it can possibly
collide with `pip --editable`option

Reverts commit 8043ae7719.
2017-08-09 13:49:30 +02:00
Fedora Release Engineering
f9d5f4b78d - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 07:04:34 +00:00
Fedora Release Engineering
f33a487469 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 12:25:01 +00:00
Charalampos Stratakis
b096dc5eb0 Provide additional reference for patch 252 2017-06-28 15:49:57 +02:00
Charalampos Stratakis
916477c6e6 Fix test_alpn_protocols from test_ssl 2017-06-26 11:50:49 +02:00
Miro Hrončok
2ee453130c Change fixed Obsoletes version with a dynamic one (rhbz#1457336) 2017-05-31 18:01:14 +02:00
Karsten Hopp
32febd6043 revert logic for modularity patch and enable gdbm for modularity 2017-05-18 14:19:19 +02:00
Tomas Orsava
4485b86f0d Add dependency to the devel subpackage on python3-rpm-generators
... which have been excised out of rpm-build.

Involves: rhbz#1410631, rhbz#1444925
2017-05-16 13:10:05 +02:00
Charalampos Stratakis
1554ebbaa5 Enable profile guided optimizations for x86_64 and i686 architectures.
Added patch for fixing recompilation of Python when using common
build commands and the --enable-optimizations flag.
2017-05-10 16:42:46 +02:00
Charalampos Stratakis
890215f627 Change description, to reflect that python2 is obsoleted by Python 3 as
the default Python interpreter.

Also reduce verbosity for the descriptions of subpackages.

Use https sources URL.
2017-05-10 15:26:35 +02:00
Karsten Hopp
bd0f7dde03 apply modularity patch only during module builds 2017-04-25 14:51:26 +02:00
23 changed files with 723 additions and 740 deletions

View File

@ -87,9 +87,9 @@ diff -up Python-2.7rc1/Makefile.pre.in.systemtap Python-2.7rc1/Makefile.pre.in
@@ -1251,7 +1264,7 @@ Python/thread.o: @THREADHEADERS@ @@ -1251,7 +1264,7 @@ Python/thread.o: @THREADHEADERS@
.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean .PHONY: frameworkaltinstallunixtools recheck clean clobber distclean
-.PHONY: smelly funny patchcheck touch altmaninstall commoninstall -.PHONY: smelly funny patchcheck altmaninstall commoninstall
+.PHONY: smelly funny patchcheck touch altmaninstall commoninstall buildinclude +.PHONY: smelly funny patchcheck altmaninstall commoninstall buildinclude
.PHONY: gdbhooks .PHONY: gdbhooks
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY # IF YOU PUT ANYTHING HERE IT WILL GO AWAY

View File

@ -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,9 +101,18 @@ 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 @@ crypt cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems
# Some more UNIX dependent modules -- off by default, since these
# are not supported by all UNIX systems:
-nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib/nsl
+nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib64/nsl
termios termios.c # Steen Lumholt's termios module
resource resource.c # Jeremy Hylton's rlimit interface
@@ -416,7 +416,7 @@ gdbm gdbmmodule.c -lgdbm @@ -416,7 +416,7 @@ gdbm gdbmmodule.c -lgdbm
# 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.
@ -121,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
@ -145,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):

View File

@ -118,8 +118,8 @@ index 997a2fc..467e782 100644
+PYTHON= python$(DEBUG_SUFFIX)$(EXE) +PYTHON= python$(DEBUG_SUFFIX)$(EXE)
+BUILDPYTHON= python$(DEBUG_SUFFIX)$(BUILDEXE) +BUILDPYTHON= python$(DEBUG_SUFFIX)$(BUILDEXE)
PYTHON_FOR_REGEN=@PYTHON_FOR_REGEN@
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
_PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
@@ -547,7 +553,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o @@ -547,7 +553,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
@ -194,8 +194,8 @@ index 997a2fc..467e782 100644
# pkgconfig directory # pkgconfig directory
LIBPC= $(LIBDIR)/pkgconfig LIBPC= $(LIBDIR)/pkgconfig
-libainstall: all python-config -libainstall: @DEF_MAKE_RULE@ python-config
+libainstall: all python$(DEBUG_SUFFIX)-config +libainstall: @DEF_MAKE_RULE@ python$(DEBUG_SUFFIX)-config
@for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \ @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
do \ do \
if test ! -d $(DESTDIR)$$i; then \ if test ! -d $(DESTDIR)$$i; then \

View File

@ -1,20 +0,0 @@
diff -up Python-2.7/Python/pythonrun.c.less-verbose-COUNT_ALLOCS Python-2.7/Python/pythonrun.c
--- Python-2.7/Python/pythonrun.c.less-verbose-COUNT_ALLOCS 2010-08-17 14:49:33.321913909 -0400
+++ Python-2.7/Python/pythonrun.c 2010-08-17 14:54:48.750910403 -0400
@@ -470,7 +470,15 @@ Py_Finalize(void)
/* Debugging stuff */
#ifdef COUNT_ALLOCS
- dump_counts(stdout);
+ /* This is a downstream Fedora modification.
+ The upstream default with COUNT_ALLOCS is to always dump the counts to
+ stdout on exit. For our debug builds its useful to have the info from
+ COUNT_ALLOCS available, but the stdout info here gets in the way, so
+ we make it optional, wrapping it in an environment variable (modelled
+ on the other PYTHONDUMP* env variables):
+ */
+ if (Py_GETENV("PYTHONDUMPCOUNTS"))
+ dump_counts(stdout);
#endif
PRINT_TOTAL_REFS();

View File

@ -1,16 +0,0 @@
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 0dd4258..d9b3267 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -769,6 +769,11 @@ class SizeofTest(unittest.TestCase):
'10P' # PySequenceMethods
'6P' # PyBufferProcs
'2P')
+
+ # COUNT_ALLOCS adds further fields to the end of a PyTypeObject:
+ if hasattr(sys, 'getcounts'):
+ s += size('P')
+
class newstyleclass(object):
pass
check(newstyleclass, s)

View File

@ -1,18 +0,0 @@
diff -up Python-2.7.2/Lib/test/test_weakref.py.skip-test-within-test_weakref-in-debug-build Python-2.7.2/Lib/test/test_weakref.py
--- Python-2.7.2/Lib/test/test_weakref.py.skip-test-within-test_weakref-in-debug-build 2011-09-08 17:55:09.675392260 -0400
+++ Python-2.7.2/Lib/test/test_weakref.py 2011-09-08 17:59:08.857375903 -0400
@@ -550,6 +550,14 @@ class ReferencesTestCase(TestBase):
del c1, c2, C, D
gc.collect()
+ # In a debug build, this fails with:
+ # AssertionError: Lists differ: [] != ['C went away']
+ # Second list contains 1 additional elements.
+ # First extra element 0:
+ # C went away
+ # - []
+ # + ['C went away']
+ @unittest.skipIf(hasattr(sys, 'getobjects'), 'debug build')
def test_callback_in_cycle_resurrection(self):
import gc

View File

@ -1,24 +0,0 @@
diff -up Python-2.7.2/Lib/test/test_gc.py.fix-test_gc_with_COUNT_ALLOCS Python-2.7.2/Lib/test/test_gc.py
--- Python-2.7.2/Lib/test/test_gc.py.fix-test_gc_with_COUNT_ALLOCS 2011-09-08 19:49:13.045924309 -0400
+++ Python-2.7.2/Lib/test/test_gc.py 2011-09-08 19:50:07.035920617 -0400
@@ -102,11 +102,17 @@ class GCTests(unittest.TestCase):
del a
self.assertNotEqual(gc.collect(), 0)
del B, C
- self.assertNotEqual(gc.collect(), 0)
+ if hasattr(sys, 'getcounts'):
+ self.assertEqual(gc.collect(), 0)
+ else:
+ self.assertNotEqual(gc.collect(), 0)
A.a = A()
del A
- self.assertNotEqual(gc.collect(), 0)
- self.assertEqual(gc.collect(), 0)
+ if hasattr(sys, 'getcounts'):
+ self.assertEqual(gc.collect(), 0)
+ else:
+ self.assertNotEqual(gc.collect(), 0)
+ self.assertEqual(gc.collect(), 0)
def test_method(self):
# Tricky: self.__init__ is a bound method, it references the instance.

View File

@ -1,13 +1,13 @@
--- Lib/test/test_gdb.py.old 2012-04-11 21:04:01.367073855 -0400 --- Lib/test/test_gdb.py.old 2012-04-11 21:04:01.367073855 -0400
+++ Lib/test/test_gdb.py 2012-04-12 08:52:58.320288761 -0400 +++ Lib/test/test_gdb.py 2012-04-12 08:52:58.320288761 -0400
@@ -144,6 +153,10 @@ @@ -211,6 +211,10 @@
'Missing separate debuginfo for ', # ignore all warnings
'Try: zypper install -C ', 'warning: ',
) )
+ ignore_patterns += ('warning: Unable to open', + ignore_patterns += ('warning: Unable to open',
+ 'Missing separate debuginfo for', + 'Missing separate debuginfo for',
+ 'Try: yum --disablerepo=', + 'Try: yum --disablerepo=',
+ 'Undefined set print command') + 'Undefined set print command')
for line in errlines: for line in errlines:
if not line.startswith(ignore_patterns): if not line:
unexpected_errlines.append(line) continue

View File

@ -1,6 +1,7 @@
diff -up Python-2.7.3/Doc/library/crypt.rst.crypt-module-salt-backport Python-2.7.3/Doc/library/crypt.rst diff --git a/Doc/library/crypt.rst b/Doc/library/crypt.rst
--- Python-2.7.3/Doc/library/crypt.rst.crypt-module-salt-backport 2012-04-09 19:07:28.000000000 -0400 index 91464ef..6ee64d6 100644
+++ Python-2.7.3/Doc/library/crypt.rst 2013-02-19 16:44:20.465334062 -0500 --- a/Doc/library/crypt.rst
+++ b/Doc/library/crypt.rst
@@ -16,9 +16,9 @@ @@ -16,9 +16,9 @@
This module implements an interface to the :manpage:`crypt(3)` routine, which is This module implements an interface to the :manpage:`crypt(3)` routine, which is
@ -14,7 +15,7 @@ diff -up Python-2.7.3/Doc/library/crypt.rst.crypt-module-salt-backport Python-2.
.. index:: single: crypt(3) .. index:: single: crypt(3)
@@ -27,15 +27,81 @@ the :manpage:`crypt(3)` routine in the r @@ -27,15 +27,81 @@ the :manpage:`crypt(3)` routine in the running system. Therefore, any
extensions available on the current implementation will also be available on extensions available on the current implementation will also be available on
this module. this module.
@ -130,7 +131,7 @@ diff -up Python-2.7.3/Doc/library/crypt.rst.crypt-module-salt-backport Python-2.
A simple example illustrating typical use:: A simple example illustrating typical use::
import crypt, getpass, pwd import crypt, getpass, pwd
@@ -59,3 +146,11 @@ A simple example illustrating typical us @@ -59,3 +146,11 @@ A simple example illustrating typical use::
else: else:
return 1 return 1
@ -142,9 +143,11 @@ diff -up Python-2.7.3/Doc/library/crypt.rst.crypt-module-salt-backport Python-2.
+ hashed = crypt.crypt(plaintext) + hashed = crypt.crypt(plaintext)
+ if hashed != crypt.crypt(plaintext, hashed): + if hashed != crypt.crypt(plaintext, hashed):
+ raise "Hashed version doesn't validate against original" + raise "Hashed version doesn't validate against original"
diff -up Python-2.7.3/Lib/crypt.py.crypt-module-salt-backport Python-2.7.3/Lib/crypt.py diff --git a/Lib/crypt.py b/Lib/crypt.py
--- Python-2.7.3/Lib/crypt.py.crypt-module-salt-backport 2013-02-19 16:44:20.465334062 -0500 new file mode 100644
+++ Python-2.7.3/Lib/crypt.py 2013-02-19 16:49:56.425311089 -0500 index 0000000..bf0a416
--- /dev/null
+++ b/Lib/crypt.py
@@ -0,0 +1,71 @@ @@ -0,0 +1,71 @@
+"""Wrapper to the POSIX crypt library call and associated functionality. +"""Wrapper to the POSIX crypt library call and associated functionality.
+ +
@ -217,12 +220,13 @@ diff -up Python-2.7.3/Lib/crypt.py.crypt-module-salt-backport Python-2.7.3/Lib/c
+methods.append(METHOD_CRYPT) +methods.append(METHOD_CRYPT)
+del _result, _method +del _result, _method
+ +
diff -up Python-2.7.3/Lib/test/test_crypt.py.crypt-module-salt-backport Python-2.7.3/Lib/test/test_crypt.py diff --git a/Lib/test/test_crypt.py b/Lib/test/test_crypt.py
--- Python-2.7.3/Lib/test/test_crypt.py.crypt-module-salt-backport 2012-04-09 19:07:31.000000000 -0400 index 7cd9c71..b061a55 100644
+++ Python-2.7.3/Lib/test/test_crypt.py 2013-02-19 16:44:20.465334062 -0500 --- a/Lib/test/test_crypt.py
@@ -10,6 +10,25 @@ class CryptTestCase(unittest.TestCase): +++ b/Lib/test/test_crypt.py
if test_support.verbose: @@ -16,6 +16,25 @@ class CryptTestCase(unittest.TestCase):
print 'Test encryption: ', c self.assertEqual(cr2, cr)
+ def test_salt(self): + def test_salt(self):
+ self.assertEqual(len(crypt._saltchars), 64) + self.assertEqual(len(crypt._saltchars), 64)
@ -246,9 +250,23 @@ diff -up Python-2.7.3/Lib/test/test_crypt.py.crypt-module-salt-backport Python-2
def test_main(): def test_main():
test_support.run_unittest(CryptTestCase) test_support.run_unittest(CryptTestCase)
diff -up Python-2.7.3/Modules/cryptmodule.c.crypt-module-salt-backport Python-2.7.3/Modules/cryptmodule.c diff --git a/Modules/Setup.dist b/Modules/Setup.dist
--- Python-2.7.3/Modules/cryptmodule.c.crypt-module-salt-backport 2012-04-09 19:07:34.000000000 -0400 index 2712f06..3ea4f0c 100644
+++ Python-2.7.3/Modules/cryptmodule.c 2013-02-19 16:44:20.466334063 -0500 --- a/Modules/Setup.dist
+++ b/Modules/Setup.dist
@@ -225,7 +225,7 @@ _ssl _ssl.c \
#
# First, look at Setup.config; configure may have set this for you.
-crypt cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems
+_crypt _cryptmodule.c -lcrypt # crypt(3); needs -lcrypt on some systems
# Some more UNIX dependent modules -- off by default, since these
diff --git a/Modules/cryptmodule.c b/Modules/cryptmodule.c
index 76de54f..7c69ca6 100644
--- a/Modules/cryptmodule.c
+++ b/Modules/cryptmodule.c
@@ -43,7 +43,7 @@ static PyMethodDef crypt_methods[] = { @@ -43,7 +43,7 @@ static PyMethodDef crypt_methods[] = {
}; };
@ -259,22 +277,11 @@ diff -up Python-2.7.3/Modules/cryptmodule.c.crypt-module-salt-backport Python-2.
- Py_InitModule("crypt", crypt_methods); - Py_InitModule("crypt", crypt_methods);
+ Py_InitModule("_crypt", crypt_methods); + Py_InitModule("_crypt", crypt_methods);
} }
diff -up Python-2.7.3/Modules/Setup.dist.crypt-module-salt-backport Python-2.7.3/Modules/Setup.dist diff --git a/setup.py b/setup.py
--- Python-2.7.3/Modules/Setup.dist.crypt-module-salt-backport 2013-02-19 16:44:20.463334063 -0500 index b787487..c60ac35 100644
+++ Python-2.7.3/Modules/Setup.dist 2013-02-19 16:44:20.466334063 -0500 --- a/setup.py
@@ -221,7 +221,7 @@ _ssl _ssl.c \ +++ b/setup.py
# @@ -798,7 +798,7 @@ class PyBuildExt(build_ext):
# First, look at Setup.config; configure may have set this for you.
-crypt cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems
+_crypt _cryptmodule.c -lcrypt # crypt(3); needs -lcrypt on some systems
# Some more UNIX dependent modules -- off by default, since these
diff -up Python-2.7.3/setup.py.crypt-module-salt-backport Python-2.7.3/setup.py
--- Python-2.7.3/setup.py.crypt-module-salt-backport 2013-02-19 16:44:20.425334067 -0500
+++ Python-2.7.3/setup.py 2013-02-19 16:44:20.466334063 -0500
@@ -693,7 +693,7 @@ class PyBuildExt(build_ext):
libs = ['crypt'] libs = ['crypt']
else: else:
libs = [] libs = []

View File

@ -1,16 +1,18 @@
diff -up Python-2.7.3/Lib/test/test_gc.py.gc-assertions Python-2.7.3/Lib/test/test_gc.py diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py
--- Python-2.7.3/Lib/test/test_gc.py.gc-assertions 2013-02-20 16:28:20.890536607 -0500 index 7e47b2d..12a210d 100644
+++ Python-2.7.3/Lib/test/test_gc.py 2013-02-20 16:39:52.720489297 -0500 --- a/Lib/test/test_gc.py
@@ -1,6 +1,7 @@ +++ b/Lib/test/test_gc.py
@@ -1,7 +1,8 @@
import unittest import unittest
-from test.test_support import verbose, run_unittest, start_threads from test.support import (verbose, run_unittest, start_threads,
+from test.test_support import verbose, run_unittest, start_threads, import_module - requires_type_collecting)
+ requires_type_collecting, import_module)
import sys import sys
+import sysconfig +import sysconfig
import time import time
import gc import gc
import weakref import weakref
@@ -32,6 +33,8 @@ class GC_Detector(object): @@ -39,6 +40,8 @@ class GC_Detector(object):
self.wr = weakref.ref(C1055820(666), it_happened) self.wr = weakref.ref(C1055820(666), it_happened)
@ -19,7 +21,7 @@ diff -up Python-2.7.3/Lib/test/test_gc.py.gc-assertions Python-2.7.3/Lib/test/te
### Tests ### Tests
############################################################################### ###############################################################################
@@ -476,6 +479,49 @@ class GCTests(unittest.TestCase): @@ -537,6 +540,49 @@ class GCTests(unittest.TestCase):
# would be damaged, with an empty __dict__. # would be damaged, with an empty __dict__.
self.assertEqual(x, None) self.assertEqual(x, None)
@ -69,9 +71,10 @@ diff -up Python-2.7.3/Lib/test/test_gc.py.gc-assertions Python-2.7.3/Lib/test/te
class GCTogglingTests(unittest.TestCase): class GCTogglingTests(unittest.TestCase):
def setUp(self): def setUp(self):
gc.enable() gc.enable()
diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmodule.c diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
--- Python-2.7.3/Modules/gcmodule.c.gc-assertions 2012-04-09 19:07:34.000000000 -0400 index 916e481..0233ce2 100644
+++ Python-2.7.3/Modules/gcmodule.c 2013-02-20 16:28:21.029536600 -0500 --- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -21,6 +21,73 @@ @@ -21,6 +21,73 @@
#include "Python.h" #include "Python.h"
#include "frameobject.h" /* for PyFrame_ClearFreeList */ #include "frameobject.h" /* for PyFrame_ClearFreeList */
@ -146,7 +149,7 @@ diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmo
/* Get an object's GC head */ /* Get an object's GC head */
#define AS_GC(o) ((PyGC_Head *)(o)-1) #define AS_GC(o) ((PyGC_Head *)(o)-1)
@@ -288,7 +355,8 @@ update_refs(PyGC_Head *containers) @@ -328,7 +395,8 @@ update_refs(PyGC_Head *containers)
{ {
PyGC_Head *gc = containers->gc.gc_next; PyGC_Head *gc = containers->gc.gc_next;
for (; gc != containers; gc = gc->gc.gc_next) { for (; gc != containers; gc = gc->gc.gc_next) {
@ -156,7 +159,7 @@ diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmo
gc->gc.gc_refs = Py_REFCNT(FROM_GC(gc)); gc->gc.gc_refs = Py_REFCNT(FROM_GC(gc));
/* Python's cyclic gc should never see an incoming refcount /* Python's cyclic gc should never see an incoming refcount
* of 0: if something decref'ed to 0, it should have been * of 0: if something decref'ed to 0, it should have been
@@ -308,7 +376,8 @@ update_refs(PyGC_Head *containers) @@ -348,7 +416,8 @@ update_refs(PyGC_Head *containers)
* so serious that maybe this should be a release-build * so serious that maybe this should be a release-build
* check instead of an assert? * check instead of an assert?
*/ */
@ -166,7 +169,7 @@ diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmo
} }
} }
@@ -323,7 +392,9 @@ visit_decref(PyObject *op, void *data) @@ -363,7 +432,9 @@ visit_decref(PyObject *op, void *data)
* generation being collected, which can be recognized * generation being collected, which can be recognized
* because only they have positive gc_refs. * because only they have positive gc_refs.
*/ */
@ -177,7 +180,7 @@ diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmo
if (gc->gc.gc_refs > 0) if (gc->gc.gc_refs > 0)
gc->gc.gc_refs--; gc->gc.gc_refs--;
} }
@@ -383,9 +454,10 @@ visit_reachable(PyObject *op, PyGC_Head @@ -423,9 +494,10 @@ visit_reachable(PyObject *op, PyGC_Head *reachable)
* If gc_refs == GC_UNTRACKED, it must be ignored. * If gc_refs == GC_UNTRACKED, it must be ignored.
*/ */
else { else {
@ -191,7 +194,7 @@ diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmo
} }
} }
return 0; return 0;
@@ -427,7 +499,7 @@ move_unreachable(PyGC_Head *young, PyGC_ @@ -467,7 +539,7 @@ move_unreachable(PyGC_Head *young, PyGC_Head *unreachable)
*/ */
PyObject *op = FROM_GC(gc); PyObject *op = FROM_GC(gc);
traverseproc traverse = Py_TYPE(op)->tp_traverse; traverseproc traverse = Py_TYPE(op)->tp_traverse;
@ -200,7 +203,7 @@ diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmo
gc->gc.gc_refs = GC_REACHABLE; gc->gc.gc_refs = GC_REACHABLE;
(void) traverse(op, (void) traverse(op,
(visitproc)visit_reachable, (visitproc)visit_reachable,
@@ -494,7 +566,8 @@ move_finalizers(PyGC_Head *unreachable, @@ -545,7 +617,8 @@ move_finalizers(PyGC_Head *unreachable, PyGC_Head *finalizers)
for (gc = unreachable->gc.gc_next; gc != unreachable; gc = next) { for (gc = unreachable->gc.gc_next; gc != unreachable; gc = next) {
PyObject *op = FROM_GC(gc); PyObject *op = FROM_GC(gc);
@ -210,7 +213,7 @@ diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmo
next = gc->gc.gc_next; next = gc->gc.gc_next;
if (has_finalizer(op)) { if (has_finalizer(op)) {
@@ -570,7 +643,7 @@ handle_weakrefs(PyGC_Head *unreachable, @@ -621,7 +694,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
PyWeakReference **wrlist; PyWeakReference **wrlist;
op = FROM_GC(gc); op = FROM_GC(gc);
@ -219,7 +222,7 @@ diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmo
next = gc->gc.gc_next; next = gc->gc.gc_next;
if (! PyType_SUPPORTS_WEAKREFS(Py_TYPE(op))) if (! PyType_SUPPORTS_WEAKREFS(Py_TYPE(op)))
@@ -591,9 +664,9 @@ handle_weakrefs(PyGC_Head *unreachable, @@ -642,9 +715,9 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
* the callback pointer intact. Obscure: it also * the callback pointer intact. Obscure: it also
* changes *wrlist. * changes *wrlist.
*/ */
@ -231,7 +234,7 @@ diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmo
if (wr->wr_callback == NULL) if (wr->wr_callback == NULL)
continue; /* no callback */ continue; /* no callback */
@@ -627,7 +700,7 @@ handle_weakrefs(PyGC_Head *unreachable, @@ -678,7 +751,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
*/ */
if (IS_TENTATIVELY_UNREACHABLE(wr)) if (IS_TENTATIVELY_UNREACHABLE(wr))
continue; continue;
@ -240,7 +243,7 @@ diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmo
/* Create a new reference so that wr can't go away /* Create a new reference so that wr can't go away
* before we can process it again. * before we can process it again.
@@ -636,7 +709,8 @@ handle_weakrefs(PyGC_Head *unreachable, @@ -687,7 +760,8 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
/* Move wr to wrcb_to_call, for the next pass. */ /* Move wr to wrcb_to_call, for the next pass. */
wrasgc = AS_GC(wr); wrasgc = AS_GC(wr);
@ -250,7 +253,7 @@ diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmo
next isn't, so they can't next isn't, so they can't
be the same */ be the same */
gc_list_move(wrasgc, &wrcb_to_call); gc_list_move(wrasgc, &wrcb_to_call);
@@ -652,11 +726,11 @@ handle_weakrefs(PyGC_Head *unreachable, @@ -703,11 +777,11 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
gc = wrcb_to_call.gc.gc_next; gc = wrcb_to_call.gc.gc_next;
op = FROM_GC(gc); op = FROM_GC(gc);
@ -265,7 +268,7 @@ diff -up Python-2.7.3/Modules/gcmodule.c.gc-assertions Python-2.7.3/Modules/gcmo
/* copy-paste of weakrefobject.c's handle_callback() */ /* copy-paste of weakrefobject.c's handle_callback() */
temp = PyObject_CallFunctionObjArgs(callback, wr, NULL); temp = PyObject_CallFunctionObjArgs(callback, wr, NULL);
@@ -759,7 +833,7 @@ delete_garbage(PyGC_Head *collectable, P @@ -810,7 +884,7 @@ delete_garbage(PyGC_Head *collectable, PyGC_Head *old)
PyGC_Head *gc = collectable->gc.gc_next; PyGC_Head *gc = collectable->gc.gc_next;
PyObject *op = FROM_GC(gc); PyObject *op = FROM_GC(gc);

View File

@ -1,14 +0,0 @@
diff -up Python-2.7.3/Lib/test/test_support.py.rhbz913732 Python-2.7.3/Lib/test/test_support.py
--- Python-2.7.3/Lib/test/test_support.py.rhbz913732 2013-03-04 16:11:53.757315921 -0500
+++ Python-2.7.3/Lib/test/test_support.py 2013-03-04 16:12:11.331314722 -0500
@@ -304,7 +304,8 @@ def bind_port(sock, host=HOST):
if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) == 1:
raise TestFailed("tests should never set the SO_REUSEADDR " \
"socket option on TCP/IP sockets!")
- if hasattr(socket, 'SO_REUSEPORT'):
+ if hasattr(socket, 'SO_REUSEPORT') \
+ and 'WITHIN_PYTHON_RPM_BUILD' not in os.environ: # rhbz#913732
try:
if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1:
raise TestFailed("tests should never set the SO_REUSEPORT " \
"socket option on TCP/IP sockets!")

View File

@ -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')

View File

@ -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))

View File

@ -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)'

View File

@ -1,249 +0,0 @@
diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
index 14c9adb..e20104e 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"]
@@ -43,6 +44,8 @@ def _run_pip(args, additional_paths=None):
# Install the bundled software
import pip
+ if args[0] in ["install", "list", "wheel"]:
+ args.append('--pre')
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 ca33158..44bdde5 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1066,7 +1066,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 \

View File

@ -1,22 +0,0 @@
diff --git a/Python/random.c b/Python/random.c
index 2f83b5d..4cae217 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -97,8 +97,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
}
/* Issue #25003: Don't use getentropy() on Solaris (available since
- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
-#elif defined(HAVE_GETENTROPY) && !defined(sun)
+ Solaris 11.3), it is blocking whereas os.urandom() should not block.
+
+ Issue #29188: Don't use getentropy() on Linux since the glibc 2.24
+ implements it with the getrandom() syscall which can fail with ENOSYS,
+ and this error is not supported in py_getentropy() and getrandom() is called
+ with flags=0 which blocks until system urandom is initialized, which is not
+ the desired behaviour to seed the Python hash secret nor for os.urandom():
+ see the PEP 524 which was only implemented in Python 3.6. */
+#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux)
#define PY_GETENTROPY 1
/* Fill buffer with size pseudo-random bytes generated by getentropy().

View File

@ -1,45 +0,0 @@
diff --git a/Lib/distutils/cmd.py b/Lib/distutils/cmd.py
index c89d5ef..dd61621 100644
--- a/Lib/distutils/cmd.py
+++ b/Lib/distutils/cmd.py
@@ -296,7 +296,8 @@ class Command:
finalized command object.
"""
cmd_obj = self.distribution.get_command_obj(command, create)
- cmd_obj.ensure_finalized()
+ if cmd_obj is not None:
+ cmd_obj.ensure_finalized()
return cmd_obj
# XXX rename to 'get_reinitialized_command()'? (should do the
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index 8174192..30ca739 100644
--- a/Lib/distutils/command/install.py
+++ b/Lib/distutils/command/install.py
@@ -122,6 +122,8 @@ class install(Command):
"force installation (overwrite any existing files)"),
('skip-build', None,
"skip rebuilding everything (for testing/debugging)"),
+ ('executable=', 'e',
+ "specify final destination interpreter path (install.py)"),
# Where to install documentation (eventually!)
#('doc-format=', None, "format of documentation to generate"),
@@ -194,6 +196,7 @@ class install(Command):
# directory not in sys.path.
self.force = 0
self.skip_build = 0
+ self.executable = None
self.warn_dir = 1
# These are only here as a conduit from the 'build' command to the
@@ -365,6 +368,9 @@ class install(Command):
('build_base', 'build_base'),
('build_lib', 'build_lib'))
+ if self.executable is None:
+ self.executable = os.path.normpath(sys.executable)
+
# Punt on doc directories for now -- after all, we're punting on
# documentation completely!

View File

@ -0,0 +1,69 @@
diff --git a/setup.py b/setup.py
index 585e380..9993f11 100644
--- a/setup.py
+++ b/setup.py
@@ -1346,11 +1346,7 @@ class PyBuildExt(build_ext):
else:
missing.append('resource')
- nis = self._detect_nis(inc_dirs, lib_dirs)
- if nis is not None:
- exts.append(nis)
- else:
- missing.append('nis')
+ # nis (Sun yellow pages) is handled in Setup.dist
# Curses support, requiring the System V version of curses, often
# provided by the ncurses library.
@@ -2162,51 +2158,6 @@ class PyBuildExt(build_ext):
# for dlopen, see bpo-32647
ext.libraries.append('dl')
- def _detect_nis(self, inc_dirs, lib_dirs):
- if host_platform in {'win32', 'cygwin', 'qnx6'}:
- return None
-
- libs = []
- library_dirs = []
- includes_dirs = []
-
- # bpo-32521: glibc has deprecated Sun RPC for some time. Fedora 28
- # moved headers and libraries to libtirpc and libnsl. The headers
- # are in tircp and nsl sub directories.
- rpcsvc_inc = find_file(
- 'rpcsvc/yp_prot.h', inc_dirs,
- [os.path.join(inc_dir, 'nsl') for inc_dir in inc_dirs]
- )
- rpc_inc = find_file(
- 'rpc/rpc.h', inc_dirs,
- [os.path.join(inc_dir, 'tirpc') for inc_dir in inc_dirs]
- )
- if rpcsvc_inc is None or rpc_inc is None:
- # not found
- return None
- includes_dirs.extend(rpcsvc_inc)
- includes_dirs.extend(rpc_inc)
-
- if self.compiler.find_library_file(lib_dirs, 'nsl'):
- libs.append('nsl')
- else:
- # libnsl-devel: check for libnsl in nsl/ subdirectory
- nsl_dirs = [os.path.join(lib_dir, 'nsl') for lib_dir in lib_dirs]
- libnsl = self.compiler.find_library_file(nsl_dirs, 'nsl')
- if libnsl is not None:
- library_dirs.append(os.path.dirname(libnsl))
- libs.append('nsl')
-
- if self.compiler.find_library_file(lib_dirs, 'tirpc'):
- libs.append('tirpc')
-
- return Extension(
- 'nis', ['nismodule.c'],
- libraries=libs,
- library_dirs=library_dirs,
- include_dirs=includes_dirs
- )
-
class PyBuildInstall(install):
# Suppress the warning about installation into the lib_dynload

2
pynche
View File

@ -1,2 +1,2 @@
#!/bin/bash #!/bin/bash
exec `python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific = True))"`/pynche/pynche exec `python2 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific = True))"`/pynche/pynche

View File

@ -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...)
@ -111,13 +111,13 @@
-#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere -#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere
-#termios termios.c # Steen Lumholt's termios module -#termios termios.c # Steen Lumholt's termios module
-#resource resource.c # Jeremy Hylton's rlimit interface -#resource resource.c # Jeremy Hylton's rlimit interface
+nis nismodule.c -lnsl # Sun yellow pages -- not everywhere +nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib/nsl
+termios termios.c # Steen Lumholt's termios module +termios termios.c # Steen Lumholt's termios module
+resource resource.c # Jeremy Hylton's rlimit interface +resource resource.c # Jeremy Hylton's rlimit interface
# 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

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
SHA512 (Python-2.7.13.tar.xz) = f37c9a28ce129d01e63c84d7db627a06402854578f62d17927334ea21ede318e04bbf66e890e3f47c85333e6b19f6e5581fb3f3e27efd24be27017d1b6529c4b SHA512 (Python-2.7.16.tar.xz) = 16e814e8dcffc707b595ca2919bd2fa3db0d15794c63d977364652c4a5b92e90e72b8c9e1cc83b5020398bd90a1b397dbdd7cb931c49f1aa4af6ef95414b43e0

19
tests/tests.yml Normal file
View File

@ -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