#!/usr/bin/env python import sys import os # Pick the remaining packages from the common directory sys.path.append('../common/python-lib') from distribution_tools.copy import mkdirs, copy_file, copy_files, copy_tree from distribution_tools.download import download from distribution_tools.archive import extract from distribution_tools import command BUILD = 'build' PYTHON_BUILD = os.path.abspath(os.path.join(BUILD, 'python')) PYSERIAL = 'pyserial-2.5-rc2' PYSERIAL_TAR_GZ = PYSERIAL + '.tar.gz' # Download and extract pyserial download(os.path.join(BUILD, PYSERIAL_TAR_GZ), 'http://prdownloads.sourceforge.net/pyserial/%s' % PYSERIAL_TAR_GZ) extract(os.path.join(BUILD, PYSERIAL_TAR_GZ), BUILD) command.execute(['python', 'setup.py', 'install', '--prefix=%s' % (PYTHON_BUILD,)], cwd=os.path.join(BUILD, PYSERIAL))
#!/usr/bin/env python import sys import os # Pick the remaining packages from the common directory sys.path.append('../common/python-lib') from distribution_tools.copy import mkdirs, copy_file, copy_files, copy_tree from distribution_tools.download import download from distribution_tools.archive import extract from distribution_tools import command BUILD = 'build' PYTHON_BUILD = os.path.abspath(os.path.join(BUILD, 'python')) PYSERIAL = 'pyserial-2.5-rc2' PYSERIAL_TAR_GZ = PYSERIAL + '.tar.gz' # Download and extract pyserial download(os.path.join(BUILD, PYSERIAL_TAR_GZ), 'http://prdownloads.sourceforge.net/pyserial/%s' % PYSERIAL_TAR_GZ) extract(os.path.join(BUILD, PYSERIAL_TAR_GZ), BUILD) command.execute( ['python', 'setup.py', 'install', '--prefix=%s' % (PYTHON_BUILD, )], cwd=os.path.join(BUILD, PYSERIAL))
APP_DIR, substitute=dict(version=version, shortversion=shortversion, sparkle_feed=SPARKLE_FEED)) # Copy the Java application stub copy_file( os.path.join(SYSTEM_FRAMEWORK_DIR, 'JavaVM.framework/Resources/MacOS/JavaApplicationStub'), os.path.join(APP_DIR, 'Contents/MacOS/')) # Binaries for bin in BINARIES: copy_file(os.path.join('install/bin/', bin), BIN_DIR) for bin in LIPO_BINARIES: command.execute( ['lipo', '-create', os.path.join('install/bin', bin) , os.path.join('install-tvm-ppc/bin/', bin), '-output', os.path.join(BIN_DIR, bin)]) # Python files copy_tree('build/python/lib/python%d.%d/site-packages/serial/' % (sys.version_info[0], sys.version_info[1]), os.path.join(PYTHON_DIR, 'serial')) copy_files('install/lib/python%d.%d/site-packages/tenctool/tenclib.*' % (sys.version_info[0], sys.version_info[1]), os.path.join(PYTHON_DIR)) copy_files('install/bin/tenc*', BIN_DIR) # Sparkle copy_tree( os.path.join(BUILD, SPARKLE, 'Sparkle.framework'), os.path.join(FRAMEWORK_DIR, 'Sparkle.framework'))