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] Get install prefix for module at runtime

2009-09-16 Thread Wolodja Wentland
On Tue, Sep 15, 2009 at 17:38 +0200, Wolodja Wentland wrote: My question is: How to reliably access data files from a module in foo? Approach 2 - writing a build.py file at installation time - The last question made me think, that

Re: [Distutils] Get install prefix for module at runtime

2009-09-16 Thread Wolodja Wentland
On Wed, Sep 16, 2009 at 17:40 +0200, Wolodja Wentland wrote: On Tue, Sep 15, 2009 at 17:38 +0200, Wolodja Wentland wrote: My question is: How to reliably access data files from a module in foo? Approach 2 - writing a build.py file at installation time

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] uses for setup.cfg and extracting data from it

2009-09-16 Thread Ben Finney
P.J. Eby p...@telecommunity.com writes: http://docs.python.org/distutils/apiref.html#module-distutils.core - specifically the run_setup() function. (It appears the docs do not have link anchors for individual functions, alas.)

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