Mailing List Archive

[issue4082] python2.6 -m site doesn't run site._script() any more
New submission from Christian Heimes <lists@cheimes.de>:

python2.6 -m site used to print some status information to the console.
python3.0 -m site and python2.5 -m site are still working as expected.
An initial debug session showed that the site module isn't imported a
second time under the name __main__. I suspect a regression in runpy or
related code.

----------
components: Library (Lib)
messages: 74553
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: python2.6 -m site doesn't run site._script() any more
versions: Python 2.6, Python 2.7

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Changes by Christian Heimes <lists@cheimes.de>:


----------
type: -> behavior

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Benjamin Peterson <musiccomposition@gmail.com> added the comment:

I concur with the Christian's analysis:

$ python2.6 -m site
$ python2.6 -S -m site
[output....]

----------
nosy: +benjamin.peterson

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Changes by Benjamin Peterson <musiccomposition@gmail.com>:


----------
nosy: +ncoghlan

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Nick Coghlan <ncoghlan@gmail.com> added the comment:

Platform? It works fine for me (system python is 2.5, local python is
trunk - the tildes aren't actually in the printout, I subbed them in for
my home directory):

~/devel/python$ python -m site
sys.path = [.
'~/devel/python',
'/usr/lib/python25.zip',
'/usr/lib/python2.5',
'/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk',
'/usr/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/PIL',
'/var/lib/python-support/python2.5',
'/var/lib/python-support/python2.5/gtk-2.0',
]
ncoghlan@pseudopolis:~/devel/python$ ./python -m site
sys.path = [
'~/devel/python',
'/usr/local/lib/python27.zip',
'~/devel/python/Lib',
'~/devel/python/Lib/plat-linux2',
'~/devel/python/Lib/lib-tk',
'~/devel/python/Lib/lib-old',
'~/devel/python/Modules',
'~/devel/python/build/lib.linux-i686-2.7',
]
USER_BASE: '/home/ncoghlan/.local' (exists)
USER_SITE: '/home/ncoghlan/.local/lib/python2.7/site-packages' (doesn't
exist)
ENABLE_USER_SITE: True

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Changes by Nick Coghlan <ncoghlan@gmail.com>:


_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Nick Coghlan <ncoghlan@gmail.com> added the comment:

Platform? It works fine for me (system python is 2.5, local python is
trunk - the tildes aren't actually in the printout, I subbed them in for
my home directory):

~/devel/python$ python -m site
sys.path = [.
'~/devel/python',
'/usr/lib/python25.zip',
'/usr/lib/python2.5',
'/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk',
'/usr/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/PIL',
'/var/lib/python-support/python2.5',
'/var/lib/python-support/python2.5/gtk-2.0',
]
~/devel/python$ ./python -m site
sys.path = [
'~/devel/python',
'/usr/local/lib/python27.zip',
'~/devel/python/Lib',
'~/devel/python/Lib/plat-linux2',
'~/devel/python/Lib/lib-tk',
'~/devel/python/Lib/lib-old',
'~/devel/python/Modules',
'~/devel/python/build/lib.linux-i686-2.7',
]
USER_BASE: '/home/ncoghlan/.local' (exists)
USER_SITE: '/home/ncoghlan/.local/lib/python2.7/site-packages' (doesn't
exist)
ENABLE_USER_SITE: True

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Changes by Nick Coghlan <ncoghlan@gmail.com>:


_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Nick Coghlan <ncoghlan@gmail.com> added the comment:

Platform? It works fine for me (system python is 2.5, local python is
trunk - the tildes aren't actually in the printout, I subbed them in for
my home directory):

~/devel/python$ python -m site
sys.path = [.
'~/devel/python',
'/usr/lib/python25.zip',
'/usr/lib/python2.5',
'/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk',
'/usr/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/PIL',
'/var/lib/python-support/python2.5',
'/var/lib/python-support/python2.5/gtk-2.0',
]
ncoghlan@pseudopolis:~/devel/python$ ./python -m site
sys.path = [
'~/devel/python',
'/usr/local/lib/python27.zip',
'~/devel/python/Lib',
'~/devel/python/Lib/plat-linux2',
'~/devel/python/Lib/lib-tk',
'~/devel/python/Lib/lib-old',
'~/devel/python/Modules',
'~/devel/python/build/lib.linux-i686-2.7',
]
USER_BASE: '~/.local' (exists)
USER_SITE: '~/.local/lib/python2.7/site-packages' (doesn't
exist)
ENABLE_USER_SITE: True

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Changes by Nick Coghlan <ncoghlan@gmail.com>:


_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Nick Coghlan <ncoghlan@gmail.com> added the comment:

Platform? It works fine for me (system python is 2.5, local python is
trunk - the tildes aren't actually in the printout, I subbed them in for
my home directory):

~/devel/python$ python -m site
sys.path = [.
'~/devel/python',
'/usr/lib/python25.zip',
'/usr/lib/python2.5',
'/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk',
'/usr/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/PIL',
'/var/lib/python-support/python2.5',
'/var/lib/python-support/python2.5/gtk-2.0',
]
~/devel/python$ ./python -m site
sys.path = [
'~/devel/python',
'/usr/local/lib/python27.zip',
'~/devel/python/Lib',
'~/devel/python/Lib/plat-linux2',
'~/devel/python/Lib/lib-tk',
'~/devel/python/Lib/lib-old',
'~/devel/python/Modules',
'~/devel/python/build/lib.linux-i686-2.7',
]
USER_BASE: '~/.local' (exists)
USER_SITE: '~/.local/lib/python2.7/site-packages' (doesn't
exist)
ENABLE_USER_SITE: True

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Christian Heimes <lists@cheimes.de> added the comment:

It's an *installation* of Python 2.6.0 (r26:66714, Oct 2 2008) on
Ubuntu Linux AMD64. The feature is broken on the release26-maint branch
but it works fine on the trunk.

----------
versions: -Python 2.7

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Nick Coghlan <ncoghlan@gmail.com> added the comment:

I'm setting up a 2.6 working area now - we'll see what's to be seen once
I have that up and running. None of the runpy or pkgutil stuff has been
touched in months though (since PEP 366 was implemented), so I'm a
little puzzled how it could be working on the trunk and not on the 2.6
maintenance branch.

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Nick Coghlan <ncoghlan@gmail.com> added the comment:

No joy. 32-bit Ubuntu here, and "./python -m site" works fine on the 2.6
branch, as does "python2.6 -m site" after a "make altinstall".

Is this an installation you built yourself, or was it packaged by
someone else?

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Christian Heimes <lists@cheimes.de> added the comment:

I build the installation myself and used "make altinstall", too. Even
the latest checkout of the 2.6 branch fails to print the site information.

$ ./configure
...
$ make
...
$ ./python -m site
$ ./python -m platform
Linux-2.6.24-19-generic-x86_64-with-debian-lenny-sid
$ uname -a
Linux hamiller 2.6.24-19-generic #1 SMP Wed Aug 20 17:53:40 UTC 2008
x86_64 GNU/Linux
$ LC_ALL=C svn info .
Path: .
URL: svn+ssh://pythondev@svn.python.org/python/branches/release26-maint
Repository Root: svn+ssh://pythondev@svn.python.org
Repository UUID: 6015fed2-1504-0410-9fe1-9d1591cc4771
Revision: 66863
Node Kind: directory
Schedule: normal
Last Changed Author: georg.brandl
Last Changed Rev: 66859
Last Changed Date: 2008-10-08 21:28:36 +0200 (Wed, 08 Oct 2008)

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Nick Coghlan <ncoghlan@gmail.com> added the comment:

Hmm, that makes for absolutely identical base systems except that mine
is i686 where yours is x86_64.

What do you see if you stick some debugging messages at module level in
site.py? (e.g. printing out __name__)

(I'll be going offline shortly - I'll have another look tomorrow night,
but since I can't reproduce this locally I'm probably not going to be
much help in figuring out where it is losing the plot)

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4082] python2.6 -m site doesn't run site._script() any more [ In reply to ]
Christian Heimes <lists@cheimes.de> added the comment:

I already added a print __name__ right before the if __name__ ==
"__main__" block. Python 2.5, trunk and 3.0 print:

site
__main__

while Python 2.6 just prints:

site

Christian

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4082>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com