Esempio n. 1
0
 def add_python_framework(self):
     info("\nAdding Python framework")
     src = join(SW + "/python", "Python.framework")
     x = join(self.frameworks_dir, "Python.framework")
     curr = os.path.realpath(join(src, "Versions", "Current"))
     currd = join(x, "Versions", basename(curr))
     rd = join(currd, "Resources")
     os.makedirs(rd)
     shutil.copy2(join(curr, "Resources", "Info.plist"), rd)
     shutil.copy2(join(curr, "Python"), currd)
     self.set_id(join(currd, "Python"), self.FID + "/Python.framework/Versions/%s/Python" % basename(curr))
     # The following is needed for codesign in OS X >= 10.9.5
     with current_dir(x):
         os.symlink(basename(curr), "Versions/Current")
         for y in ("Python", "Resources"):
             os.symlink("Versions/Current/%s" % y, y)
Esempio n. 2
0
 def add_python_framework(self):
     info('\nAdding Python framework')
     src = join(SW + '/python', 'Python.framework')
     x = join(self.frameworks_dir, 'Python.framework')
     curr = os.path.realpath(join(src, 'Versions', 'Current'))
     currd = join(x, 'Versions', basename(curr))
     rd = join(currd, 'Resources')
     os.makedirs(rd)
     shutil.copy2(join(curr, 'Resources', 'Info.plist'), rd)
     shutil.copy2(join(curr, 'Python'), currd)
     self.set_id(join(currd, 'Python'),
         self.FID+'/Python.framework/Versions/%s/Python'%basename(curr))
     # The following is needed for codesign in OS X >= 10.9.5
     with current_dir(x):
         os.symlink(basename(curr), 'Versions/Current')
         for y in ('Python', 'Resources'):
             os.symlink('Versions/Current/%s'%y, y)
Esempio n. 3
0
 def add_python_framework(self):
     info('\nAdding Python framework')
     src = join(SW + '/python', 'Python.framework')
     x = join(self.frameworks_dir, 'Python.framework')
     curr = os.path.realpath(join(src, 'Versions', 'Current'))
     currd = join(x, 'Versions', basename(curr))
     rd = join(currd, 'Resources')
     os.makedirs(rd)
     shutil.copy2(join(curr, 'Resources', 'Info.plist'), rd)
     shutil.copy2(join(curr, 'Python'), currd)
     self.set_id(join(currd, 'Python'),
         self.FID+'/Python.framework/Versions/%s/Python'%basename(curr))
     # The following is needed for codesign in OS X >= 10.9.5
     with current_dir(x):
         os.symlink(basename(curr), 'Versions/Current')
         for y in ('Python', 'Resources'):
             os.symlink('Versions/Current/%s'%y, y)
Esempio n. 4
0
 def add_qt_framework(self, f):
     libname = f
     f = f + '.framework'
     src = join(SW, 'qt', 'lib', f)
     ignore = shutil.ignore_patterns('Headers', '*.h', 'Headers/*')
     dest = join(self.frameworks_dir, f)
     shutil.copytree(src, dest, symlinks=True, ignore=ignore)
     lib = os.path.realpath(join(dest, libname))
     rpath = os.path.relpath(lib, self.frameworks_dir)
     self.set_id(lib, self.FID + '/' + rpath)
     self.fix_dependencies_in_lib(lib)
     # The following is needed for codesign in OS X >= 10.9.5
     # The presence of the .prl file in the root of the framework causes
     # codesign to fail.
     with current_dir(dest):
         for x in os.listdir('.'):
             if x != 'Versions' and not os.path.islink(x):
                 os.remove(x)
Esempio n. 5
0
 def add_qt_framework(self, f):
     libname = f
     f = f+'.framework'
     src = join(SW, 'qt', 'lib', f)
     ignore = shutil.ignore_patterns('Headers', '*.h', 'Headers/*')
     dest = join(self.frameworks_dir, f)
     shutil.copytree(src, dest, symlinks=True,
             ignore=ignore)
     lib = os.path.realpath(join(dest, libname))
     rpath = os.path.relpath(lib, self.frameworks_dir)
     self.set_id(lib, self.FID+'/'+rpath)
     self.fix_dependencies_in_lib(lib)
     # The following is needed for codesign in OS X >= 10.9.5
     # The presence of the .prl file in the root of the framework causes
     # codesign to fail.
     with current_dir(dest):
         for x in os.listdir('.'):
             if x != 'Versions' and not os.path.islink(x):
                 os.remove(x)
Esempio n. 6
0
 def add_qt_framework(self, f):
     libname = f
     f = f + '.framework'
     src = join(SW, 'qt', 'lib', f)
     ignore = shutil.ignore_patterns('Headers', '*.h', 'Headers/*')
     dest = join(self.frameworks_dir, f)
     shutil.copytree(src, dest, symlinks=True, ignore=ignore)
     lib = os.path.realpath(join(dest, libname))
     rpath = os.path.relpath(lib, self.frameworks_dir)
     self.set_id(lib, self.FID + '/' + rpath)
     self.fix_dependencies_in_lib(lib)
     # The following is needed for codesign in OS X >= 10.9.5
     # See https://bugreports.qt-project.org/browse/QTBUG-32895
     with current_dir(dest):
         os.rename('Contents', 'Versions/Current/Resources')
         os.symlink('Versions/Current/Resources', 'Resources')
         for x in os.listdir('.'):
             if x != 'Versions' and not os.path.islink(x):
                 os.remove(x)
Esempio n. 7
0
 def add_qt_framework(self, f):
     libname = f
     f = f + ".framework"
     src = join(SW, "qt", "lib", f)
     ignore = shutil.ignore_patterns("Headers", "*.h", "Headers/*")
     dest = join(self.frameworks_dir, f)
     shutil.copytree(src, dest, symlinks=True, ignore=ignore)
     lib = os.path.realpath(join(dest, libname))
     rpath = os.path.relpath(lib, self.frameworks_dir)
     self.set_id(lib, self.FID + "/" + rpath)
     self.fix_dependencies_in_lib(lib)
     # The following is needed for codesign in OS X >= 10.9.5
     # See https://bugreports.qt-project.org/browse/QTBUG-32895
     with current_dir(dest):
         os.rename("Contents", "Versions/Current/Resources")
         os.symlink("Versions/Current/Resources", "Resources")
         for x in os.listdir("."):
             if x != "Versions" and not os.path.islink(x):
                 os.remove(x)
Esempio n. 8
0
 def add_qt_framework(self, f):
     libname = f
     f = f+'.framework'
     src = join(SW, 'qt', 'lib', f)
     ignore = shutil.ignore_patterns('Headers', '*.h', 'Headers/*')
     dest = join(self.frameworks_dir, f)
     shutil.copytree(src, dest, symlinks=True,
             ignore=ignore)
     lib = os.path.realpath(join(dest, libname))
     rpath = os.path.relpath(lib, self.frameworks_dir)
     self.set_id(lib, self.FID+'/'+rpath)
     self.fix_dependencies_in_lib(lib)
     # The following is needed for codesign in OS X >= 10.9.5
     # See https://bugreports.qt-project.org/browse/QTBUG-32895
     with current_dir(dest):
         os.rename('Contents', 'Versions/Current/Resources')
         os.symlink('Versions/Current/Resources', 'Resources')
         for x in os.listdir('.'):
             if x != 'Versions' and not os.path.islink(x):
                 os.remove(x)