[Bf-blender-cvs] [5d99cde] master: Remove SCons building system

Sergey Sharybin noreply at git.blender.org
Mon Jan 4 10:23:46 CET 2016


Commit: 5d99cde8229a481363f1439ea4a4c2af851b1cb1
Author: Sergey Sharybin
Date:   Mon Jan 4 14:20:48 2016 +0500
Branches: master
https://developer.blender.org/rB5d99cde8229a481363f1439ea4a4c2af851b1cb1

Remove SCons building system

While SCons building system was serving us really good for ages it's no longer
having much attention by the developers and started to become quite a difficult
task to maintain.

What's even worse -- there started to be quite serious divergence between SCons
and CMake which was only accumulating over the releases now. The fact that none
of the active developers are really using SCons and that our main studio is also
using CMake spotting bugs in the SCons builds became quite a difficult task and
we aren't always spotting them in time.

Meanwhile CMake became really mature building system which is available on every
platform we support and arguably it's also easier and more robust to use.

This commit includes:

- Removal of actual SCons building system
- Removal of SCons git submodule
- Removal of documentation which is stored in the sources and covers SCons
- Tweaks to the buildbot master to stop using SCons submodule
  (this change requires deploying to the server)
- Tweaks to the install dependencies script to skip installing or mentioning
  SCons building system
- Tweaks to various helper scripts to avoid mention of SCons folders/files
  as well

Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit

Reviewed By: campbellbarton, juicyfruit

Differential Revision: https://developer.blender.org/D1680

===================================================================

M	.gitmodules
D	SConstruct
M	build_files/build_environment/install_deps.sh
M	build_files/buildbot/master.cfg
M	build_files/cmake/macros.cmake
D	build_files/scons/Modules/FindPython.py
D	build_files/scons/Modules/FindSharedPtr.py
D	build_files/scons/Modules/FindUnorderedMap.py
D	build_files/scons/Modules/__init__.py
D	build_files/scons/config/darwin-config.py
D	build_files/scons/config/linux-config.py
D	build_files/scons/config/win32-mingw-config.py
D	build_files/scons/config/win32-vc-config.py
D	build_files/scons/config/win64-mingw-config.py
D	build_files/scons/config/win64-vc-config.py
D	build_files/scons/tools/Blender.py
D	build_files/scons/tools/__init__.py
D	build_files/scons/tools/bcolors.py
D	build_files/scons/tools/btools.py
D	build_files/scons/tools/crossmingw.py
D	build_files/scons/tools/mstoolkit.py
D	doc/build_systems/scons-dev.txt
D	doc/build_systems/scons.txt
D	extern/SConscript
D	extern/binreloc/SConscript
D	extern/bullet2/src/SConscript
D	extern/carve/SConscript
M	extern/carve/bundle.sh
D	extern/clew/SConscript
D	extern/cuew/SConscript
D	extern/glew-es/SConscript
D	extern/glew/SConscript
D	extern/libmv/SConscript
M	extern/libmv/bundle.sh
D	extern/libmv/third_party/SConscript
D	extern/libmv/third_party/ceres/SConscript
M	extern/libmv/third_party/ceres/bundle.sh
D	extern/libopenjpeg/SConscript
D	extern/libredcode/SConscript
D	extern/lzma/SConscript
D	extern/lzo/SConscript
D	extern/rangetree/SConscript
D	extern/recastnavigation/SConscript
D	extern/sdlew/SConscript
D	extern/wcwidth/SConscript
D	extern/xdnd/SConscript
D	intern/SConscript
D	intern/audaspace/SConscript
D	intern/container/SConscript
M	intern/cycles/CMakeLists.txt
D	intern/cycles/SConscript
D	intern/cycles/kernel/SConscript
M	intern/cycles/kernel/kernels/cpu/kernel_avx.cpp
M	intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp
M	intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp
M	intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp
M	intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp
D	intern/cycles/kernel/osl/SConscript
D	intern/cycles/kernel/shaders/SConscript
D	intern/dualcon/SConscript
D	intern/eigen/SConscript
D	intern/elbeem/SConscript
D	intern/ghost/SConscript
D	intern/glew-mx/SConscript
D	intern/guardedalloc/SConscript
D	intern/iksolver/SConscript
D	intern/itasc/SConscript
D	intern/locale/SConscript
D	intern/memutil/SConscript
D	intern/mikktspace/SConscript
D	intern/moto/SConscript
D	intern/opencolorio/SConscript
D	intern/opensubdiv/SConscript
D	intern/raskter/SConscript
D	intern/rigidbody/SConscript
D	intern/smoke/SConscript
D	intern/string/SConscript
D	intern/utfconv/SConscript
D	scons
D	source/SConscript
D	source/blender/SConscript
D	source/blender/avi/SConscript
D	source/blender/blenfont/SConscript
D	source/blender/blenkernel/SConscript
D	source/blender/blenlib/SConscript
D	source/blender/blenloader/SConscript
D	source/blender/blentranslation/SConscript
D	source/blender/bmesh/SConscript
D	source/blender/collada/SConscript
D	source/blender/compositor/SConscript
D	source/blender/depsgraph/SConscript
D	source/blender/editors/SConscript
D	source/blender/editors/animation/SConscript
D	source/blender/editors/armature/SConscript
D	source/blender/editors/curve/SConscript
D	source/blender/editors/datafiles/SConscript
D	source/blender/editors/gpencil/SConscript
D	source/blender/editors/interface/SConscript
D	source/blender/editors/io/SConscript
D	source/blender/editors/mask/SConscript
D	source/blender/editors/mesh/SConscript
D	source/blender/editors/metaball/SConscript
D	source/blender/editors/object/SConscript
D	source/blender/editors/physics/SConscript
D	source/blender/editors/render/SConscript
D	source/blender/editors/screen/SConscript
D	source/blender/editors/sculpt_paint/SConscript
D	source/blender/editors/sound/SConscript
D	source/blender/editors/space_action/SConscript
D	source/blender/editors/space_api/SConscript
D	source/blender/editors/space_buttons/SConscript
D	source/blender/editors/space_clip/SConscript
D	source/blender/editors/space_console/SConscript
D	source/blender/editors/space_file/SConscript
D	source/blender/editors/space_graph/SConscript
D	source/blender/editors/space_image/SConscript
D	source/blender/editors/space_info/SConscript
D	source/blender/editors/space_logic/SConscript
D	source/blender/editors/space_nla/SConscript
D	source/blender/editors/space_node/SConscript
D	source/blender/editors/space_outliner/SConscript
D	source/blender/editors/space_script/SConscript
D	source/blender/editors/space_sequencer/SConscript
D	source/blender/editors/space_text/SConscript
D	source/blender/editors/space_time/SConscript
D	source/blender/editors/space_userpref/SConscript
D	source/blender/editors/space_view3d/SConscript
D	source/blender/editors/transform/SConscript
D	source/blender/editors/util/SConscript
D	source/blender/editors/uvedit/SConscript
D	source/blender/freestyle/SConscript
D	source/blender/gpu/SConscript
D	source/blender/ikplugin/SConscript
D	source/blender/imbuf/SConscript
D	source/blender/imbuf/intern/cineon/SConscript
D	source/blender/imbuf/intern/dds/SConscript
D	source/blender/imbuf/intern/oiio/SConscript
D	source/blender/imbuf/intern/openexr/SConscript
M	source/blender/imbuf/readme.txt
D	source/blender/makesdna/SConscript
D	source/blender/makesdna/intern/SConscript
D	source/blender/makesrna/SConscript
D	source/blender/makesrna/intern/SConscript
D	source/blender/modifiers/SConscript
D	source/blender/nodes/SConscript
D	source/blender/physics/SConscript
D	source/blender/python/SConscript
D	source/blender/quicktime/SConscript
D	source/blender/render/SConscript
D	source/blender/windowmanager/SConscript
D	source/blenderplayer/bad_level_call_stubs/SConscript
M	source/creator/CMakeLists.txt
D	source/gameengine/BlenderRoutines/SConscript
D	source/gameengine/Converter/SConscript
D	source/gameengine/Expressions/SConscript
D	source/gameengine/GameLogic/SConscript
D	source/gameengine/GamePlayer/SConscript
D	source/gameengine/GamePlayer/common/SConscript
D	source/gameengine/GamePlayer/ghost/SConscript
D	source/gameengine/Ketsji/KXNetwork/SConscript
D	source/gameengine/Ketsji/SConscript
D	source/gameengine/Network/LoopBackNetwork/SConscript
D	source/gameengine/Network/SConscript
D	source/gameengine/Physics/Bullet/SConscript
D	source/gameengine/Physics/Dummy/SConscript
D	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
D	source/gameengine/Rasterizer/SConscript
D	source/gameengine/SConscript
D	source/gameengine/SceneGraph/SConscript
D	source/gameengine/VideoTexture/SConscript
D	source/icons/SConscript
M	tests/check_deprecated.py
M	tests/python/pep8.py

===================================================================

diff --git a/.gitmodules b/.gitmodules
index 4ce5a24..132f6cf 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -10,7 +10,3 @@
 	path = release/datafiles/locale
 	url = ../blender-translations.git
 	ignore = all
-[submodule "scons"]
-	path = scons
-	url = ../scons.git
-	ignore = all
diff --git a/SConstruct b/SConstruct
deleted file mode 100644
index de265df..0000000
--- a/SConstruct
+++ /dev/null
@@ -1,1426 +0,0 @@
-#!/usr/bin/env python
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2006, Blender Foundation
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): Nathan Letwory.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-# Main entry-point for the SCons building system
-# Set up some custom actions and target/argument handling
-# Then read all SConscripts and build
-#
-# TODO: fix /FORCE:MULTIPLE on windows to get proper debug builds.
-# TODO: directory copy functions are far too complicated, see:
-#       http://wiki.blender.org/index.php/User:Ideasman42/SConsNotSimpleInstallingFiles
-
-import sys
-import os
-import os.path
-import string
-import shutil
-import re
-
-# store path to tools and modules
-toolpath=os.path.join(".", "build_files", "scons", "tools")
-modulespath=os.path.join(".", "build_files", "scons", "Modules")
-
-# needed for importing tools and modules
-sys.path.append(toolpath)
-sys.path.append(modulespath)
-
-import Blender
-import btools
-
-EnsureSConsVersion(1,0,0)
-
-# Before we do anything, let's check if we have a sane os.environ
-if not btools.check_environ():
-    Exit()
-
-BlenderEnvironment = Blender.BlenderEnvironment
-B = Blender
-
-VERSION = btools.VERSION # This is used in creating the local config directories
-VERSION_RELEASE_CYCLE = btools.VERSION_RELEASE_CYCLE
-
-### globals ###
-platform = sys.platform
-quickie = None
-quickdebug = None
-
-##### BEGIN SETUP #####
-
-B.possible_types = ['core', 'player', 'player2', 'intern', 'extern', 'system']
-
-B.binarykind = ['blender' , 'blenderplayer']
-##################################
-# target and argument validation #
-##################################
-# XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
-use_color = ARGUMENTS.get('BF_FANCY', '1')
-if platform=='win32':
-    use_color = None
-
-if not use_color=='1':
-    B.bc.disable()
-
- #on defaut white Os X terminal, some colors are totally unlegible
-if platform=='darwin':
-    B.bc.OKGREEN = '\033[34m'
-    B.bc.WARNING = '\033[36m'
-
-# arguments
-print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
-B.arguments = btools.validate_arguments(ARGUMENTS, B.bc)
-btools.print_arguments(B.arguments, B.bc)
-
-# targets
-print B.bc.HEADER+'Command-line targets'+B.bc.ENDC
-B.targets = btools.validate_targets(COMMAND_LINE_TARGETS, B.bc)
-btools.print_targets(B.targets, B.bc)
-
-##########################
-# setting up environment #
-##########################
-
-# handling cmd line arguments & config file
-
-# bitness stuff
-tempbitness = int(B.arguments.get('BF_BITNESS', B.bitness)) # default to bitness found as per starting python
-if tempbitness in B.allowed_bitnesses.values() :
-    B.bitness = tempbitness
-
-# first check cmdline for toolset and we create env to work on
-quickie = B.arguments.get('BF_QUICK', None)
-quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
-
-if quickdebug:
-    B.quickdebug=string.split(quickdebug, ',')
-else:
-    B.quickdebug=[]
-
-if quickie:
-    B.quickie=string.split(quickie,',')
-else:
-    B.quickie=[]
-
-toolset = B.arguments.get('BF_TOOLSET', None)
-vcver = B.arguments.get('MSVS_VERSION', '12.0')
-
-if toolset:
-    print "Using " + toolset
-    if toolset=='mstoolkit':
-        env = BlenderEnvironment(ENV = os.environ)
-        env.Tool('mstoolkit', [toolpath])
-    else:
-        env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
-        if env:
-            btools.SetupSpawn(env)
-else:
-    if B.bitness==64 and platform=='win32':
-        env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64', TARGET_ARCH='x86_64', MSVC_VERSION=vcver)
-    else:
-        env = BlenderEnvironment(ENV = os.environ, TARGET_ARCH='x86', MSVC_VERSION=vcver)
-
-if not env:
-    print "Could not create a build environment"
-    Exit()
-
-cc = B.arguments.get('CC', None)
-cxx = B.arguments.get('CXX', None)
-if cc:
-    env['CC'] = cc
-if cxx:
-    env['CXX'] = cxx
-
-if sys.platform=='win32':
-    if env['CC'] in ['cl', 'cl.exe']:
-        platform = 'win64-vc' if B.bitness == 64 else 'win32-vc'
-    elif env['CC'] in ['gcc']:
-        platform = 'win64-mingw' if B.bitness == 64 else 'win32-mingw'
-
-if 'mingw' in platform:
-    print "Setting custom spawn function"
-    btools.SetupSpawn(env)
-
-env.SConscriptChdir(0)
-
-# Remove major kernel version from linux platform.
-# After Linus switched kernel to new version model this major version
-# shouldn't take much sense for building rules.
-
-if re.match('linux[0-9]+', platform):
-    platform = 'linux'
-
-crossbuild = B.arguments.get('BF_CROSS', None)
-if crossbuild and platform not in ('win32-vc', 'win64-vc'):
-    platform = 'linuxcross'
-
-env['OURPLATFORM'] = platform
-
-configfile = os.path.join("build_files", "scons", "config", platform + "-config.py")
-
-if os.path.exists(configfile):
-    print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
-else:
-    print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
-
-if crossbuild and env['PLATFORM'] != 'win32':
-    print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
-    env.Tool('crossmingw', [toolpath])
-    # todo: determine proper libs/includes etc.
-    # Needed for gui programs, console programs should do without it
-
-    # Now we don't need this option to have console window
-    # env.Append(LINKFLAGS=['-mwindows'])
-
-userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
-# first read platform config. B.arguments will override
-optfiles = [configfile]
-if os.path.exists(userconfig):
-    print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
-    optfiles += [userconfig]
-else:
-    print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
-
-opts = btools.read_opts(env, optfiles, B.arguments)
-opts.Update(env)
-
-if sys.platform=='win32':
-    if B.bitness==64:
-        env.Append(CPPFLAGS=['-DWIN64']) # -DWIN32 needed too, as it's used all over to target Windows generally
-
-if env['BF_DEBUG']:
-    env.Append(CPPDEFINES=['_DEBUG', 'DEBUG'])
-else:
-    env.Append(CPPDEFINES=['NDEBUG'])
-
-if not env['BF_FANCY']:
-    B.bc.disable()
-
-if env['WITH_BF_SDL_DYNLOAD']:
-    env['BF_SDL_INC'] = '#extern/sdlew/include/SDL2'
-
-# remove install dir so old and new files are not mixed.
-# NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
-# TODO: perhaps we need an option (off by default) to not do this altogether...
-if not env['WITHOUT_BF_INSTALL'] and not env['WITHOUT_BF_OVERWRITE_INSTALL']:
-    scriptsDir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts')
-    if os.path.isdir(scriptsDir):
-        print B.bc.OKGREEN + "Clearing installation directory%s: %s" % (B.bc.ENDC, os.path.abspath(scriptsDir))
-        shutil.rmtree(scriptsDir)
-
-
-SetOption('num_jobs', int(env['BF_NUMJOBS']))
-print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs'))
-print B.bc.OKGREEN + "Build with debug symbols%s: %s" % (B.bc.ENDC, env['BF_DEBUG'])
-
-if 'blenderlite' in B.targets:
-    target_env_defs = {}
-    target_env_defs['WITH_BF_GAMEENGINE'] = False
-    target_env_defs['WITH_BF_CYCLES'] = False
-    target_env_defs['WITH_BF_OPENAL'] = False
-    target_env_defs['WITH_BF_OPENEXR'] = False
-    target_env_defs['WITH_BF_PSD'] = False
-    target_env_defs['WITH_BF_OPENMP'] = False
-    target_env_defs['WITH_BF_ICONV'] = False
-    target_env_defs['WITH_BF_INTERNATIONAL'] = False
-    target_env_defs['WITH_BF_OPENJPEG'] = False
-    target_env_defs['WITH_BF_FFMPEG'] = False
-    target_env_defs['WITH_BF_QUICKTIME'] = False
-    target_env_defs['WITH_BF_REDCODE'] = False
-    target_env_defs['WITH_BF_DDS'] = False
-    target_env_defs['WITH_BF_CINEON'] = False
-    target_env_defs['WITH_BF_FRAMESERVER'] = False
-    target_env_defs['WITH_BF_HDR'] = False
-    target_env_defs['WITH_BF_ZLIB'] = False
-    target_env_defs['WITH_BF_SDL'] = False
-    target_env_defs['WITH_BF_JPEG'] = False
-    target_env_defs['WITH_BF_PNG'] = False
-    target_env_defs['WITH_BF_BULLET'] = False
-    target_env_defs['WITH_BF_BINRELOC'] = False
-    target_env_defs['BF_BUILDINFO'] = False
-    target_env_defs['WITH_BF_FLUID'] = False
-    target_env_defs['WITH_BF_OCEANSIM'] = False
-    target_env_defs['WITH_BF_SMOKE'] = False
-    target_env_defs['WITH_BF_BOOLEAN'] = False
-    target_env_defs['WITH_BF_REMESH'] = False
-    target_env_defs['WITH_BF_PYTHON'] = False
-    target_env_defs['WITH_BF_IME'] = False
-    target_env_defs['WITH_BF_3DMOUSE'] = False
-    target_env_defs['WITH_BF_LIBMV'] = False
-    target_env_defs['WITH_BF_FREESTYLE'] = False
-
-    # Merge blenderlite, let command line to override
-    for k,v in target_env_defs.iteritems():
-        if k not in B.arguments:
-            env[k] = v
-
-if 'cudakernels' in B.targets:
-    env['WITH_BF_CYCLES'] = True
-    env['WITH_BF_CYCLES_CUDA_BINARIES'] = True
-    env['WITH_BF_PYTHON'] = False
-    env['WITH_BF_LIBMV'] = False
-
-# Configure paths for automated configuration test programs
-env['CONFIGUREDIR'

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list