Re: [Distutils] entry points PEP

2013-07-20 Thread Paul Moore
On 19 July 2013 23:22, Monty Taylor monty.tay...@gmail.com wrote: Yeah. Not moving to zc.buildout for anything. I believe it will be a better option to just write by-hand scripts that get installed that just do: from nova.rootwrap import cmd return cmd.main(sys.argv) or something.

Re: [Distutils] entry points PEP

2013-07-20 Thread Doug Hellmann
On Jul 19, 2013, at 6:22 PM, Monty Taylor monty.tay...@gmail.com wrote: Yeah. Not moving to zc.buildout for anything. I believe it will be a better option to just write by-hand scripts that get installed that just do: from nova.rootwrap import cmd return cmd.main(sys.argv) or

Re: [Distutils] entry points PEP

2013-07-20 Thread Monty Taylor
https://review.openstack.org/#/c/38000/ On not-Windows, install a non-pkg_resources based script content. On windows, defer to underlying setuptools functionality. (the test failures showing on the patch were build farm issues which we just sorted, I'll run-check the patch once the farm is good)

Re: [Distutils] entry points PEP

2013-07-19 Thread Paul Moore
On 18 July 2013 23:51, Daniel Holth dho...@gmail.com wrote: On Thu, Jul 18, 2013 at 6:42 PM, Nick Coghlan ncogh...@gmail.com wrote: I actually now plan to make scripts and exports first class citizens in PEP 426, with pydist-scripts.json and pydist-exports.json as extracted summary files

Re: [Distutils] entry points PEP

2013-07-19 Thread Nick Coghlan
On 19 July 2013 18:28, Paul Moore p.f.mo...@gmail.com wrote: This is just the metadata. I would assume that the console-scripts/gui-scripts entry pointdefinitions in setuptools would be extracted and put into the scripts metadata, and any non-script entry points would go into exports. The

Re: [Distutils] entry points PEP

2013-07-19 Thread Robert Collins
On 19 July 2013 01:03, Daniel Holth dho...@gmail.com wrote: Abstract This PEP proposes a way to represent the setuptools “entry points” feature in standard Python metadata. Entry points are a useful mechanism for advertising or discovering plugins or other exported functionality without

Re: [Distutils] entry points PEP

2013-07-19 Thread Vinay Sajip
Robert Collins robertc at robertcollins.net writes: So my question here would be - can we make it faster? We have just been diagnosing a performance problem in nova due to rootwrap being a pkg_resources scripts entry point : just getting to the first line of main() takes 200ms, and we make

Re: [Distutils] entry points PEP

2013-07-19 Thread Robert Collins
On 19 July 2013 21:24, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Robert Collins robertc at robertcollins.net writes: So my question here would be - can we make it faster? We have just been diagnosing a performance problem in nova due to rootwrap being a pkg_resources scripts entry point :

Re: [Distutils] entry points PEP

2013-07-19 Thread Paul Moore
On 19 July 2013 09:35, Nick Coghlan ncogh...@gmail.com wrote: Not sure, I hadn't even the idea of letting people register arbitrary we install this script. Heck, I haven't even worked out what I want the format to look like :) That's the big legacy issue. The old distutils script= argument

Re: [Distutils] entry points PEP

2013-07-19 Thread Daniel Holth
On Fri, Jul 19, 2013 at 5:32 AM, Robert Collins robe...@robertcollins.net wrote: On 19 July 2013 21:24, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Robert Collins robertc at robertcollins.net writes: So my question here would be - can we make it faster? We have just been diagnosing a

Re: [Distutils] entry points PEP

2013-07-19 Thread Joe Gordon
I have gone ahead and gathered some information using our standard development environment, devstack, I ran cProfile on our application, with the contents of it mocked out, http://paste.openstack.org/show/40948/ When I try importing pkg_resources in our development environment it is very slow:

Re: [Distutils] entry points PEP

2013-07-19 Thread Daniel Holth
On Fri, Jul 19, 2013 at 6:10 PM, Joe Gordon joe.gord...@gmail.com wrote: On Fri, Jul 19, 2013 at 1:42 PM, PJ Eby p...@telecommunity.com wrote: On Fri, Jul 19, 2013 at 2:09 PM, Joe Gordon joe.gord...@gmail.com wrote: When I try importing pkg_resources in our development environment it is

Re: [Distutils] entry points PEP

2013-07-19 Thread Joe Gordon
On Fri, Jul 19, 2013 at 1:42 PM, PJ Eby p...@telecommunity.com wrote: On Fri, Jul 19, 2013 at 2:09 PM, Joe Gordon joe.gord...@gmail.com wrote: When I try importing pkg_resources in our development environment it is very slow: Use zc.buildout to install the application you're invoking, and

Re: [Distutils] entry points PEP

2013-07-19 Thread Monty Taylor
Yeah. Not moving to zc.buildout for anything. I believe it will be a better option to just write by-hand scripts that get installed that just do: from nova.rootwrap import cmd return cmd.main(sys.argv) or something. Basically, a tiny boiler-plate script that does the same thing as a

Re: [Distutils] entry points PEP

2013-07-19 Thread PJ Eby
On Fri, Jul 19, 2013 at 2:09 PM, Joe Gordon joe.gord...@gmail.com wrote: When I try importing pkg_resources in our development environment it is very slow: Use zc.buildout to install the application you're invoking, and then it won't need to import pkg_resources. (Unless the actual app uses

[Distutils] entry points PEP

2013-07-18 Thread Daniel Holth
Abstract This PEP proposes a way to represent the setuptools “entry points” feature in standard Python metadata. Entry points are a useful mechanism for advertising or discovering plugins or other exported functionality without having to depend on the module namespace. Since the feature is used

Re: [Distutils] entry points PEP

2013-07-18 Thread Paul Moore
On 18 July 2013 14:03, Daniel Holth dho...@gmail.com wrote: Abstract This PEP proposes a way to represent the setuptools “entry points” feature in standard Python metadata. Entry points are a useful mechanism for advertising or discovering plugins or other exported functionality without

Re: [Distutils] entry points PEP

2013-07-18 Thread Daniel Holth
On Thu, Jul 18, 2013 at 9:27 AM, Paul Moore p.f.mo...@gmail.com wrote: On 18 July 2013 14:03, Daniel Holth dho...@gmail.com wrote: Abstract This PEP proposes a way to represent the setuptools “entry points” feature in standard Python metadata. Entry points are a useful mechanism for

Re: [Distutils] entry points PEP

2013-07-18 Thread Vinay Sajip
Daniel Holth dholth at gmail.com writes: On Thu, Jul 18, 2013 at 9:27 AM, Paul Moore p.f.moore at gmail.com wrote: It is an extension so it can be a separate PEP, since there's enough to talk about in the main PEP. The document tries to write down what setuptools does in a straightforward

Re: [Distutils] entry points PEP

2013-07-18 Thread Daniel Holth
On Thu, Jul 18, 2013 at 1:50 PM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Daniel Holth dholth at gmail.com writes: On Thu, Jul 18, 2013 at 9:27 AM, Paul Moore p.f.moore at gmail.com wrote: It is an extension so it can be a separate PEP, since there's enough to talk about in the main PEP.

Re: [Distutils] entry points PEP

2013-07-18 Thread PJ Eby
On Thu, Jul 18, 2013 at 1:50 PM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Daniel Holth dholth at gmail.com writes: For one thing you can have more than one mysql = in the same sqlalchemy.dialects. I think in this instance the string parsing is Don't you say in the PEP about the key that It

Re: [Distutils] entry points PEP

2013-07-18 Thread Nick Coghlan
I actually now plan to make scripts and exports first class citizens in PEP 426, with pydist-scripts.json and pydist-exports.json as extracted summary files (like the existing pydist-dependencies.json). They're important enough to include directly. Cheers, Nick.

Re: [Distutils] entry points PEP

2013-07-18 Thread Daniel Holth
On Thu, Jul 18, 2013 at 6:42 PM, Nick Coghlan ncogh...@gmail.com wrote: I actually now plan to make scripts and exports first class citizens in PEP 426, with pydist-scripts.json and pydist-exports.json as extracted summary files (like the existing pydist-dependencies.json). They're important

Re: [Distutils] entry points PEP

2013-07-18 Thread Daniel Holth
OH -scripts would be the distutils-style scrips. On Thu, Jul 18, 2013 at 6:51 PM, Daniel Holth dho...@gmail.com wrote: On Thu, Jul 18, 2013 at 6:42 PM, Nick Coghlan ncogh...@gmail.com wrote: I actually now plan to make scripts and exports first class citizens in PEP 426, with