mirror of https://github.com/apache/cloudstack.git
Platforms: use Waf builtin platform detection so the build scripts will work correctly with Jython
This commit is contained in:
parent
0364a6b47b
commit
e7127054ca
|
|
@ -1,4 +1,5 @@
|
|||
import Utils
|
||||
import Options
|
||||
import tarfile
|
||||
from TaskGen import feature, before
|
||||
import Task
|
||||
|
|
@ -33,7 +34,7 @@ def tar_up(task):
|
|||
ti.mode = 0755
|
||||
ti.size = os.path.getsize(src)
|
||||
openmode = 'r'
|
||||
if sys.platform == 'win32': openmode = openmode + 'b'
|
||||
if Options.platform == 'win32': openmode = openmode + 'b'
|
||||
f = file(src,openmode)
|
||||
z.addfile(ti,fileobj=f)
|
||||
f.close()
|
||||
|
|
|
|||
3
wscript
3
wscript
|
|
@ -9,7 +9,6 @@ APPNAME = 'cloud'
|
|||
import shutil,os
|
||||
import email,time
|
||||
import optparse
|
||||
import platform
|
||||
import Utils,Node,Options,Logs,Scripting,Environment,Build,Configure
|
||||
from subprocess import Popen as _Popen,PIPE
|
||||
import os
|
||||
|
|
@ -358,9 +357,9 @@ def set_options(opt):
|
|||
opt.tool_options('tar',tooldir='tools/waf')
|
||||
opt.tool_options('mkisofs',tooldir='tools/waf')
|
||||
opt.tool_options('usermgmt',tooldir='tools/waf')
|
||||
if platform.system() not in ['Windows',"Darwin"]: opt.tool_options('compiler_cc')
|
||||
opt.tool_options('python')
|
||||
opt.tool_options('tomcat',tooldir='tools/waf')
|
||||
if Options.platform not in ['darwin',"win32"]: opt.tool_options('compiler_cc')
|
||||
|
||||
inst_dir = opt.get_option_group('--bindir') # get the group that contains bindir
|
||||
inst_dir.add_option('--javadir', # add javadir to the group that contains bindir
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
- detects Tomcat (on Windows)
|
||||
- detects or configures directories according to command-line options"""
|
||||
|
||||
import platform
|
||||
import Utils,Node,Options,Logs,Scripting,Environment,Build,Configure
|
||||
from os import unlink as _unlink, makedirs as _makedirs, getcwd as _getcwd, chdir as _chdir
|
||||
try: from os import getuid as _getuid
|
||||
|
|
@ -91,8 +90,8 @@ hard_deps = [
|
|||
|
||||
|
||||
conf.check_message_1('Detecting distribution')
|
||||
if platform.system() == 'Windows': conf.env.DISTRO = "Windows"
|
||||
elif platform.system() == 'Darwin': conf.env.DISTRO = "Mac"
|
||||
if Options.platform == 'win32': conf.env.DISTRO = "Windows"
|
||||
elif Options.platform == 'darwin': conf.env.DISTRO = "Mac"
|
||||
elif _exists("/etc/network"): conf.env.DISTRO = "Ubuntu"
|
||||
elif _exists("/etc/fedora-release"): conf.env.DISTRO = "Fedora"
|
||||
elif _exists("/etc/centos-release") or _exists("/etc/redhat-release"): conf.env.DISTRO = "CentOS"
|
||||
|
|
|
|||
Loading…
Reference in New Issue