mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
Adapt the build to the new relative location of the wx source
This commit is contained in:
43
build.py
43
build.py
@@ -580,15 +580,16 @@ def uploadPackage(fileName, KEEP=50):
|
|||||||
|
|
||||||
# copy the new file to the server
|
# copy the new file to the server
|
||||||
cmd = 'scp {} {}:{}'.format(fileName, host, snapshotDir)
|
cmd = 'scp {} {}:{}'.format(fileName, host, snapshotDir)
|
||||||
runcmd(cmd, echoCmd=True)
|
msg(cmd)
|
||||||
|
runcmd(cmd)
|
||||||
|
|
||||||
# Make sure it is readable by all
|
# Make sure it is readable by all
|
||||||
cmd = 'ssh {} "cd {}; chmod a+r {}"'.format(host, snapshotDir, os.path.basename(fileName))
|
cmd = 'ssh {} "cd {}; chmod a+r {}"'.format(host, snapshotDir, os.path.basename(fileName))
|
||||||
runcmd(cmd, echoCmd=True)
|
runcmd(cmd)
|
||||||
|
|
||||||
# get the list of all snapshot files on the server
|
# get the list of all snapshot files on the server
|
||||||
cmd = 'ssh {} "cd {}; ls"'.format(host, snapshotDir)
|
cmd = 'ssh {} "cd {}; ls"'.format(host, snapshotDir)
|
||||||
allFiles = runcmd(cmd, getOutput=True, echoCmd=True)
|
allFiles = runcmd(cmd, getOutput=True)
|
||||||
allFiles = allFiles.strip().split('\n')
|
allFiles = allFiles.strip().split('\n')
|
||||||
allFiles.sort()
|
allFiles.sort()
|
||||||
|
|
||||||
@@ -598,7 +599,7 @@ def uploadPackage(fileName, KEEP=50):
|
|||||||
if rmFiles:
|
if rmFiles:
|
||||||
msg("Deleting %s" % ", ".join(rmFiles))
|
msg("Deleting %s" % ", ".join(rmFiles))
|
||||||
cmd = 'ssh {} "cd {}; rm {}"'.format(host, snapshotDir, " ".join(rmFiles))
|
cmd = 'ssh {} "cd {}; rm {}"'.format(host, snapshotDir, " ".join(rmFiles))
|
||||||
runcmd(cmd, echoCmd=True)
|
runcmd(cmd)
|
||||||
|
|
||||||
msg("Upload complete!")
|
msg("Upload complete!")
|
||||||
|
|
||||||
@@ -1468,19 +1469,17 @@ def cmd_sdist(options, args):
|
|||||||
cfg = Config()
|
cfg = Config()
|
||||||
|
|
||||||
isGit = os.path.exists('.git')
|
isGit = os.path.exists('.git')
|
||||||
isSvn = os.path.exists('.svn')
|
if not isGit:
|
||||||
if not isGit and not isSvn:
|
msg("Sorry, I don't know what to do in this source tree, no git workspace found.")
|
||||||
msg("Sorry, I don't know what to do in this source tree, no git or svn workspace found.")
|
|
||||||
return
|
return
|
||||||
|
|
||||||
# make a tree for building up the archive files
|
# make a tree for building up the archive files
|
||||||
ADEST = 'build/sdist'
|
PDEST = 'build/sdist'
|
||||||
PDEST = posixjoin(ADEST, 'Phoenix')
|
WDEST = posixjoin(PDEST, 'ext/wxWidgets')
|
||||||
WDEST = posixjoin(ADEST, 'wxWidgets')
|
|
||||||
if not os.path.exists(PDEST):
|
if not os.path.exists(PDEST):
|
||||||
os.makedirs(PDEST)
|
os.makedirs(PDEST)
|
||||||
if not os.path.exists(WDEST):
|
#if not os.path.exists(WDEST):
|
||||||
os.makedirs(WDEST)
|
# os.makedirs(WDEST)
|
||||||
|
|
||||||
# and a place to put the final tarball
|
# and a place to put the final tarball
|
||||||
if not os.path.exists('dist'):
|
if not os.path.exists('dist'):
|
||||||
@@ -1492,12 +1491,6 @@ def cmd_sdist(options, args):
|
|||||||
runcmd('git archive HEAD | tar -x -C %s' % PDEST, echoCmd=False)
|
runcmd('git archive HEAD | tar -x -C %s' % PDEST, echoCmd=False)
|
||||||
msg('Exporting wxWidgets...')
|
msg('Exporting wxWidgets...')
|
||||||
runcmd('(cd %s; git archive HEAD) | tar -x -C %s' % (wxDir(), WDEST), echoCmd=False)
|
runcmd('(cd %s; git archive HEAD) | tar -x -C %s' % (wxDir(), WDEST), echoCmd=False)
|
||||||
elif isSvn:
|
|
||||||
msg('Exporting Phoenix...')
|
|
||||||
runcmd('svn export --force . %s' % PDEST, echoCmd=False)
|
|
||||||
msg('Exporting wxWidgets...')
|
|
||||||
runcmd('(cd %s; svn export --force . %s)' % (wxDir(), os.path.abspath(WDEST)), echoCmd=False)
|
|
||||||
|
|
||||||
|
|
||||||
# copy Phoenix's generated code into the archive tree
|
# copy Phoenix's generated code into the archive tree
|
||||||
msg('Copying generated files...')
|
msg('Copying generated files...')
|
||||||
@@ -1518,11 +1511,11 @@ def cmd_sdist(options, args):
|
|||||||
copyFile('REV.txt', PDEST)
|
copyFile('REV.txt', PDEST)
|
||||||
|
|
||||||
# Add some extra stuff to the root folder
|
# Add some extra stuff to the root folder
|
||||||
copyFile('packaging/setup.py', ADEST)
|
#copyFile('packaging/setup.py', ADEST)
|
||||||
copyFile('packaging/README-sdist.txt', opj(ADEST, 'README.txt'))
|
#copyFile('packaging/README-sdist.txt', opj(ADEST, 'README.txt'))
|
||||||
cmd_egg_info(options, args, egg_base=ADEST)
|
cmd_egg_info(options, args, egg_base=PDEST)
|
||||||
copyFile(opj(ADEST, 'wxPython_Phoenix.egg-info/PKG-INFO'),
|
copyFile(opj(PDEST, 'wxPython_Phoenix.egg-info/PKG-INFO'),
|
||||||
opj(ADEST, 'PKG-INFO'))
|
opj(PDEST, 'PKG-INFO'))
|
||||||
|
|
||||||
# build the tarball
|
# build the tarball
|
||||||
msg('Archiving Phoenix source...')
|
msg('Archiving Phoenix source...')
|
||||||
@@ -1531,13 +1524,13 @@ def cmd_sdist(options, args):
|
|||||||
if os.path.exists(tarfilename):
|
if os.path.exists(tarfilename):
|
||||||
os.remove(tarfilename)
|
os.remove(tarfilename)
|
||||||
tarball = tarfile.open(name=tarfilename, mode="w:gz")
|
tarball = tarfile.open(name=tarfilename, mode="w:gz")
|
||||||
pwd = pushDir(ADEST)
|
pwd = pushDir(PDEST)
|
||||||
for name in glob.glob('*'):
|
for name in glob.glob('*'):
|
||||||
tarball.add(name, os.path.join(rootname, name))
|
tarball.add(name, os.path.join(rootname, name))
|
||||||
tarball.close()
|
tarball.close()
|
||||||
msg('Cleaning up...')
|
msg('Cleaning up...')
|
||||||
del pwd
|
del pwd
|
||||||
shutil.rmtree(ADEST)
|
shutil.rmtree(PDEST)
|
||||||
|
|
||||||
if options.upload:
|
if options.upload:
|
||||||
uploadPackage(tarfilename)
|
uploadPackage(tarfilename)
|
||||||
|
|||||||
@@ -652,12 +652,9 @@ def phoenixDir():
|
|||||||
def wxDir():
|
def wxDir():
|
||||||
WXWIN = os.environ.get('WXWIN')
|
WXWIN = os.environ.get('WXWIN')
|
||||||
if not WXWIN:
|
if not WXWIN:
|
||||||
for rel in ['../wxWidgets', '../wx', './wxWidgets', '..']:
|
WXWIN = os.path.abspath(os.path.join(phoenixDir(), 'ext/wxWidgets'))
|
||||||
path = os.path.join(phoenixDir(), rel)
|
|
||||||
if path and os.path.exists(path) and os.path.isdir(path):
|
|
||||||
WXWIN = os.path.abspath(os.path.join(phoenixDir(), rel))
|
|
||||||
break
|
|
||||||
assert WXWIN not in [None, '']
|
assert WXWIN not in [None, '']
|
||||||
|
assert os.path.exists(WXWIN) and os.path.isdir(WXWIN)
|
||||||
return WXWIN
|
return WXWIN
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user