Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-18 Thread Ronald Oussoren


On 17 Sep, 2009, at 23:50, Bill Janssen wrote:


Ronald Oussoren ronaldousso...@mac.com wrote:


Bill,

Appscript probably gets installed as a zipped egg, the .python-eggs
directory gets created when a real filesystem path is needed for an
item in such an egg.


Yes, that's part of the problem.  The other part is that .pth handling
seems to have changed from 2.5 to 2.6.

If you install appscript as an unzipped egg the problem should go  
away.


How does one do that?


Either python setup.py bdist_egg and then use the right flags to  
easy_install; or add 'zip_safe = False' to the arguments of setup() in  
setup.py install install using python setup.py install.


Ronald



smime.p7s
Description: S/MIME cryptographic signature
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-18 Thread Ronald Oussoren


On 17 Sep, 2009, at 23:50, Bill Janssen wrote:


Ronald Oussoren ronaldousso...@mac.com wrote:


Bill,

Appscript probably gets installed as a zipped egg, the .python-eggs
directory gets created when a real filesystem path is needed for an
item in such an egg.


Yes, that's part of the problem.  The other part is that .pth handling
seems to have changed from 2.5 to 2.6.


That's news to me. I've been using zipped eggs with 2.6 without any  
problems.


Ronald



smime.p7s
Description: S/MIME cryptographic signature
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-18 Thread Bill Janssen
Ronald Oussoren ronaldousso...@mac.com wrote:

 
 On 17 Sep, 2009, at 23:50, Bill Janssen wrote:
 
  Ronald Oussoren ronaldousso...@mac.com wrote:
 
  Bill,
 
  Appscript probably gets installed as a zipped egg, the .python-eggs
  directory gets created when a real filesystem path is needed for an
  item in such an egg.
 
  Yes, that's part of the problem.  The other part is that .pth handling
  seems to have changed from 2.5 to 2.6.
 
  If you install appscript as an unzipped egg the problem should go
  away.
 
  How does one do that?
 
 Either python setup.py bdist_egg and then use the right flags to
 easy_install; or add 'zip_safe = False' to the arguments of setup() in
 setup.py install install using python setup.py install.

Thanks, Ronald.

Hmmm.  Neither seems ideal.  The first idea involves actually *using*
setuptools (easy_install), and the second involves editing the setup.py
file.

I suppose I could use python setup.py bdist_egg, then use unzip to
unpack it in the right place, too.

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


Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-18 Thread Bill Janssen
Ronald Oussoren ronaldousso...@mac.com wrote:

  Yes, that's part of the problem.  The other part is that .pth handling
  seems to have changed from 2.5 to 2.6.
 
 That's news to me. I've been using zipped eggs with 2.6 without any
 problems.

Don't know that it had anything to do with eggs.  What I was seeing was
different sys.path construction between 2.5 and 2.6, both on SL.  In
2.5, it went through and added the directories specified by .pth files
in /Library/Python/2.5/site-packages; in 2.6, it didn't.  Perhaps I'm
just misunderstanding the way the processing of .pth files works.

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


Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-17 Thread Bill Janssen
Ronald Oussoren ronaldousso...@mac.com wrote:

 Bill,
 
 Appscript probably gets installed as a zipped egg, the .python-eggs
 directory gets created when a real filesystem path is needed for an
 item in such an egg.

Yes, that's part of the problem.  The other part is that .pth handling
seems to have changed from 2.5 to 2.6.

 If you install appscript as an unzipped egg the problem should go away.

How does one do that?

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


Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-17 Thread Aahz
On Thu, Sep 17, 2009, Bill Janssen wrote:
 Ronald Oussoren ronaldousso...@mac.com wrote:
 
 If you install appscript as an unzipped egg the problem should go away.
 
 How does one do that?

You can unzip manually as with any other .ZIP file, or you can do
easy_install with -Z.
-- 
Aahz (a...@pythoncraft.com)   * http://www.pythoncraft.com/

I won't accept a model of the universe in which free will, omniscient
gods, and atheism are simultaneously true.  --M
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-17 Thread Ned Deily
In article 20090917234722.gb26...@panix.com,
 Aahz a...@pythoncraft.com wrote:
 On Thu, Sep 17, 2009, Bill Janssen wrote:
  Ronald Oussoren ronaldousso...@mac.com wrote:
  If you install appscript as an unzipped egg the problem should go away.
  How does one do that? 
 You can unzip manually as with any other .ZIP file, or you can do
 easy_install with -Z.

... and if you always want to install eggs unzipped, add the following 
to one of the distutils config files, i.e. ~/.pydistutils.cfg:

[easy_install]
zip-ok = 0

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

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


Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-14 Thread Bill Janssen
has hengist.p...@virgin.net wrote:

 On 13 Sep 2009, at 18:52, Bill Janssen wrote:
 
  Is it possible to disentangle appscript from setuptools?  I just
  downloaded the sources to my Snow Leopard machine, did
 
  python setup.py build
  python setup.py install
 
  which went just fine.  But then I did
 
  % python
  import appscript
 
  and got this big stack trace because a ~/.python-eggs subdirectory
  wasn't accessible.  That shouldn't happen, and I'd like to remove
  any dependence on setuptools and eggs, if possible.
 
 
 
 You can install appscript from source using plain old distutils; the
 setup.py script will use setuptools if it's available and distutils if
 not. Though if there are problems with setuptools then I'd suggest
 filing bug reports on that as well.

I'd like to suggest an option to use distutils even if setuptools is
available.

Filing bug reports on setuptools seems like a losing proposition; I'd
have to understand how it works first.  How about *you* file the bug
reports there?  You're the one using it.

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


Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-14 Thread has


On 14 Sep 2009, at 16:28, Bill Janssen wrote:


has hengist.p...@virgin.net wrote:


You can install appscript from source using plain old distutils; the
setup.py script will use setuptools if it's available and distutils  
if

not. Though if there are problems with setuptools then I'd suggest
filing bug reports on that as well.


I'd like to suggest an option to use distutils even if setuptools is
available.


Don't know how that could be done automatically as both use the same  
setup.py file. If you want to do it manually, replace the first five  
lines in the setup.py script with this:


from distutils.core import setup, Extension



Filing bug reports on setuptools seems like a losing proposition; I'd
have to understand how it works first.  How about *you* file the bug
reports there?  You're the one using it.


I've not had any problems using it myself.

Regards,

has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net

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


Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-13 Thread Ronald Oussoren

Bill,

Appscript probably gets installed as a zipped egg, the .python-eggs  
directory gets created when a real filesystem path is needed for an  
item in such an egg.


If you install appscript as an unzipped egg the problem should go away.

Ronald



On 13 sep 2009, at 19:52, Bill Janssen jans...@parc.com wrote:


Is it possible to disentangle appscript from setuptools?  I just
downloaded the sources to my Snow Leopard machine, did

python setup.py build
python setup.py install

which went just fine.  But then I did

% python

import appscript


and got this big stack trace because a ~/.python-eggs subdirectory
wasn't accessible.  That shouldn't happen, and I'd like to remove
any dependence on setuptools and eggs, if possible.

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

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


Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-13 Thread Aahz
On Sun, Sep 13, 2009, Ronald Oussoren wrote:

 Appscript probably gets installed as a zipped egg, the .python-eggs  
 directory gets created when a real filesystem path is needed for an item 
 in such an egg.

 If you install appscript as an unzipped egg the problem should go away.

My auto-installer for the packages needed by my company's product now
includes -Z for everything.  It also unzips setuptools if needed.
-- 
Aahz (a...@pythoncraft.com)   * http://www.pythoncraft.com/

It's 106 miles to Chicago.  We have a full tank of gas, a half-pack of
cigarettes, it's dark, and we're wearing sunglasses.  Hit it.
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig