Re: [Cs-dev] scons version
Date | 2007-11-02 09:04 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] scons version |
My problem is more one of building several python modules in the same machine. To do this, I need to: 1. remove the MacPython framework from its install place, to build for Apple's 2.3 2. put it back, to build for MacPython. 3. I can't build 2.4 and 2.5 without moving things inside the framework (so I don't bother). Now the installer is easy: it just places the 2.3 in /System/... and 2.4 in /Library/... Can you keep us informed on how best this is supposed to be handled? Or if there are any new packaging instructions? Also back to your gcc problem, I always used the compiler tools that came with my Intel mac, so was unaware of the problem. It might be, as they said, that apple shipped a duff set of tools and you were unlucky. I suppose it is all OK now. The manual instructions were the best of our knowledge at the time, and we can add your information (but mark it as 'Intel Macs only') because I am quite sure it does apply to PPC. As I said before, I built Csound 5 on OSX since the beginning on all sorts of gccs (I think even on 2.2 to start with), with no such issues. Victor > > There is a discussion happening at the moment on the > Python-Mac SIG (pythonmac-sig@python.org) on Apple's > increasing interest in Python + packaging issues. > I think it's quite important to get the mac OSX build > happening so it doesn't matter which version of python > (or ipython) a user is using - it detects "which python" > and build/installs it in the appropriate place for that. > This comes from my sense that centrally, one spends > one's time in python accessing all sorts of libraries, > including csound so it makes sense to put csound in > relation to python not the other way around. > > (I was going to leave it until the next version to mention > it but I think csnd would be more appropriate in it's > own folder in the site- packages directory. That way we > can add csnd-specific examples) and any other crud in an > incremental way. > > A lot of people get confused by the packaging stuff. I > wrote a note about it in case anyone wants some > clarification: > http://www.avatar.com.au/sonipy/pythonInstall.html > > David > PS Victor, thanks for the csnd.Csound() tip. > _________________________________________________ > experimental polymedia: www.avatar.com.au > Sonic Communications Research Group, > University of Canberra: creative.canberra.edu.au/scrg/ > > > > ---------------------------------------------------------- > --------------- This SF.net email is sponsored by: Splunk > Inc. Still grepping through log files to find problems? > Stop. Now Search log events and configuration files using > AJAX and a browser. Download your FREE copy of Splunk now > >> http://get.splunk.com/ > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2007-11-05 06:15 |
From | David Worrall |
Subject | Re: [Cs-dev] scons version |
I haven't gotten around to building a scons install (yet) so to a certain extent I'm talking through my hat. However I do move stuff into the current site-packages directory automatically. Here's how I do it... (modified to current filenames)..... Given that one can always find out what the currently instantiated python is by using the sys module's prefix variable, one can compute the appropriate location for csnd.py etc packDir = sys.prefix + '/lib/python'+sys.prefix[string.rfind(strA, '/')+1:]+'/site-packages' ( eg. on my machine.. sys.prefix == '/Library/Frameworks/Python.framework/Versions/ 2.4' ) so packageDir == '/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages' ) Then make a csnd directory in the site-packages directory and place your csnd.py therein. Also in this csnd dir, make a file named __init__.py in which you place the command 'from csnd import *' other code such as examples can then also be placed in this csnd directory and accessed as using the '.' notation (eg if there's a myCsndEg.py file in this packageDir. >>> import csnd.myCnsdEg will load it --------------- to compile for a different version of python, change the 'Current ' symlink at /Library/Frameworks/Python.framework/Versions/Current to point to whatever version you want (I think I've used it like this to point back to the /System/Library/ 2.3 version as well) Then run a scons build with the above and it should install with the correct python in the correct subdirectories. Perhaps I'm missing something which means it can't be done this way? Probably... :-) ciao, David On 02/11/2007, at 8:04 PM, Victor Lazzarini wrote: > My problem is more one of building several > python modules in the same machine. To do this, I > need to: > > 1. remove the MacPython framework from its install > place, to build for Apple's 2.3 > 2. put it back, to build for MacPython. > 3. I can't build 2.4 and 2.5 without moving > things inside the framework (so I don't bother). > > Now the installer is easy: it just places the 2.3 > in /System/... and 2.4 in /Library/... > > Can you keep us informed on how best this is supposed > to be handled? Or if there are any new packaging > instructions? > > Also back to your gcc problem, I always used the > compiler tools that came with my Intel mac, so > was unaware of the problem. It might be, as they > said, that apple shipped a duff set of tools and > you were unlucky. I suppose it is all OK now. > The manual instructions were the best of our > knowledge at the time, and we can add your > information (but mark it as 'Intel Macs only') > because I am quite sure it does apply to PPC. > As I said before, I built Csound 5 on OSX since > the beginning on all sorts of gccs (I think > even on 2.2 to start with), with no such issues. > > Victor > >> >> There is a discussion happening at the moment on the >> Python-Mac SIG (pythonmac-sig@python.org) on Apple's >> increasing interest in Python + packaging issues. >> I think it's quite important to get the mac OSX build >> happening so it doesn't matter which version of python >> (or ipython) a user is using - it detects "which python" >> and build/installs it in the appropriate place for that. >> This comes from my sense that centrally, one spends >> one's time in python accessing all sorts of libraries, >> including csound so it makes sense to put csound in >> relation to python not the other way around. >> >> (I was going to leave it until the next version to mention >> it but I think csnd would be more appropriate in it's >> own folder in the site- packages directory. That way we >> can add csnd-specific examples) and any other crud in an >> incremental way. >> >> A lot of people get confused by the packaging stuff. I >> wrote a note about it in case anyone wants some >> clarification: >> http://www.avatar.com.au/sonipy/pythonInstall.html >> >> David >> PS Victor, thanks for the csnd.Csound() tip. >> _________________________________________________ >> experimental polymedia: www.avatar.com.au >> Sonic Communications Research Group, >> University of Canberra: creative.canberra.edu.au/scrg/ >> >> >> >> ---------------------------------------------------------- >> --------------- This SF.net email is sponsored by: Splunk >> Inc. Still grepping through log files to find problems? >> Stop. Now Search log events and configuration files using >> AJAX and a browser. Download your FREE copy of Splunk now >>>> http://get.splunk.com/ >> _______________________________________________ >> Csound-devel mailing list >> Csound-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/csound-devel > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > _________________________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: creative.canberra.edu.au/scrg/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2007-11-05 11:10 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] scons version |
I know you can change the symbolic link to do change macPython versions, but to build for the Mac supplied python, the framework has to be moved out of its place (otherwise the linker will pick it up before apple's). My build already looks for the python version, but because I don't use scons install (as I am build installers), I have a script to place the csnd module in the right place. I will for the next release put it in the site-packages subdir (at the moment I put it in lib). Victor At 06:15 05/11/2007, you wrote: >I haven't gotten around to building a scons install (yet) so to a >certain extent I'm talking through my hat. >However I do move stuff into the current site-packages directory >automatically. >Here's how I do it... (modified to current filenames)..... > >Given that one can always find out what the currently instantiated >python is by using the sys module's prefix variable, one can compute >the appropriate location for csnd.py etc > >packDir = sys.prefix + '/lib/python'+sys.prefix[string.rfind(strA, >'/')+1:]+'/site-packages' >( eg. on my machine.. >sys.prefix == '/Library/Frameworks/Python.framework/Versions/ >2.4' ) so >packageDir == '/Library/Frameworks/Python.framework/Versions/2.4/lib/ >python2.4/site-packages' >) >Then make a csnd directory in the site-packages directory and place >your csnd.py therein. >Also in this csnd dir, make a file named __init__.py in which you >place the command >'from csnd import *' > >other code such as examples can then also be placed in this csnd >directory and accessed as using the '.' notation >(eg if there's a myCsndEg.py file in this packageDir. > >>> import csnd.myCnsdEg >will load it > >--------------- >to compile for a different version of python, change the 'Current ' >symlink at >/Library/Frameworks/Python.framework/Versions/Current >to point to whatever version you want (I think I've used it like this >to point back to the /System/Library/ 2.3 version as well) > >Then run a scons build with the above and it should install with the >correct python in the correct subdirectories. > > >Perhaps I'm missing something which means it can't be done this way? >Probably... :-) > >ciao, > >David >On 02/11/2007, at 8:04 PM, Victor Lazzarini wrote: > > > My problem is more one of building several > > python modules in the same machine. To do this, I > > need to: > > > > 1. remove the MacPython framework from its install > > place, to build for Apple's 2.3 > > 2. put it back, to build for MacPython. > > 3. I can't build 2.4 and 2.5 without moving > > things inside the framework (so I don't bother). > > > > Now the installer is easy: it just places the 2.3 > > in /System/... and 2.4 in /Library/... > > > > Can you keep us informed on how best this is supposed > > to be handled? Or if there are any new packaging > > instructions? > > > > Also back to your gcc problem, I always used the > > compiler tools that came with my Intel mac, so > > was unaware of the problem. It might be, as they > > said, that apple shipped a duff set of tools and > > you were unlucky. I suppose it is all OK now. > > The manual instructions were the best of our > > knowledge at the time, and we can add your > > information (but mark it as 'Intel Macs only') > > because I am quite sure it does apply to PPC. > > As I said before, I built Csound 5 on OSX since > > the beginning on all sorts of gccs (I think > > even on 2.2 to start with), with no such issues. > > > > Victor > > > >> > >> There is a discussion happening at the moment on the > >> Python-Mac SIG (pythonmac-sig@python.org) on Apple's > >> increasing interest in Python + packaging issues. > >> I think it's quite important to get the mac OSX build > >> happening so it doesn't matter which version of python > >> (or ipython) a user is using - it detects "which python" > >> and build/installs it in the appropriate place for that. > >> This comes from my sense that centrally, one spends > >> one's time in python accessing all sorts of libraries, > >> including csound so it makes sense to put csound in > >> relation to python not the other way around. > >> > >> (I was going to leave it until the next version to mention > >> it but I think csnd would be more appropriate in it's > >> own folder in the site- packages directory. That way we > >> can add csnd-specific examples) and any other crud in an > >> incremental way. > >> > >> A lot of people get confused by the packaging stuff. I > >> wrote a note about it in case anyone wants some > >> clarification: > >> http://www.avatar.com.au/sonipy/pythonInstall.html > >> > >> David > >> PS Victor, thanks for the csnd.Csound() tip. > >> _________________________________________________ > >> experimental polymedia: www.avatar.com.au > >> Sonic Communications Research Group, > >> University of Canberra: creative.canberra.edu.au/scrg/ > >> > >> > >> > >> ---------------------------------------------------------- > >> --------------- This SF.net email is sponsored by: Splunk > >> Inc. Still grepping through log files to find problems? > >> Stop. Now Search log events and configuration files using > >> AJAX and a browser. Download your FREE copy of Splunk now > >>>> http://get.splunk.com/ > >> _______________________________________________ > >> Csound-devel mailing list > >> Csound-devel@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/csound-devel > > > > ---------------------------------------------------------------------- > > --- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a > > browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Csound-devel mailing list > > Csound-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/csound-devel > > > >_________________________________________________ >experimental polymedia: www.avatar.com.au >Sonic Communications Research Group, >University of Canberra: creative.canberra.edu.au/scrg/ > > > >------------------------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. >Still grepping through log files to find problems? Stop. >Now Search log events and configuration files using AJAX and a browser. >Download your FREE copy of Splunk now >> http://get.splunk.com/ >_______________________________________________ >Csound-devel mailing list >Csound-devel@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/csound-devel Victor Lazzarini Music Technology Laboratory Music Department National University of Ireland, Maynooth ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2007-11-05 12:02 |
From | David Worrall |
Subject | Re: [Cs-dev] scons version |
On 05/11/2007, at 10:10 PM, Victor Lazzarini wrote: > I know you can change the symbolic link to do change macPython > versions, but to build for the Mac supplied python, the > framework has to be moved out of its place (otherwise the > linker will pick it up before apple's). > Ah, I see. what a mess this all is! And if early reports are anything to go by, it doesn't get any better with 2.5 under Leopard. > My build already looks for the python version, but because I > don't use scons install (as I am build installers), I have > a script to place the csnd module in the right place. I > will for the next release put it in the site-packages subdir > (at the moment I put it in lib). > Victor > understood. it works OK where it is at the mo. David > At 06:15 05/11/2007, you wrote: >> I haven't gotten around to building a scons install (yet) so to a >> certain extent I'm talking through my hat. >> However I do move stuff into the current site-packages directory >> automatically. >> Here's how I do it... (modified to current filenames)..... >> >> Given that one can always find out what the currently instantiated >> python is by using the sys module's prefix variable, one can compute >> the appropriate location for csnd.py etc >> >> packDir = sys.prefix + '/lib/python'+sys.prefix[string.rfind(strA, >> '/')+1:]+'/site-packages' >> ( eg. on my machine.. >> sys.prefix == '/Library/Frameworks/Python.framework/Versions/ >> 2.4' ) so >> packageDir == '/Library/Frameworks/Python.framework/Versions/2.4/lib/ >> python2.4/site-packages' >> ) >> Then make a csnd directory in the site-packages directory and place >> your csnd.py therein. >> Also in this csnd dir, make a file named __init__.py in which you >> place the command >> 'from csnd import *' >> >> other code such as examples can then also be placed in this csnd >> directory and accessed as using the '.' notation >> (eg if there's a myCsndEg.py file in this packageDir. >>>>> import csnd.myCnsdEg >> will load it >> >> --------------- >> to compile for a different version of python, change the 'Current ' >> symlink at >> /Library/Frameworks/Python.framework/Versions/Current >> to point to whatever version you want (I think I've used it like this >> to point back to the /System/Library/ 2.3 version as well) >> >> Then run a scons build with the above and it should install with the >> correct python in the correct subdirectories. >> >> >> Perhaps I'm missing something which means it can't be done this way? >> Probably... :-) >> >> ciao, >> >> David >> On 02/11/2007, at 8:04 PM, Victor Lazzarini wrote: >> >>> My problem is more one of building several >>> python modules in the same machine. To do this, I >>> need to: >>> >>> 1. remove the MacPython framework from its install >>> place, to build for Apple's 2.3 >>> 2. put it back, to build for MacPython. >>> 3. I can't build 2.4 and 2.5 without moving >>> things inside the framework (so I don't bother). >>> >>> Now the installer is easy: it just places the 2.3 >>> in /System/... and 2.4 in /Library/... >>> >>> Can you keep us informed on how best this is supposed >>> to be handled? Or if there are any new packaging >>> instructions? >>> >>> Also back to your gcc problem, I always used the >>> compiler tools that came with my Intel mac, so >>> was unaware of the problem. It might be, as they >>> said, that apple shipped a duff set of tools and >>> you were unlucky. I suppose it is all OK now. >>> The manual instructions were the best of our >>> knowledge at the time, and we can add your >>> information (but mark it as 'Intel Macs only') >>> because I am quite sure it does apply to PPC. >>> As I said before, I built Csound 5 on OSX since >>> the beginning on all sorts of gccs (I think >>> even on 2.2 to start with), with no such issues. >>> >>> Victor >>> >>>> >>>> There is a discussion happening at the moment on the >>>> Python-Mac SIG (pythonmac-sig@python.org) on Apple's >>>> increasing interest in Python + packaging issues. >>>> I think it's quite important to get the mac OSX build >>>> happening so it doesn't matter which version of python >>>> (or ipython) a user is using - it detects "which python" >>>> and build/installs it in the appropriate place for that. >>>> This comes from my sense that centrally, one spends >>>> one's time in python accessing all sorts of libraries, >>>> including csound so it makes sense to put csound in >>>> relation to python not the other way around. >>>> >>>> (I was going to leave it until the next version to mention >>>> it but I think csnd would be more appropriate in it's >>>> own folder in the site- packages directory. That way we >>>> can add csnd-specific examples) and any other crud in an >>>> incremental way. >>>> >>>> A lot of people get confused by the packaging stuff. I >>>> wrote a note about it in case anyone wants some >>>> clarification: >>>> http://www.avatar.com.au/sonipy/pythonInstall.html >>>> >>>> David >>>> PS Victor, thanks for the csnd.Csound() tip. >>>> _________________________________________________ >>>> experimental polymedia: www.avatar.com.au >>>> Sonic Communications Research Group, >>>> University of Canberra: creative.canberra.edu.au/scrg/ >>>> >>>> >>>> >>>> ---------------------------------------------------------- >>>> --------------- This SF.net email is sponsored by: Splunk >>>> Inc. Still grepping through log files to find problems? >>>> Stop. Now Search log events and configuration files using >>>> AJAX and a browser. Download your FREE copy of Splunk now >>>>>> http://get.splunk.com/ >>>> _______________________________________________ >>>> Csound-devel mailing list >>>> Csound-devel@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel >>> >>> -------------------------------------------------------------------- >>> -- >>> --- >>> This SF.net email is sponsored by: Splunk Inc. >>> Still grepping through log files to find problems? Stop. >>> Now Search log events and configuration files using AJAX and a >>> browser. >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>> _______________________________________________ >>> Csound-devel mailing list >>> Csound-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/csound-devel >>> >> >> _________________________________________________ >> experimental polymedia: www.avatar.com.au >> Sonic Communications Research Group, >> University of Canberra: creative.canberra.edu.au/scrg/ >> >> >> >> --------------------------------------------------------------------- >> ---- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a >> browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Csound-devel mailing list >> Csound-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/csound-devel > > Victor Lazzarini > Music Technology Laboratory > Music Department > National University of Ireland, Maynooth > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > _________________________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: creative.canberra.edu.au/scrg/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2007-11-05 20:18 |
From | David Worrall |
Subject | Re: [Cs-dev] scons version |
On 05/11/2007, at 11:02 PM, David Worrall wrote: More elegant of course is os.path.join(sys.prefix, 'lib', 'python%d.%d'%(sys.version_info[:2])) ... >>> Given that one can always find out what the currently instantiated >>> python is by using the sys module's prefix variable, one can >>> compute >>> the appropriate location for csnd.py etc >>> >>> packDir = sys.prefix + '/lib/python'+sys.prefix[string.rfind(strA, >>> '/')+1:]+'/site-packages' >>> ( eg. on my machine.. >>> sys.prefix == '/Library/Frameworks/Python.framework/Versions/ >>> 2.4' ) so >>> packageDir == '/Library/Frameworks/Python.framework/Versions/2.4/ >>> lib/ >>> python2.4/site-packages' >>> ) ..._________________________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: creative.canberra.edu.au/scrg/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |