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).3''' should alter a line inaspx vcvars32.bat] or [http:<br>'''PYTHON INSTALL FOLDER\Lib\site//msdn.microsoft.com/en-packages\scons-2us/library/x4d2c09s.aspx vcvarsall.3bat x86] for Microsoft Visual Studio 11.0\SCons\Tool\MSCommon\vc, before we can compile.py''' Line '''364''':<source lang= "python"> if not req_target_platform and target_platform in ('amd64','x86_64')C: try_target_archs.append\Program Files ('x86')\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat"</source>Should be:<source lang= "python"> #if not req_target_platform and target_platform in ('amd64','x86_64')C: # try_target_archs.append\Program Files ('x86') if target_platform in ('amd64','x86_64'): try_target_archs\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\vcvarsx86_amd64.append('x86') print "requested", req_target_platform print "targetbat", 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" x86 cl /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]]