[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-29 Thread Poor Yorick

Poor Yorick added the comment:

An attempt to build python-2.7.9 resulted in this error:

renaming readline since importing it failed ... undefined symbol: UP

This happened because setup.py chose -lncursesw as the readline terminal
library. Although libncursesw.so itself links to libtinfow.so, in order to
succeed with the --as-needed linker flag, setup.py would have to directly
choose libtinfow.so.  The part of the patch that deals with that does not rely
on the other changes that were made to accomodate -isystem in CPPFLAGS.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23284
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-29 Thread Poor Yorick

Poor Yorick added the comment:

ldd was found.  That patch does abstract and generalize ldd usage into a
function for reuse.  I'm building Python as part of a rather large software
collection that lives in an alternate prefix.  The main issue with the termcap
library is that with the --as-needed linker flag, which more modern build
systems prefer, linking to libncurses.so isn't sufficient, even when
libncurses.so itself links to libtinfo.so, but that's what setup.py decides to
do.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23284
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-29 Thread Poor Yorick

Poor Yorick added the comment:

The wholesale inclusion of two additional files makes the patch look larger
than it is.  The modifications to setup.py address three different issues.  The
modifications for each issue don't overlap much, so they could be cherry-picked
fairly easily.  For the readline issue, all that's needed is the new function,
ldd_find_library_file and then the changes from line 704 to about line 773
that deal directly with readline and ncurses.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23284
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-29 Thread Poor Yorick

Poor Yorick added the comment:

Larger changes represent more work on the part of the submitter ;) 
The following should reproduce the readline problem:

Have the current setup.py detect as the readline termcap library a
libncurses.so that itself links against libtinfo.so.  Without the --as-needed
flag, this is sufficient, since libtinfo ends up being indirectly linked to
readline.so, through libncurses.so.  Not that it was ever the right approach,
but absent --as-needed, it happens to work. 

Then, make sure the --as-needed flag is passed to the link command for the
readline.so module.  In that case, even though there is a -lncurses argument,
the linke will not link libncurses.so to readline.so because readline.so
doesn't directly need any symbols provided by libncurses.so.  The readline
module will then fail to load because terminal library symbols like UP will be
missing.

Without --as-needed, superfluous links between shared objects proliferate
through a software collection.  --as-needed is becoming more common, so it
would be good if setup.py didn't break because of it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23284
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-29 Thread Poor Yorick

Poor Yorick added the comment:

Ths OS is RHEL 6, but that's not so important because the entire collection,
including readline, is built from source and installed into an alternate
location.  With the exception of a few essential shared objects from the
system, everything else is contained in the alternate location.  Here's what
the readline INSTALL document says:

Readline uses the termcap functions, but does not link with the termcap or
curses library itself, allowing applications which link with readline 
to choose an appropriate library.

So if you don't monkey with the readline distribution, but build and install it
as-is, you get a libreadline.so that's not linked to a termcap library.  That's
the situation for our software collection.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23284
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-20 Thread Poor Yorick

Changes by Poor Yorick pooryor...@users.sourceforge.net:


--
keywords: +patch
Added file: http://bugs.python.org/file37796/34d54cc5ecfd.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23284
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-20 Thread Poor Yorick

New submission from Poor Yorick:

Building Python-2.7.9 using --prefix, with an ncurses that's linked to libtinfo
and a readline that isn't linked to any termcap library, I ran into the trouble
that the curses module wan't buing build with the needed -L and -l flags for
the libtinfo shared object.  I dug into setup.py, and ended up overhauling the
readline, curses, and also dbm handling (more on that in another ticket).  I
also made changes to allow setup.py to pick up options like -isystem from
$CPPFLAGS, replacing in the process the optparse module with the argparse
module.  Since argparse requires collections.OrderedDict, which isn't yet built
at this stage, I added Lib_boot/argparse_boot.py, which uses the pure-Python
OrderedDict from

https://pypi.python.org/pypi/ordereddict

and had setup.py use argparse_boot module instead.

The build also ran into trouble with system directories that setup.py
explicitly adds to inc_dirs and lib_dirs ahead of those of the alternate
prefix.

The attached files fixed all these issues in my scenario, allowing a succesful
build and install of Python-2.7.9.

--
components: Build
hgrepos: 290
messages: 234399
nosy: pooryorick
priority: normal
severity: normal
status: open
title: curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23284
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-20 Thread Poor Yorick

Changes by Poor Yorick pooryor...@users.sourceforge.net:


--
hgrepos:  -290

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23284
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-20 Thread Poor Yorick

Changes by Poor Yorick pooryor...@users.sourceforge.net:


--
hgrepos: +291

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23284
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-20 Thread Poor Yorick

Changes by Poor Yorick pooryor...@users.sourceforge.net:


--
hgrepos: +292

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23284
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23284] curses, readline, tinfo, and also --prefix, dbm, CPPFLAGS

2015-01-20 Thread Poor Yorick

Changes by Poor Yorick pooryor...@users.sourceforge.net:


--
hgrepos:  -291

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23284
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8701] tarfile: first character of member names doubled

2010-05-13 Thread Poor Yorick

Poor Yorick pooryor...@users.sourceforge.net added the comment:

I can't reproduce it now, either.

--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8701
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8701] tarfile: first character of member names doubled

2010-05-12 Thread Poor Yorick

New submission from Poor Yorick pooryor...@users.sourceforge.net:

In the following file, for python 2.6.4, tarfile.list doubles the first 
character of each member name:

http://watson.nci.nih.gov/cran_mirror/src/contrib/Archive/time/time_1.0.tar.gz

gnu tar handles the file correctly

--
components: Library (Lib)
messages: 105609
nosy: pooryorick
priority: normal
severity: normal
status: open
title: tarfile: first character of member names doubled
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8701
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6363] __future__ statements break doctest

2009-06-30 Thread Poor Yorick

Poor Yorick pooryor...@users.sourceforge.net added the comment:

It seems that compile does not recognize some flags:

Python 3.1 (r31:73574, Jun 26 2009, 20:21:35) [MSC v.1500 32 bit
(Intel)] on win
32
Type help, copyright, credits or license for more information.
 import __future__
 compile('a=5', 'string', 'single',
__future__.print_function.compiler_flag
)
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: compile(): unrecognised flags

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6363
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6363] __future__ statements break doctest

2009-06-30 Thread Poor Yorick

Poor Yorick pooryor...@users.sourceforge.net added the comment:

here is a monkey patch to work around the problem:

import __future__
import doctest
if sys.version_info.major  2:
_extract_future_flags_old = doctest._extract_future_flags
def _extract_future_flags(globs):
flags = _extract_future_flags_old(globs)
flags = flags  ~__future__.division.compiler_flag
flags = flags  ~__future__.absolute_import.compiler_
flags = flags  ~__future__.nested_scopes.compiler_fl
flags = flags  ~__future__.print_function.compiler_f
flags = flags  ~__future__.unicode_literals.compiler
flags = flags  ~__future__.with_statement.compiler_f
return flags
doctest._extract_future_flags = _extract_future_flags

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6363
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6363] __future__ statements break doctest

2009-06-28 Thread Poor Yorick

New submission from Poor Yorick pooryor...@users.sourceforge.net:

(this error also occurs with print_function)

Python 3.1 (r31:73574, Jun 26 2009, 20:21:35) [MSC v.1500 32 bit
(Intel)] on win
32
Type help, copyright, credits or license for more information.
 from __future__ import unicode_literals
 import doctest
 def func1():
...'''
... func1()
...hello
...'''
...print('hello')
...
 doctest.testmod()
**
File __main__, line 3, in __main__.func1
Failed example:
func1()
Exception raised:
Traceback (most recent call last):
  File c:\Python31\lib\doctest.py, line 1242, in __run
compileflags, 1), test.globs)
ValueError: compile(): unrecognised flags
**
1 items had failures:
   1 of   1 in __main__.func1
***Test Failed*** 1 failures.
TestResults(failed=1, attempted=1)

--
components: Library (Lib)
messages: 89807
nosy: pooryorick
severity: normal
status: open
title: __future__ statements break doctest
versions: Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6363
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5447] future unicode literals and r'\u'

2009-03-08 Thread Poor Yorick

New submission from Poor Yorick pooryor...@users.sourceforge.net:

from __future__ import unicode_literals
print(r'\u.bug')

SyntaxError: (unicode error) truncated \u

--
components: Interpreter Core
message_count: 1.0
messages: 83326
nosy: pooryorick
nosy_count: 1.0
severity: normal
status: open
title: future unicode literals and r'\u'
type: compile error
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5447
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5074] python3 and ctypes, script causes crash

2009-01-26 Thread Poor Yorick

New submission from Poor Yorick pooryor...@users.sourceforge.net:

the following script causes python3 to crash on my Windows XP Pro  Machine:

import ctypes

b = ctypes.windll.Kernel32
var1 = 'TEMP'
out = ctypes.create_string_buffer(40) 
c = b.GetEnvironmentVariableW(var1,out,40)
print('ones', c, out, out.raw)
print('two: ', dir(out))

--
assignee: theller
components: ctypes
messages: 80611
nosy: pooryorick, theller
severity: normal
status: open
title: python3 and ctypes, script causes crash
type: crash
versions: Python 3.0

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5074
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com