Re: [Pythonmac-SIG] Python virtual environments on OS X

2011-07-20 Thread Vinay Sajip
Ronald Oussoren ronaldoussoren at mac.com writes:

 The 'env.cfg' file will be next to the stub executable, and hence not in a
location where the real
 interpreter will look.
 
  2. How does the stub locate the real executable?
 
 The stub is linked to the framework and uses that to find the sys.prefix, the
real executable is located in a
 fixed location relative to sys.prefix.
 
 That's one other difference w.r.t. regular builds: framework builds use the
location of the shared
 library to calculate sys.prefix. AFAIK this functionality was inherited from
the NextStep port. 

Here's the approach I've taken to this - please comment.

1. I modified the stub loader to set an environment variable
__PYTHONV_LAUNCHER__ to the absolute path of the stub executable itself. The
environment key seems unambiguous enough and shouldn't clash with anything else.
This might seem clunky, but seems the most obvious way to feed this information
to the real executable.
2. The stub is copied to an environment's bin folder (but nothing else is, for
the moment, though I've written the code to copy the dylib, Info.plist, real
executable etc it's currently commented out).
3. When the stub is run, it finds the framework executable in the usual way, and
runs it.
4. When the real executable gets control, code in site.py picks up the
environment variable's value and looks for the env.cfg relative to that 
location.

AFAICT this should be enough, since the real executable is executed from its
framework location and presumably has access to all tbe necessary context for
GUI applications, etc. I've verified that sys.site_prefix, sys.site_exec_prefix
and sys.path correctly point to the virtual environment.

I ran the full regression test suite in a virtual env, and only got failures in
test_lib2to3 and test_packaging (due to known issues with those tests writing
into write-protected locations - this happens with vanilla installed Python 3.3,
too).

 PyObjC supports Python 3, the site is very much out of date. I haven't found
time to redesign the site yet,
 which needs to be done because the maintanence scripts no longer work due to
some code reorganisations in
 PyObjC itself.

Are there instructions somewhere on how to build and integrate into a framework
build's Extras?

Regards,

Vinay Sajip

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


[Pythonmac-SIG] py2app under Lion--any issues?

2011-07-20 Thread Russell E. Owen
Will py2app to work to build Mac application bundles under Lion (MacOS X 
10.7)?

I'm using python.org 32-bit python and ActiveState Tcl/Tk 8.4.19 and 
trying to build self-contained Python/Tk apps that run on at least MacOS 
X 10.5 and later.

I assume there's no problems, but it would be very helpful to know what 
to watch out for if there are.

-- Russell

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] py2app application fails with ImportError: No module named sysconfig

2011-07-20 Thread Russell E. Owen
In article rowen-19af14.15315420072...@news.gmane.org,
 Russell E. Owen ro...@uw.edu wrote:

 I used py2app to build an application that i've been building for years, 
 only now it's failing at startup with the appended log.
 
 The problem is triggered by numpy 1.6.1fc3 (which I installed from 
 source). If I build using an older numpy I don't see the problem.
 
 However, the application runs just fine from the command line, so I'm 
 puzzled how it could be an actual bugin numpy. (If it is, though, now is 
 a great time to report it, before 1.6.1 is released).
 
 Any idea what might be causing this and how to avoid it? A google search 
 didn't turn up anything that looked relevant. 

To follow up on this, I have tested the following configurations (MacOS 
X 10.6.8 with MACOSX_DEPLOYMENT_TARGET=10.4):

build numpy 1.6.1fc3 from source: the only case that shows a problem. I 
built this numpy twice and both times saw the problem.

The following did not show the problem:
build numpy 1.5.1 from source
install numpy 1.5.1 using binary installer
install numpy 1.6.0 using binary installer

I also noticed that the module with the failing import 
(distutils/ccompiler.py) is identical in numpy 1.5.1 and 1.6.1fc3.

-- Russell

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Lion

2011-07-20 Thread Bill Janssen
Dan Ross d...@rosspixelworks.com wrote:

 Anyone have reports of Pythons on Lion?

It's Python 2.7.1 pre-installed in /System/Library, but I don't know
about PyObjC or Twisted.

Bill
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Lion

2011-07-20 Thread Aahz
On Wed, Jul 20, 2011, Dan Ross wrote:

 Anyone have reports of Pythons on Lion?

Are you asking about what's installed, what works, something else?

My company is getting ready for acceptance testing on Lion using 2.6.4.
-- 
Aahz (a...@pythoncraft.com)   * http://www.pythoncraft.com/

If you don't know what your program is supposed to do, you'd better not
start writing it.  --Dijkstra
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] py2app under Lion--any issues?

2011-07-20 Thread Aahz
On Wed, Jul 20, 2011, Russell E. Owen wrote:

 Will py2app to work to build Mac application bundles under Lion (MacOS X 
 10.7)?
 
 I'm using python.org 32-bit python and ActiveState Tcl/Tk 8.4.19 and 
 trying to build self-contained Python/Tk apps that run on at least MacOS 
 X 10.5 and later.
 
 I assume there's no problems, but it would be very helpful to know what 
 to watch out for if there are.

Works for us, but Lion always runs installs as root so you need to
update your flights to use su -u $USER for anything you previously did
as the default user.
-- 
Aahz (a...@pythoncraft.com)   * http://www.pythoncraft.com/

If you don't know what your program is supposed to do, you'd better not
start writing it.  --Dijkstra
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Lion

2011-07-20 Thread Ned Deily
In article c3f76eda-e6cd-4f97-8abf-a770f5a4c...@rosspixelworks.com,
 Dan Ross d...@rosspixelworks.com wrote:

 Installing python.org's framework should work shouldn't it?

The 64-bit/32-bin python.org installers (current releases are 3.2.1 and 
2.7.2) *should* work on 10.7 Lion.  I'm not so sure about the 
traditional 32-bit-only ones (the 10.3+ ones). As with 10.6, I expect 
you will need to install ActiveState Tcl/Tk 8.5 if you want to use 
Tkinter or IDLE as there have been some recent fixes for Cocoa Tk.   I 
just have completed downloading the official 10.7 release and should 
have some preliminary results posted by tomorrow.

http://www.python.org/download/
http://www.python.org/download/mac/tcltk/

-- 
 Ned Deily,
 n...@acm.org

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] py2app application fails with ImportError: No module named sysconfig

2011-07-20 Thread Ned Deily
In article rowen-efd413.16170920072...@news.gmane.org,
 Russell E. Owen ro...@uw.edu wrote:

 In article rowen-19af14.15315420072...@news.gmane.org,
  Russell E. Owen ro...@uw.edu wrote:
 
  I used py2app to build an application that i've been building for years, 
  only now it's failing at startup with the appended log.
  
  The problem is triggered by numpy 1.6.1fc3 (which I installed from 
  source). If I build using an older numpy I don't see the problem.
  
  However, the application runs just fine from the command line, so I'm 
  puzzled how it could be an actual bugin numpy. (If it is, though, now is 
  a great time to report it, before 1.6.1 is released).
  
  Any idea what might be causing this and how to avoid it? A google search 
  didn't turn up anything that looked relevant. 
 
 To follow up on this, I have tested the following configurations (MacOS 
 X 10.6.8 with MACOSX_DEPLOYMENT_TARGET=10.4):
 
 build numpy 1.6.1fc3 from source: the only case that shows a problem. I 
 built this numpy twice and both times saw the problem.
 
 The following did not show the problem:
 build numpy 1.5.1 from source
 install numpy 1.5.1 using binary installer
 install numpy 1.6.0 using binary installer
 
 I also noticed that the module with the failing import 
 (distutils/ccompiler.py) is identical in numpy 1.5.1 and 1.6.1fc3.

What version of Python 2.7 are you using?  And, if you built it 
yourself, what ./config options did you use?

-- 
 Ned Deily,
 n...@acm.org

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Lion

2011-07-20 Thread Dan Ross
I'm wondering if non-system Python will work since that's what I prefer using.


On Jul 20, 2011, at 7:14 PM, Aahz wrote:

 On Wed, Jul 20, 2011, Dan Ross wrote:
 
 Anyone have reports of Pythons on Lion?
 
 Are you asking about what's installed, what works, something else?
 
 My company is getting ready for acceptance testing on Lion using 2.6.4.
 -- 
 Aahz (a...@pythoncraft.com)   * http://www.pythoncraft.com/
 
 If you don't know what your program is supposed to do, you'd better not
 start writing it.  --Dijkstra
 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig
 unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Lion

2011-07-20 Thread Aahz
On Wed, Jul 20, 2011, Ned Deily wrote:
 In article c3f76eda-e6cd-4f97-8abf-a770f5a4c...@rosspixelworks.com,
  Dan Ross d...@rosspixelworks.com wrote:
 
 Installing python.org's framework should work shouldn't it?
 
 The 64-bit/32-bin python.org installers (current releases are 3.2.1 and 
 2.7.2) *should* work on 10.7 Lion.  I'm not so sure about the 
 traditional 32-bit-only ones (the 10.3+ ones). As with 10.6, I expect 
 you will need to install ActiveState Tcl/Tk 8.5 if you want to use 
 Tkinter or IDLE as there have been some recent fixes for Cocoa Tk.   I 
 just have completed downloading the official 10.7 release and should 
 have some preliminary results posted by tomorrow.

I'm not sure which 2.6.4 we're using, but it works with Lion.
-- 
Aahz (a...@pythoncraft.com)   * http://www.pythoncraft.com/

If you don't know what your program is supposed to do, you'd better not
start writing it.  --Dijkstra
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG