Author: Matti Picus <matti.pi...@gmail.com> Branch: Changeset: r98194:d5e7cbe1eb5f Date: 2019-11-30 17:58 +0000 http://bitbucket.org/pypy/pypy/changeset/d5e7cbe1eb5f/
Log: fixes for CentOS 6 (manylinux image) diff --git a/pypy/module/_minimal_curses/fficurses.py b/pypy/module/_minimal_curses/fficurses.py --- a/pypy/module/_minimal_curses/fficurses.py +++ b/pypy/module/_minimal_curses/fficurses.py @@ -7,8 +7,16 @@ # We cannot trust ncurses5-config, it's broken in various ways in # various versions. For example it might not list -ltinfo even though -# it's needed, or --cflags might be completely empty. On Ubuntu 10.04 -# it gives -I/usr/include/ncurses, which doesn't exist at all. Crap. +# it's needed, or --cflags might be completely empty. Crap. + +IS_CENTOS_6_10 = False +try: + with open('/etc/redhat-release') as fid: + for line in fid: + if 'CentOS release 6.10' in line: + IS_CENTOS_6_10 = True +except IOError: + pass def try_cflags(): yield ExternalCompilationInfo(includes=['curses.h', 'term.h']) @@ -20,8 +28,9 @@ 'ncurses/term.h']) def try_ldflags(): + yield ExternalCompilationInfo(libraries=['curses', 'tinfo']) yield ExternalCompilationInfo(libraries=['curses']) - yield ExternalCompilationInfo(libraries=['curses', 'tinfo']) + yield ExternalCompilationInfo(libraries=['ncurses', 'tinfo']) yield ExternalCompilationInfo(libraries=['ncurses']) yield ExternalCompilationInfo(libraries=['ncurses'], library_dirs=['/usr/lib64']) @@ -29,6 +38,8 @@ library_dirs=['/usr/lib64']) def try_tools(): + if IS_CENTOS_6_10: + return try: yield ExternalCompilationInfo.from_pkg_config("ncurses") except Exception: diff --git a/pypy/module/zlib/test/test_zlib.py b/pypy/module/zlib/test/test_zlib.py --- a/pypy/module/zlib/test/test_zlib.py +++ b/pypy/module/zlib/test/test_zlib.py @@ -345,7 +345,7 @@ assert (d1 + from_copy) == (d1 + from_compressor) - @py.test.mark.skipif(rzlib.ZLIB_VERSION == '1.2.8', reason='does not error check') + @py.test.mark.skipif(rzlib.ZLIB_VERSION in ('1.2.8', '1.2.3'), reason='does not error check') def test_cannot_copy_compressor_with_stream_in_inconsistent_state(self): if self.runappdirect: skip("can't run with -A") compressor = self.zlib.compressobj() _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit