diff options
author | Dirk Baechle <dl9obn@darc.de> | 2015-04-06 16:11:15 (GMT) |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2015-04-06 16:11:15 (GMT) |
commit | 08eae186d3237d214b5db70af9e54360002701e4 (patch) | |
tree | adb5ebc87bea4941cf4cf815f3b870a65885f9ae /SConstruct | |
parent | 0aae461a4be40d812ba8ec7c1026a7188101e4a4 (diff) | |
parent | 46536adb150648780c0f79cc26390376a386894f (diff) | |
download | SCons-08eae186d3237d214b5db70af9e54360002701e4.zip SCons-08eae186d3237d214b5db70af9e54360002701e4.tar.gz SCons-08eae186d3237d214b5db70af9e54360002701e4.tar.bz2 |
Merged in bdbaddog/scons (pull request #230), extending docs for InstallVersionedLib and SharedLibrary
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 29 |
1 files changed, 23 insertions, 6 deletions
@@ -172,6 +172,14 @@ if build_id is None: else: build_id = '' +import os.path +import distutils.command + +no_winpack_templates = not os.path.exists(os.path.join(os.path.split(distutils.command.__file__)[0],'wininst-9.0.exe')) +skip_win_packages = ARGUMENTS.get('SKIP_WIN_PACKAGES',False) or no_winpack_templates +if skip_win_packages: + print "Skipping the build of Windows packages..." + python_ver = sys.version[0:3] # @@ -235,6 +243,8 @@ command_line_variables = [ ("VERSION=", "The SCons version being packaged. The default " + "is the hard-coded value '%s' " % default_version + "from this SConstruct file."), + + ("SKIP_WIN_PACKAGES=", "If set, skip building win32 and win64 packages."), ] Default('.', build_dir) @@ -495,10 +505,13 @@ Version_values = [Value(version), Value(build_id)] # separate packages. # +from distutils.sysconfig import get_python_lib; + + python_scons = { 'pkg' : 'python-' + project, 'src_subdir' : 'engine', - 'inst_subdir' : os.path.join('lib', 'python1.5', 'site-packages'), + 'inst_subdir' : get_python_lib(), 'rpm_dir' : '/usr/lib/scons', 'debian_deps' : [ @@ -737,8 +750,6 @@ for p in [ scons ]: 'dist', "%s.%s.zip" % (pkg_version, platform)) - win64_exe = os.path.join(build, 'dist', "%s.win-amd64.exe" % pkg_version) - win32_exe = os.path.join(build, 'dist', "%s.win32.exe" % pkg_version) # # Update the environment with the relevant information @@ -849,8 +860,13 @@ for p in [ scons ]: Local(*build_src_files) distutils_formats = [] + distutils_targets = [] + + if not skip_win_packages: + win64_exe = os.path.join(build, 'dist', "%s.win-amd64.exe" % pkg_version) + win32_exe = os.path.join(build, 'dist', "%s.win32.exe" % pkg_version) + distutils_targets.extend([ win32_exe , win64_exe ]) - distutils_targets = [ win32_exe , win64_exe ] dist_distutils_targets = [] for target in distutils_targets: @@ -1088,9 +1104,10 @@ for p in [ scons ]: commands.append("$PYTHON $PYTHONFLAGS $SETUP_PY sdist --formats=%s" % \ ','.join(distutils_formats)) - commands.append("$PYTHON $PYTHONFLAGS $SETUP_PY bdist_wininst --plat-name=win32 --user-access-control auto") + if not skip_win_packages: + commands.append("$PYTHON $PYTHONFLAGS $SETUP_PY bdist_wininst --plat-name=win32 --user-access-control auto") - commands.append("$PYTHON $PYTHONFLAGS $SETUP_PY bdist_wininst --plat-name=win-amd64 --user-access-control auto") + commands.append("$PYTHON $PYTHONFLAGS $SETUP_PY bdist_wininst --plat-name=win-amd64 --user-access-control auto") env.Command(distutils_targets, build_src_files, commands) |