This describes how to use the [http://www.scons.org/ scons build system] to build various components of relax, from C modules to the full documentation.
== When to issue "scons" ? After each update in repository? ==
== clean/remove compilation ==
scons clean_all
del C:\WinPython27\relax_disp_32\target_functions\relax_fit.pyd
scons clean_all
== Bugfix scons for 32bit building vcvars ==Due to a bug, versions of scons '''<Variable setup [http://msdn.microsoft.com/en-us/library/f2ccy3wt(v=2vs.110).aspx vcvars32.3''' should alter a line inbat] or [http:<br>//msdn.microsoft.com/en-us/library/x4d2c09s.aspx vcvarsall.bat x86] for Microsoft Visual Studio 11.0, before we can compile.''' "C:\WinPython27Program Files (x86)\WinPython-32bit-xxx\python-xxx\Lib\site-packages\scons-2.3Microsoft Visual Studio 11.0\SCons\ToolVC\MSCommonbin\vcvcvars32.py''' Line '''364''':bat"<source lang= "python"> if not req_target_platform and target_platform in ('amd64','x86_64')C: try_target_archs.append\Program Files ('x86')</source>Should be:<source lang="python"> #if not req_target_platform and target_platform in ('amd64','x86_64'): # try_target_archs\Microsoft Visual Studio 11.append('x86') if target_platform in ('amd64','x86_64'): try_target_archs0\VC\bin\x86_amd64\vcvarsx86_amd64.append('x86') print "requestedbat", req_target_platform print "target", target_platform print "try", try_target_archs</source> If not fixing the bug, you will get:<source lang="powershell ">C:\WinPython27Program Files (x86)\relax_disp>sconsscons: Reading SConscript files Microsoft Visual Studio 11...scons: done reading SConscript files.scons: Building targets ... ############################ Compiling the C modules ############################Building the relaxation curve fitting module 'target_functions0\VC\relax_fitvcvarsall.pyd'bat" x86cl /Fotarget_functions\c_chi2.obj /c target_functions\c_chi2.c /nologo /I "C:\WinPython27Program Files (x86)\WinPython-32bit-xxxMicrosoft Visual Studio 11.0\scriptsVC\vcvarsall..\python-xxx\includebat"x86_amd64'cl' is not recognized as an internal or external command, echo %PROCESSOR_ARCHITECTURE%operable program or batch file. set PROCESSOR_ARCHITECTURE=x86scons: *** [target_functions\c_chi2.obj] Error 1 echo %PROCESSOR_ARCHITECTURE% scons: building terminated because of errors.</source>
== Construction Variables ==
[http://www.scons.org/doc/1.2.0/HTML/scons-user/a4774.html link to Construction Variables]
[[Category:Python]]
[[Category:Scons]]
[[Category:Software]]