Re: [Distutils] setup.cfg new format proposal

2009-09-30 Thread Chris Withers
Tres Seaver wrote: You bothering the goats again, Chris? ;) pkginfo uses the standard information generated by the 'sdist', 'develop' and 'bdist_egg' commenads, and can even introspect installed packages on Python 2.6.x. It is documented here: http://packages.python.org/pkginfo/ Yep, I

Re: [Distutils] setup.cfg new format proposal

2009-09-23 Thread Floris Bruynooghe
On Fri, Sep 18, 2009 at 11:17:40AM +0100, Chris Withers wrote: Floris Bruynooghe wrote: On Fri, Sep 11, 2009 at 07:02:53PM +0200, Tarek Ziadé wrote: On Fri, Sep 11, 2009 at 6:32 PM, Floris Bruynooghe floris.bruynoo...@gmail.com wrote: On Fri, Sep 11, 2009 at 05:14:58PM +0200, Tarek Ziadé

Re: [Distutils] setup.cfg new format proposal

2009-09-22 Thread Ronald Oussoren
On 11 Sep, 2009, at 17:14, Tarek Ziadé wrote: - os_sysname - os_nodename - os_release - os_version - os_machine Os.uname() does have a usability issue: the various values don't have a clear meaning, nor even a clear mapping to marketing numbers. Examples: * os_sysname is darwin on a

Re: [Distutils] setup.cfg new format proposal

2009-09-21 Thread Ben Finney
David Lyon david.l...@preisshare.net writes: I don't know if you have checked lately but not many windows users these days even know what a command line even is. It's just plain unreasonable to expect windows users to resort to a command line in this day and age. No, I think the attitude of

Re: [Distutils] setup.cfg new format proposal

2009-09-21 Thread David Lyon
On Mon, 21 Sep 2009 16:52:22 +1000, Ben Finney ben+pyt...@benfinney.id.au wrote: It's just plain unreasonable to expect windows users to resort to a command line in this day and age. No, I think the attitude of these statements is unreasonable. I also find it staggeringly condescending.

Re: [Distutils] setup.cfg new format proposal

2009-09-21 Thread Ben Finney
David Lyon david.l...@preisshare.net writes: On Mon, 21 Sep 2009 16:52:22 +1000, Ben Finney ben+pyt...@benfinney.id.au wrote: It's just plain unreasonable to expect windows users to resort to a command line in this day and age. No, I think the attitude of these statements is

Re: [Distutils] setup.cfg new format proposal

2009-09-21 Thread Chris Withers
David Lyon wrote: Don't worry Chris, if your idea is good enough, it is going to get forked... Sorry, I misheard that last word, in which case I agree ;-) Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk

Re: [Distutils] setup.cfg new format proposal

2009-09-21 Thread David Lyon
On Mon, 21 Sep 2009 18:14:23 +1000, Ben Finney ben+pyt...@benfinney.id.au wrote: What? to say windows users don't like command lines... It's perfectly true. Not condescending. I know many users of systems who “don't like” command lines. You're going beyond that, though, and saying that it's

Re: [Distutils] setup.cfg new format proposal

2009-09-20 Thread David Lyon
On Fri, 18 Sep 2009 11:17:40 +0100, Chris Withers ch...@simplistix.co.uk wrote: A lot of these problems would go away if we could just treat Python as a package like every other package when it comes to dependencies. Why is that so hard to do? It's not hard at all. But somebody needs to

Re: [Distutils] setup.cfg new format proposal

2009-09-20 Thread David Lyon
On Wed, 16 Sep 2009 23:34:07 -0400, P.J. Eby p...@telecommunity.com wrote: An application needs to know what directory it has been installed in and where it can find configuration files and so forth. It appears I was unclear: it is not the application's business to *decide* what the

Re: [Distutils] setup.cfg new format proposal

2009-09-20 Thread P.J. Eby
At 10:26 PM 9/20/2009 -0400, David Lyon wrote: Eh? It's *possible* to specify it in those places now, but well-behaved packages never do. Not on windows, outside of the c:\pythonXY directory. Create a setup.cfg with an [install] section and you can make it install wherever you tell it

Re: [Distutils] setup.cfg new format proposal

2009-09-20 Thread David Lyon
On Sun, 20 Sep 2009 23:58:06 -0400, P.J. Eby p...@telecommunity.com wrote: If you are saying that Python observes all microsofts recommendations under windows and is well-behaved I think I'd have some comments about that. Well behaved is installing a python program to Program Files but distutils

Re: [Distutils] setup.cfg new format proposal

2009-09-19 Thread Tarek Ziadé
On Fri, Sep 18, 2009 at 8:13 PM, Sridhar Ratnakumar sridh...@activestate.com wrote: On Tue, 15 Sep 2009 17:42:24 -0700, exar...@twistedmatrix.com wrote: What use cases do we have?  There's the one described above, which lots of people have been talking about.  I think there's another one

Re: [Distutils] setup.cfg new format proposal

2009-09-18 Thread Chris Withers
Sridhar Ratnakumar wrote: I may be missing some context, but I did about an hour of googling around before responding here, and for the life of me I can't find a simple answer to the question: how do I currently programatically get the metadata out of a distribution?

Re: [Distutils] setup.cfg new format proposal

2009-09-18 Thread Chris Withers
Floris Bruynooghe wrote: On Fri, Sep 11, 2009 at 07:02:53PM +0200, Tarek Ziadé wrote: On Fri, Sep 11, 2009 at 6:32 PM, Floris Bruynooghe floris.bruynoo...@gmail.com wrote: On Fri, Sep 11, 2009 at 05:14:58PM +0200, Tarek Ziadé wrote: [...] That can be dropped since we have '==' and it's all

Re: [Distutils] setup.cfg new format proposal

2009-09-18 Thread Sridhar Ratnakumar
On Tue, 15 Sep 2009 17:42:24 -0700, exar...@twistedmatrix.com wrote: What use cases do we have? There's the one described above, which lots of people have been talking about. I think there's another one related to target Python version - eg, on Python 2.3, depend on simplejson, but on

Re: [Distutils] setup.cfg new format proposal

2009-09-18 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Withers wrote: Sridhar Ratnakumar wrote: I may be missing some context, but I did about an hour of googling around before responding here, and for the life of me I can't find a simple answer to the question: how do I currently

Re: [Distutils] setup.cfg new format proposal

2009-09-17 Thread P.J. Eby
At 12:41 PM 9/17/2009 +0200, Tarek Ziadé wrote: Also, if I understand clearly the idea, I find it rather cryptic to add conditions to each dependency like what Sridhar has shown. That's actually not how it would work; you simply put section headings inside the extras_require field, rather

Re: [Distutils] setup.cfg new format proposal

2009-09-17 Thread Sridhar Ratnakumar
On Thu, 17 Sep 2009 07:05:46 -0700, Tarek Ziadé ziade.ta...@gmail.com wrote: On Thu, Sep 17, 2009 at 3:53 PM, P.J. Eby p...@telecommunity.com wrote: At 12:41 PM 9/17/2009 +0200, Tarek Ziadé wrote: Also, if I understand clearly the idea, I find it rather cryptic to add conditions to each

Re: [Distutils] setup.cfg new format proposal

2009-09-16 Thread Greg Ewing
Sridhar Ratnakumar wrote: sys.platform 'linux2' linux2? What are the possible values for `sys.platform`? This is why I usually write Python code that checks sys.platform like if sys.platform.startswith(linux): ... So the condition language for the metadata needs a startswith

Re: [Distutils] setup.cfg new format proposal

2009-09-16 Thread Tarek Ziadé
On Wed, Sep 16, 2009 at 2:30 AM, Greg Ewing greg.ew...@canterbury.ac.nz wrote: Tarek Ziadé wrote: Imagine a command with the name foo, that has an option called condition. If you really want to keep the entire keyword namespace available for use as a section sees fit, it would be better to

Re: [Distutils] setup.cfg new format proposal

2009-09-16 Thread Tarek Ziadé
On Wed, Sep 16, 2009 at 2:42 AM, exar...@twistedmatrix.com wrote: What use cases do we have?  There's the one described above, which lots of people have been talking about.  I think there's another one related to target Python version - eg, on Python 2.3, depend on simplejson, but on Python

Re: [Distutils] setup.cfg new format proposal

2009-09-16 Thread Tarek Ziadé
On Wed, Sep 16, 2009 at 10:21 AM, Greg Ewing greg.ew...@canterbury.ac.nz wrote: Sridhar Ratnakumar wrote:   sys.platform   'linux2' linux2? What are the possible values for `sys.platform`? This is why I usually write Python code that checks sys.platform like  if

Re: [Distutils] setup.cfg new format proposal

2009-09-16 Thread Sridhar Ratnakumar
On Wed, 16 Sep 2009 09:14:32 -0700, P.J. Eby p...@telecommunity.com wrote: So if I resume, so far the uses cases are: - the OS given by os.name and sys.platform (linux/mac/windows/riscos/ce/ etc..) - the architecture, given by os.uname() (32/64 bits) - the python version, given

Re: [Distutils] setup.cfg new format proposal

2009-09-16 Thread Greg Ewing
Tarek Ziadé wrote: What about 'in' ? Yes, I guess that's good enough. -- Greg ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig

Re: [Distutils] setup.cfg new format proposal

2009-09-16 Thread David Lyon
On Wed, 16 Sep 2009 12:14:32 -0400, P.J. Eby wrote: Do we have anything besides dependencies that change based on the above? If not, then we might be able to address this with the extras syntax mechanism already present in install_requires, and we might able to do it without even changing

Re: [Distutils] setup.cfg new format proposal

2009-09-16 Thread P.J. Eby
At 08:10 PM 9/16/2009 -0400, David Lyon wrote: To answer the question, things like destination directory for applications could change ie /opt/myapp or \Program Files\myapp for linux and windows respectively. It's not the application's business what the installation directory is; certainly

Re: [Distutils] setup.cfg new format proposal

2009-09-16 Thread David Lyon
On Wed, 16 Sep 2009 22:01:20 -0400, P.J. Eby p...@telecommunity.com wrote: It's not the application's business what the installation directory is; Yes, but it very much is. An application needs to know what directory it has been installed in and where it can find configuration files and so

Re: [Distutils] setup.cfg new format proposal

2009-09-16 Thread P.J. Eby
At 10:13 PM 9/16/2009 -0400, David Lyon wrote: On Wed, 16 Sep 2009 22:01:20 -0400, P.J. Eby p...@telecommunity.com wrote: It's not the application's business what the installation directory is; Yes, but it very much is. An application needs to know what directory it has been installed in and

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread Tarek Ziadé
On Sun, Sep 13, 2009 at 2:56 AM, Greg Ewing greg.ew...@canterbury.ac.nz wrote: Tarek Ziadé wrote: [setup] foo: bar conditional-sections: one, two Is conditional-sections: really necessary? Isn't the presence of a conditions: line in a section enough to mark it as conditional? I find

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread Greg Ewing
Tarek Ziadé wrote: I find having a conditional section explicitely defined better that doing a convention on names because if someone implements a command that uses that name (it's likely to be improbable but...) it will break his ability to use setup.cfg to give options to his commands I

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread Tarek Ziadé
On Tue, Sep 15, 2009 at 10:47 AM, Greg Ewing greg.ew...@canterbury.ac.nz wrote: Tarek Ziadé wrote: I find having a conditional section explicitely defined better that doing a convention on names because if someone implements a command that uses that name (it's likely to be improbable but...)

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread Tarek Ziadé
On Tue, Sep 15, 2009 at 1:34 PM, Jeff Rush j...@taupro.com wrote: Tarek Ziadé wrote: Imagine a command with the name foo, that has an option called condition. The setup.cfg file might look like this: [global] verbose: 1 [setup] name: MyDistribution version: 1.0 [only_windows]

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread Floris Bruynooghe
On Fri, Sep 11, 2009 at 05:14:58PM +0200, Tarek Ziadé wrote: Also, I've just realized that uname() is a tuple, so I need to flatten it in strings to restrict the grammar: - os_sysname - os_nodename - os_release - os_version - os_machine When I asked for this I was imagening (wrongly) way

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread Tarek Ziadé
On Tue, Sep 15, 2009 at 5:46 PM, Floris Bruynooghe floris.bruynoo...@gmail.com wrote: On Fri, Sep 11, 2009 at 05:14:58PM +0200, Tarek Ziadé wrote: Also, I've just realized that uname() is a tuple, so I need to flatten it in strings to restrict the grammar: - os_sysname - os_nodename -

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread Tarek Ziadé
On Tue, Sep 15, 2009 at 5:44 PM, Floris Bruynooghe floris.bruynoo...@gmail.com wrote: That's quite nice, +1 And is it worth to consider erroring out when you have a [setup:.*] section without a condition: ... line? Sure, ___ Distutils-SIG maillist -

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread Sridhar Ratnakumar
On Mon, 14 Sep 2009 07:13:55 -0700, Glyph Lefkowitz gl...@twistedmatrix.com wrote: So you can for example define a list of dependencies that changes wether you are under windows or linux, etc.. OK. I've never had that situation. I'm sure someone has, but it doesn't see common. Twisted

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread Sridhar Ratnakumar
On Tue, 15 Sep 2009 02:00:41 -0700, Tarek Ziadé ziade.ta...@gmail.com wrote: [only_windows] condition: sys_platform == 'win32' requires: pywin32 I am ambivalent about using sys.platform. How do I specify Linux? sys.platform 'linux2' linux2? What are the possible values for

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread P.J. Eby
At 01:46 PM 9/15/2009 -0700, Sridhar Ratnakumar wrote: Conditional metadata for Python versions does not have to be very complicated in my opinion. Simply have the following in setup.cfg, and thus in PKG-INFO: install_requires = ['lxml', 'multiprocessing[pyver(2,6)]', 'argparse',

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread Tarek Ziadé
2009/9/15 Sridhar Ratnakumar sridh...@activestate.com: On Tue, 15 Sep 2009 02:00:41 -0700, Tarek Ziadé ziade.ta...@gmail.com wrote: [only_windows] condition: sys_platform == 'win32' requires: pywin32 I am ambivalent about using sys.platform. How do I specify Linux?   sys.platform  

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread David Lyon
On Tue, 15 Sep 2009 16:46:59 +0100, Floris Bruynooghe floris.bruynoo...@gmail.com wrote: On Fri, Sep 11, 2009 at 05:14:58PM +0200, Tarek Ziadé wrote: Also, I've just realized that uname() is a tuple, so I need to flatten it in strings to restrict the grammar: - os_sysname - os_nodename -

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread sstein...@gmail.com
On Sep 15, 2009, at 7:52 PM, David Lyon wrote: And imo the discussion has gone way off track.. The use case isn't abstract. All this discussion is about trying to rewrite two lines of code. -- setup.py -- if sys.platform == 'win32': setup.dependencies.add('win32com','162')

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread exarkun
On 12:09 am, sstein...@gmail.com wrote: On Sep 15, 2009, at 7:52 PM, David Lyon wrote: And imo the discussion has gone way off track.. The use case isn't abstract. All this discussion is about trying to rewrite two lines of code. -- setup.py -- if sys.platform == 'win32':

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread David Lyon
On Wed, 16 Sep 2009 00:42:24 -, exar...@twistedmatrix.com wrote: I don't think it's really this simple. If it isn't, then it should be made to be that simple... The point is to have static definition of the package information. It would be a huge win for everybody if we could get

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread Alex Grönholm
David Lyon kirjoitti: On Wed, 16 Sep 2009 00:42:24 -, exar...@twistedmatrix.com wrote: I don't think it's really this simple. If it isn't, then it should be made to be that simple... The point is to have static definition of the package information. It would be a

Re: [Distutils] setup.cfg new format proposal

2009-09-15 Thread sstein...@gmail.com
On Sep 15, 2009, at 8:42 PM, exar...@twistedmatrix.com wrote: What use cases do we have? There's the one described above, which lots of people have been talking about. I think there's another one related to target Python version - eg, on Python 2.3, depend on simplejson, but on Python

Re: [Distutils] setup.cfg new format proposal

2009-09-14 Thread Glyph Lefkowitz
On Fri, Sep 11, 2009 at 1:40 PM, Jim Fulton j...@zope.com wrote: On Fri, Sep 11, 2009 at 11:49 AM, Tarek Ziadé ziade.ta...@gmail.com wrote: On Fri, Sep 11, 2009 at 5:36 PM, Jim Fulton j...@zope.com wrote: On Fri, Sep 11, 2009 at 11:14 AM, Tarek Ziadé ziade.ta...@gmail.com wrote:

Re: [Distutils] setup.cfg new format proposal

2009-09-12 Thread Floris Bruynooghe
On Sat, Sep 12, 2009 at 02:52:17AM +0200, Tarek Ziadé wrote: On Fri, Sep 11, 2009 at 5:49 PM, Tarek Ziadé ziade.ta...@gmail.com wrote: I agree that more background and motivational information would be very helpful, as would some real world examples. I know that 90% (maybe 99% :) of the

Re: [Distutils] setup.cfg new format proposal

2009-09-12 Thread Floris Bruynooghe
On Fri, Sep 11, 2009 at 07:02:53PM +0200, Tarek Ziadé wrote: On Fri, Sep 11, 2009 at 6:32 PM, Floris Bruynooghe floris.bruynoo...@gmail.com wrote: On Fri, Sep 11, 2009 at 05:14:58PM +0200, Tarek Ziadé wrote: [...] That can be dropped since we have '==' and it's all strings. '2.6'

Re: [Distutils] setup.cfg new format proposal

2009-09-12 Thread Tarek Ziadé
On Sat, Sep 12, 2009 at 4:42 PM, Floris Bruynooghe floris.bruynoo...@gmail.com wrote: On Sat, Sep 12, 2009 at 02:52:17AM +0200, Tarek Ziadé wrote: On Fri, Sep 11, 2009 at 5:49 PM, Tarek Ziadé ziade.ta...@gmail.com wrote: I agree that more background and motivational information would be very

Re: [Distutils] setup.cfg new format proposal

2009-09-12 Thread Tarek Ziadé
On Sat, Sep 12, 2009 at 4:50 PM, Floris Bruynooghe floris.bruynoo...@gmail.com wrote: I can't think of a use case where in and == is not enough. Version comparison would be nice though.  Taking your example from your blog post: if I where to try to install that on Python 2.4 I'd have to edit

[Distutils] setup.cfg new format proposal

2009-09-11 Thread Tarek Ziadé
Hello here's a detailed proposal for the setup.cfg format. I've included all remarks, and tried to make the syntax as simple as possible. I've dropped the long_description stuff and the template language stuff. (people can do it as a post-release process) A/ Config file structure: [setup]

Re: [Distutils] setup.cfg new format proposal

2009-09-11 Thread exarkun
On 02:33 pm, ziade.ta...@gmail.com wrote: Hello here's a detailed proposal for the setup.cfg format. I've included all remarks, and tried to make the syntax as simple as possible. I've dropped the long_description stuff and the template language stuff. (people can do it as a post-release

Re: [Distutils] setup.cfg new format proposal

2009-09-11 Thread Tarek Ziadé
2009/9/11 exar...@twistedmatrix.com: On 02:33 pm, ziade.ta...@gmail.com wrote: Hello here's a detailed proposal for the setup.cfg format. I've included all remarks, and tried to make the syntax as simple as possible. I've dropped the long_description stuff and the template language

Re: [Distutils] setup.cfg new format proposal

2009-09-11 Thread Jim Fulton
On Fri, Sep 11, 2009 at 11:14 AM, Tarek Ziadé ziade.ta...@gmail.com wrote: 2009/9/11  exar...@twistedmatrix.com: On 02:33 pm, ziade.ta...@gmail.com wrote: I'm a little skeptical about creating a new mini language (particularly one with branching) for setup.cfg, Me too. but I haven't really

Re: [Distutils] setup.cfg new format proposal

2009-09-11 Thread Tarek Ziadé
On Fri, Sep 11, 2009 at 5:36 PM, Jim Fulton j...@zope.com wrote: On Fri, Sep 11, 2009 at 11:14 AM, Tarek Ziadé ziade.ta...@gmail.com wrote: 2009/9/11  exar...@twistedmatrix.com: On 02:33 pm, ziade.ta...@gmail.com wrote: I'm a little skeptical about creating a new mini language (particularly

Re: [Distutils] setup.cfg new format proposal

2009-09-11 Thread Floris Bruynooghe
On Fri, Sep 11, 2009 at 05:14:58PM +0200, Tarek Ziadé wrote: [...] That can be dropped since we have '==' and it's all strings. '2.6' '2.10'? Although not close you must be wary of this. Bring on PEP 386 ;-) Regards Floris -- Debian GNU/Linux -- The Power of Freedom www.debian.org |

Re: [Distutils] setup.cfg new format proposal

2009-09-11 Thread Tarek Ziadé
On Fri, Sep 11, 2009 at 6:32 PM, Floris Bruynooghe floris.bruynoo...@gmail.com wrote: On Fri, Sep 11, 2009 at 05:14:58PM +0200, Tarek Ziadé wrote: [...] That can be dropped since we have '==' and it's all strings. '2.6' '2.10'? Although not close you must be wary of this.  Bring on PEP 386

Re: [Distutils] setup.cfg new format proposal

2009-09-11 Thread Jim Fulton
On Fri, Sep 11, 2009 at 11:49 AM, Tarek Ziadé ziade.ta...@gmail.com wrote: On Fri, Sep 11, 2009 at 5:36 PM, Jim Fulton j...@zope.com wrote: On Fri, Sep 11, 2009 at 11:14 AM, Tarek Ziadé ziade.ta...@gmail.com wrote: 2009/9/11  exar...@twistedmatrix.com: On 02:33 pm, ziade.ta...@gmail.com wrote:

Re: [Distutils] setup.cfg new format proposal

2009-09-11 Thread Tarek Ziadé
On Fri, Sep 11, 2009 at 7:40 PM, Jim Fulton j...@zope.com wrote: The second motivation is : why do I need to run some code to get the metadata fields ? Turning the config file into code means you'd be running code. :) Well that's very different. You will be running a function that is

Re: [Distutils] setup.cfg new format proposal

2009-09-11 Thread P.J. Eby
At 12:28 AM 9/12/2009 +0200, Tarek Ziadé wrote: On Fri, Sep 11, 2009 at 7:40 PM, Jim Fulton j...@zope.com wrote: The second motivation is : why do I need to run some code to get the metadata fields ? Turning the config file into code means you'd be running code. :) Well that's very

Re: [Distutils] setup.cfg new format proposal

2009-09-11 Thread Tarek Ziadé
On Fri, Sep 11, 2009 at 5:49 PM, Tarek Ziadé ziade.ta...@gmail.com wrote: I agree that more background and motivational information would be very helpful, as would some real world examples. I know that 90% (maybe 99% :) of the packages I distribute don't adapt to their execution context

Re: [Distutils] setup.cfg new format proposal

2009-09-11 Thread P.J. Eby
At 02:50 AM 9/12/2009 +0200, Tarek Ziadé wrote: it means that we can even provide an XML-RPC service at PyPI so people can query the metadata for their platform with zero download and zero third-party code execution. Ah, now that does sound rather useful, as it would allow installation and