Re: [Distutils] Importable wheels using distlib/distil

2013-03-29 Thread Nick Coghlan
On Fri, Mar 29, 2013 at 2:02 AM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Thanks for the feedback. How about if I change mount()/unmount() to: def mount(self, append=False, destdir=None): Unzip the wheel's contents to the specified directory, or to a temporary

Re: [Distutils] Importable wheels using distlib/distil

2013-03-29 Thread PJ Eby
On Fri, Mar 29, 2013 at 3:55 PM, Nick Coghlan ncogh...@gmail.com wrote: No, mutating sys.path for versioned imports is a broken design. You end up with two possibilities: * If you append, then you can't override modules that have a default version available on sys.path. This is not an

Re: [Distutils] Importable wheels using distlib/distil

2013-03-29 Thread Nick Coghlan
On Sat, Mar 30, 2013 at 6:42 AM, PJ Eby p...@telecommunity.com wrote: On Fri, Mar 29, 2013 at 3:55 PM, Nick Coghlan ncogh...@gmail.com wrote: No, mutating sys.path for versioned imports is a broken design. You end up with two possibilities: * If you append, then you can't override modules

Re: [Distutils] Importable wheels using distlib/distil

2013-03-29 Thread PJ Eby
On Fri, Mar 29, 2013 at 4:50 PM, Nick Coghlan ncogh...@gmail.com wrote: On Sat, Mar 30, 2013 at 6:42 AM, PJ Eby p...@telecommunity.com wrote: On Fri, Mar 29, 2013 at 3:55 PM, Nick Coghlan ncogh...@gmail.com wrote: No, mutating sys.path for versioned imports is a broken design. You end up with

Re: [Distutils] Importable wheels using distlib/distil

2013-03-29 Thread Nick Coghlan
On Sat, Mar 30, 2013 at 8:52 AM, PJ Eby p...@telecommunity.com wrote: On Fri, Mar 29, 2013 at 4:50 PM, Nick Coghlan ncogh...@gmail.com wrote: You don't lose the place where you want the inserts to happen. Without the marker, you end up having to come up with a heuristic for make insertions

Re: [Distutils] Importable wheels using distlib/distil

2013-03-28 Thread Vinay Sajip
Jim Fulton jim at zope.com writes: It would be far better IMO to just unzip the wheel and put that in your path. (I'm hoping that wheels used this way are a suitable replacement for eggs.) Well that's tantamount to installing the wheel, Not really. If you just unzip the wheel and

Re: [Distutils] Importable wheels using distlib/distil

2013-03-28 Thread Paul Moore
On 28 March 2013 16:02, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Return this directory. Note that the caller is responsible for deleting this directory and its contents, which might not be possible - e.g. in Windows, if a shared library has been imported and is linked

Re: [Distutils] Importable wheels using distlib/distil

2013-03-28 Thread Jim Fulton
On Thu, Mar 28, 2013 at 12:02 PM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Jim Fulton jim at zope.com writes: It would be far better IMO to just unzip the wheel and put that in your path. (I'm hoping that wheels used this way are a suitable replacement for eggs.) Well that's

Re: [Distutils] Importable wheels using distlib/distil

2013-03-28 Thread Thomas Heller
Am 28.03.2013 17:42, schrieb Paul Moore: On 28 March 2013 16:02, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Return this directory. Note that the caller is responsible for deleting this directory and its contents, which might not be possible - e.g. in Windows, if a shared

Re: [Distutils] Importable wheels using distlib/distil

2013-03-28 Thread Vinay Sajip
Jim Fulton jim at zope.com writes: So the win for buildout and it's users is to be able to have extracted (but not installed wheels) around to be mixed and matched either for script generation or run-time use. If I wasn't using buildout, I kinda doubt I'd want to use something like this

[Distutils] Importable wheels using distlib/distil

2013-03-27 Thread Vinay Sajip
I'm not top-posting, but trying to keep GMane happy ... Since wheels are .zip files, they can sometimes be used to provide functionality without needing to be installed. Whereas .zip files contain no convention for indicating compatibility with a particular Python, wheels do contain this

Re: [Distutils] Importable wheels using distlib/distil

2013-03-27 Thread Jim Fulton
On Wed, Mar 27, 2013 at 3:21 PM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: I'm not top-posting, but trying to keep GMane happy ... Since wheels are .zip files, they can sometimes be used to provide functionality without needing to be installed. Whereas .zip files contain no convention for

Re: [Distutils] Importable wheels using distlib/distil

2013-03-27 Thread Vinay Sajip
Jim Fulton jim at zope.com writes: It's a trap! At least on Unix systems: - Extensions in zip files that get magically extracted to a user's home directory lead to tragic deployment failures for services that run as special users. I can see how it would lead to problems, but the

Re: [Distutils] Importable wheels using distlib/distil

2013-03-27 Thread Jim Fulton
On Wed, Mar 27, 2013 at 4:50 PM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Jim Fulton jim at zope.com writes: It's a trap! At least on Unix systems: - Extensions in zip files that get magically extracted to a user's home directory lead to tragic deployment failures for services that

Re: [Distutils] Importable wheels using distlib/distil

2013-03-27 Thread Ralf Schmitt
Jim Fulton j...@zope.com writes: Anywhere you extract them is likely going to lead to access control or security issues and generally cause pain, IMO. right! search the web for PYTHON_EGG_CACHE. ___ Distutils-SIG maillist - Distutils-SIG@python.org

Re: [Distutils] Importable wheels using distlib/distil

2013-03-27 Thread Paul Moore
On 27 March 2013 21:06, Jim Fulton j...@zope.com wrote: - AFAIK eggs allow you to import extensions from zip in a similar fashion. Importing from zipped eggs has proved itself to be an anti pattern. I don't like the idea of making wheels work like eggs in this respect. As Jim said, (zipped)