Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-31 Thread William Stein
On Wed, Mar 31, 2010 at 3:49 AM, Peter Jeremy wrote: > On 2010-Mar-29 16:08:48 -0700, William Stein wrote: >>Let's make some system-wide Python a prerequisite.  Full stop. > > It's not quite 1st April even here. This is not an April fools joke. > > I could understand Python being a prerequisite

Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-31 Thread Peter Jeremy
On 2010-Mar-29 16:08:48 -0700, William Stein wrote: >Let's make some system-wide Python a prerequisite. Full stop. It's not quite 1st April even here. I could understand Python being a prerequisite if Sage was going to use it at runtime but requiring it to be present solely to build another cop

Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-30 Thread Robert Bradshaw
As a partial answer to the original question, in Sage one can do sage: is_package_installed('python') True On Mar 30, 2010, at 10:02 AM, William Stein wrote: On Tue, Mar 30, 2010 at 8:04 AM, Simon King wrote: Hi Dave, On Mar 30, 2:50 pm, David Kirkby wrote: ... I can see there might be

Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-30 Thread William Stein
On Tue, Mar 30, 2010 at 8:04 AM, Simon King wrote: > Hi Dave, > > On Mar 30, 2:50 pm, David Kirkby wrote: >> ... >> I can see there might be even more Solaris issues! >> >> Since python 3 is not backward compatible with python 2, there could >> be even more problems in future. > > Probably one co

[sage-devel] Re: How to test whether a package is installed?

2010-03-30 Thread Simon King
Hi Dave, On Mar 30, 2:50 pm, David Kirkby wrote: > ... > I can see there might be even more Solaris issues! > > Since python 3 is not backward compatible with python 2, there could > be even more problems in future. Probably one could write a simple Python script that is both executable in Pytho

Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-30 Thread David Kirkby
On 30 March 2010 14:00, Dima Pasechnik wrote: > Dave, > > On Mar 30, 3:21 am, "Dr. David Kirkby" > wrote: > [...] >> What I do find odd is to make >> Python a prerequisite, then also include the python sources too. That >> means people are going to need to have two copies of python. > > most like

[sage-devel] Re: How to test whether a package is installed?

2010-03-30 Thread Dima Pasechnik
Dave, On Mar 30, 3:21 am, "Dr. David Kirkby" wrote: [...] > What I do find odd is to make > Python a prerequisite, then also include the python sources too. That > means people are going to need to have two copies of python. most likely, two different versions. E.g. Debian stable does not have P

Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-29 Thread William Stein
On Mon, Mar 29, 2010 at 4:05 PM, Dr. David Kirkby wrote: > Nils Bruin wrote: >> >> On Mar 28, 9:10 pm, William Stein wrote: >> >>> I'm for allowing the use of Python in the Sage build system. >> >> It seems to me that with a little care one could have python used in >> some parts of the build sys

Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-29 Thread Dr. David Kirkby
Nils Bruin wrote: On Mar 28, 9:10 pm, William Stein wrote: I'm for allowing the use of Python in the Sage build system. It seems to me that with a little care one could have python used in some parts of the build system and avoid declaring python a prerequisite for python. Yes, I think so

[sage-devel] Re: How to test whether a package is installed?

2010-03-29 Thread Nils Bruin
On Mar 28, 9:10 pm, William Stein wrote: > I'm for allowing the use of Python in the Sage build system. It seems to me that with a little care one could have python used in some parts of the build system and avoid declaring python a prerequisite for python. If a package "requires" another spkg,

[sage-devel] Re: How to test whether a package is installed?

2010-03-29 Thread Dr. David Kirkby
On Mar 29, 8:01 pm, "Georg S. Weber" wrote: > > Python is not a sledgehammer; it is an elegant tool, which can be used > > to produces beautiful readable maintainable and portable code. > > > > Anyway, it's your decision. > > > I'm for allowing the use of Python in the Sage build system. > > >  

[sage-devel] Re: How to test whether a package is installed?

2010-03-29 Thread Georg S. Weber
> > Python is not a sledgehammer; it is an elegant tool, which can be used > to produces beautiful readable maintainable and portable code. > > > Anyway, it's your decision. > > I'm for allowing the use of Python in the Sage build system. > >  -- William Under $SAGRE_ROOT/local/bin/, several of th

Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-28 Thread William Stein
On Sun, Mar 28, 2010 at 6:50 PM, Dr. David Kirkby wrote: > It is true that the system needs an install of python, but there may not be > one present. I would assume some of the cut-down distributions of Linux do > not include python. Does Cygwin install it by default? Building Sage on Cygwin -- w

Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-28 Thread Dr. David Kirkby
William Stein wrote: On Sun, Mar 28, 2010 at 3:31 PM, Dr. David Kirkby wrote: William Stein wrote: Regarding the implementation of that script, you could maybe check for ls returning an error (or whatever) as above. However, better would be to write something in Python, e.g., #!/usr/bin/env

Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-28 Thread William Stein
On Sun, Mar 28, 2010 at 4:02 PM, Simon King wrote: > Hi David, > > On 29 Mrz., 00:31, "Dr. David Kirkby" wrote: >> ... >> That's not going to work until python is installed. Why not make it a shell >> script instead - it would work before python is built, irrespective of >> whether >> someone ha

[sage-devel] Re: How to test whether a package is installed?

2010-03-28 Thread Simon King
Hi David, On 29 Mrz., 00:31, "Dr. David Kirkby" wrote: > ... > That's not going to work until python is installed. Why not make it a shell > script instead - it would work before python is built, irrespective of whether > someone has python installed on their machine. For the application that I

Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-28 Thread William Stein
On Sun, Mar 28, 2010 at 3:31 PM, Dr. David Kirkby wrote: > William Stein wrote: > >> Regarding the implementation of that script, you could maybe check for >> ls returning an error (or whatever) as above.  However, better >> would be to write something in Python, e.g., >> >> #!/usr/bin/env python

Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-28 Thread Dr. David Kirkby
William Stein wrote: Regarding the implementation of that script, you could maybe check for ls returning an error (or whatever) as above. However, better would be to write something in Python, e.g., #!/usr/bin/env python import os # do something with os.listdir() --- By factoring out this

Re: [sage-devel] Re: How to test whether a package is installed?

2010-03-28 Thread William Stein
On Sun, Mar 28, 2010 at 12:33 PM, Simon King wrote: > Hi William! > > On 28 Mrz., 19:55, William Stein wrote: >> ... >> No.  newest_version is irrelevant.  One should look at spk/installed/ > > So, one would test whether >  ls spkg/installed/database_gap* > results in an error? Hmm. I think the

[sage-devel] Re: How to test whether a package is installed?

2010-03-28 Thread Simon King
Hi William! On 28 Mrz., 19:55, William Stein wrote: > ... > No.  newest_version is irrelevant.  One should look at spk/installed/ So, one would test whether ls spkg/installed/database_gap* results in an error? Cheers, Simon -- To post to this group, send an email to sage-devel@googlegroups.