Changes

Jump to navigation Jump to search

Scons

1,365 bytes removed, 15:31, 15 October 2015
Added an intro sentence.
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 '''<=2.3''' should alter a line in:<br>'''PYTHON INSTALL FOLDER\Lib\site-packages\scons-2.3.0\SCons\Tool\MSCommon\vc.py''' Line '''364''':<source lang="python"> if not req_target_platform and target_platform in ('amd64','x86_64'): try_target_archs.append('x86')</source>Should be:<source lang="python"> #if not req_target_platform and target_platform in ('amd64','x86_64'): # try_target_archs.append('x86') if target_platform in ('amd64','x86_64'): try_target_archs.append('x86') print "requested", 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:\WinPython27\relax_disp>sconsscons: Reading SConscript files ...scons: done reading SConscript files.scons: Building targets ... ############################ Compiling the C modules ############################Building the relaxation curve fitting module 'target_functions\\relax_fit.pyd' cl /Fotarget_functions\c_chi2.obj /c target_functions\c_chi2.c /nologo /I"C:\WinPython27\WinPython-32bit-xxx\scripts\..\python-xxx\include"'cl' is not recognized as an internal or external command,operable program or batch file.scons: *** [target_functions\c_chi2.obj] Error 1scons: building terminated because of errors.</source> = Build relax = Open the '''WinPython Command Prompt''' <br>Navigate to the SVN checked out relax folder.<br>First we need to run the variable Variable setup [http://msdn.microsoft.com/en-us/library/f2ccy3wt(v=vs.110).aspx vcvars32.bat] or [http://msdn.microsoft.com/en-us/library/x4d2c09s.aspx vcvarsall.bat x86] for Microsoft Visual Studio 11.0, before we can compile.  cd C:\WinPython27\relax_disp
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat"
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat"
echo %PROCESSOR_ARCHITECTURE%
scons
(Scons will automatically find CL.exe, and setup compilation for 64 bit.)
== 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]]
Trusted, Bureaucrats
4,228

edits

Navigation menu