From d3e720d8f23b435026f29ade1f6fce320cc6af04 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Sat, 27 Jun 2015 01:30:45 +0200 Subject: fix an old installer error with rpath. This bug is old, but showed up after I tried to build parts of PySide for Qt5. Problem: There are rpath entries which don't trigger creation of an rpath command. This can be seen when Qt is not linked, and qtcore has an explicit path. --- setup.py | 8 ++++---- utils.py | 16 +++++++++++----- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index 27ea30eeb..b2798e243 100644 --- a/setup.py +++ b/setup.py @@ -932,10 +932,10 @@ class pyside_build(_build): raise RuntimeError("Error patching rpath in " + srcpath) elif sys.platform == 'darwin': - pyside_libs = [lib for lib in os.listdir(package_path) if filter_match( + pyside_libs = [lib for lib in os.listdir(package_path) if filter_match( lib, ["*.so", "*.dylib"])] - def rpath_cmd(srcpath): - osx_localize_libpaths(srcpath, pyside_libs, None) + def rpath_cmd(srcpath): + osx_localize_libpaths(srcpath, pyside_libs, None) else: raise RuntimeError('Not configured for platform ' + @@ -951,7 +951,7 @@ class pyside_build(_build): if not os.path.exists(srcpath): continue rpath_cmd(srcpath) - print("Patched rpath to '$ORIGIN/' in %s." % (srcpath)) + print("Patched rpath to '$ORIGIN/' (Linux) or updated rpath (OS/X) in %s." % (srcpath)) try: diff --git a/utils.py b/utils.py index a1634a139..b8a40dd01 100644 --- a/utils.py +++ b/utils.py @@ -578,11 +578,17 @@ def osx_localize_libpaths(libpath, local_libs, enc_path=None): install_names = osx_get_install_names(libpath) need_rpath = False for install_name in install_names: - if install_name[0] in '/@': + if install_name[0] == '/': + # absolute path, nothing to do continue - back_tick('install_name_tool -change %s @rpath/%s %s' % - (install_name, install_name, libpath)) + # we possibly need to add an rpath command. + # note that a @rpath may be there already, but no rpath command. + # this happens when Qt is not linked (with qt5 this is the default) need_rpath = True + if install_name[0] != '@': + # we need to change a relative path to @rpath + back_tick('install_name_tool -change {ina} @rpath/{ina} {lipa}'.format( + ina=install_name, lipa=libpath )) if need_rpath and enc_path not in osx_get_rpaths(libpath): - back_tick('install_name_tool -add_rpath %s %s' % - (enc_path, libpath)) + back_tick('install_name_tool -add_rpath {epa} {lipa}'.format( + epa=enc_path, lipa=libpath )) -- cgit v1.2.3 From cd13ccdfa495e55e4bfb3ecfd01855c348edcbbc Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Sat, 27 Jun 2015 03:26:13 +0200 Subject: adjust sub repos --- sources/pyside2 | 2 +- sources/shiboken2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/pyside2 b/sources/pyside2 index cd0f27e72..667b48159 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit cd0f27e7219c64fe6a4a079892f75d1a6af726be +Subproject commit 667b4815923b1c8f17bfebbbe233a6e89f7e9fe5 diff --git a/sources/shiboken2 b/sources/shiboken2 index af111f163..548654047 160000 --- a/sources/shiboken2 +++ b/sources/shiboken2 @@ -1 +1 @@ -Subproject commit af111f1634bbaea5e7685fc89ae14dc2c2933376 +Subproject commit 54865404733ce944e0ea939157bedcdd228b2210 -- cgit v1.2.3 From f2e5162cf02047deff1119e73d787b363cb84d04 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Sun, 5 Jul 2015 07:57:10 +0200 Subject: transition to pyside-examples2 --- .gitmodules | 7 +- checklibs.py | 318 +++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 2 +- sources/pyside-examples | 1 - sources/pyside-examples2 | 1 + sources/pyside-tools2 | 2 +- sources/pyside2 | 2 +- sources/shiboken2 | 2 +- 8 files changed, 327 insertions(+), 8 deletions(-) create mode 100644 checklibs.py delete mode 160000 sources/pyside-examples create mode 160000 sources/pyside-examples2 diff --git a/.gitmodules b/.gitmodules index 221a929bf..08eb8ddd6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,9 +2,6 @@ path = sources/pyside2 url = https://bitbucket.org/ctismer/pyside2 branch = qt5 -[submodule "sources/pyside-examples"] - path = sources/pyside-examples - url = https://github.com/PySide/Examples.git [submodule "sources/shiboken2"] path = sources/shiboken2 url = https://bitbucket.org/ctismer/shiboken2 @@ -13,3 +10,7 @@ path = sources/pyside-tools2 url = https://bitbucket.org/ctismer/pyside-tools2 branch = qt5 +[submodule "sources/pyside-examples2"] + path = sources/pyside-examples2 + url = https://bitbucket.org/ctismer/pyside-examples2 + branch = qt5 diff --git a/checklibs.py b/checklibs.py new file mode 100644 index 000000000..ff4d51ae8 --- /dev/null +++ b/checklibs.py @@ -0,0 +1,318 @@ +#!/usr/bin/env python +# +# checklibs.py +# +# Check Mach-O dependencies. +# +# See http://www.entropy.ch/blog/Developer/2011/03/05/2011-Update-to-checklibs-Script-for-dynamic-library-dependencies.html +# +# Written by Marc Liyanage +# +# + +import subprocess, sys, re, os.path, optparse, collections +from pprint import pprint + + +class MachOFile: + + def __init__(self, image_path, arch, parent = None): + self.image_path = image_path + self._dependencies = [] + self._cache = dict(paths = {}, order = []) + self.arch = arch + self.parent = parent + self.header_info = {} + self.load_info() + self.add_to_cache() + + def load_info(self): + if not self.image_path.exists(): + return + self.load_header() + self.load_rpaths() + + def load_header(self): + # Get the mach-o header info, we're interested in the file type (executable, dylib) + cmd = 'otool -arch {0} -h "{1}"' + output = self.shell(cmd, [self.arch, self.image_path.resolved_path], fatal = True) + if not output: + print >> sys.stderr, 'Unable to load mach header for {0} ({1}), architecture mismatch? Use --arch option to pick architecture'.format(self.image_path.resolved_path, self.arch) + exit() + (keys, values) = output.splitlines()[2:] + self.header_info = dict(zip(keys.split(), values.split())) + + def load_rpaths(self): + output = self.shell('otool -arch {0} -l "{1}"', [self.arch, self.image_path.resolved_path], fatal = True) + load_commands = re.split('Load command (\d+)', output)[1:] # skip file name on first line + self._rpaths = [] + load_commands = collections.deque(load_commands) + while load_commands: + load_commands.popleft() # command index + command = load_commands.popleft().strip().splitlines() + if command[0].find('LC_RPATH') == -1: + continue + + path = re.findall('path (.+) \(offset \d+\)$', command[2])[0] + image_path = self.image_path_for_recorded_path(path) + image_path.rpath_source = self + self._rpaths.append(image_path) + + def ancestors(self): + ancestors = [] + parent = self.parent + while parent: + ancestors.append(parent) + parent = parent.parent + + return ancestors + + def self_and_ancestors(self): + return [self] + self.ancestors() + + def rpaths(self): + return self._rpaths + + def all_rpaths(self): + rpaths = [] + for image in self.self_and_ancestors(): + rpaths.extend(image.rpaths()) + return rpaths + + def root(self): + if not self.parent: + return self + return self.ancestors()[-1] + + def executable_path(self): + root = self.root() + if root.is_executable(): + return root.image_path + return None + + def filetype(self): + return long(self.header_info.get('filetype', 0)) + + def is_dylib(self): + return self.filetype() == MachOFile.MH_DYLIB + + def is_executable(self): + return self.filetype() == MachOFile.MH_EXECUTE + + def all_dependencies(self): + self.walk_dependencies() + return self.cache()['order'] + + def walk_dependencies(self, known = {}): + if known.get(self.image_path.resolved_path): + return + + known[self.image_path.resolved_path] = self + + for item in self.dependencies(): + item.walk_dependencies(known) + + def dependencies(self): + if not self.image_path.exists(): + return [] + + if self._dependencies: + return self._dependencies + + output = self.shell('otool -arch {0} -L "{1}"', [self.arch, self.image_path.resolved_path], fatal = True) + output = [line.strip() for line in output.splitlines()] + del(output[0]) + if self.is_dylib(): + del(output[0]) # In the case of dylibs, the first line is the id line + + self._dependencies = [] + for line in output: + match = re.match('^(.+)\s+(\(.+)\)$', line) + if not match: + continue + recorded_path = match.group(1) + image_path = self.image_path_for_recorded_path(recorded_path) + image = self.lookup_or_make_item(image_path) + self._dependencies.append(image) + + return self._dependencies + + # The root item holds the cache, all lower-level requests bubble up the parent chain + def cache(self): + if self.parent: + return self.parent.cache() + return self._cache + + def add_to_cache(self): + cache = self.cache() + cache['paths'][self.image_path.resolved_path] = self + cache['order'].append(self) + + def cached_item_for_path(self, path): + if not path: + return None + return self.cache()['paths'].get(path) + + def lookup_or_make_item(self, image_path): + image = self.cached_item_for_path(image_path.resolved_path) + if not image: # cache miss + image = MachOFile(image_path, self.arch, parent = self) + return image + + def image_path_for_recorded_path(self, recorded_path): + path = ImagePath(None, recorded_path) + + # handle @executable_path + if recorded_path.startswith(ImagePath.EXECUTABLE_PATH_TOKEN): + executable_image_path = self.executable_path() + if executable_image_path: + path.resolved_path = os.path.normpath(recorded_path.replace(ImagePath.EXECUTABLE_PATH_TOKEN, os.path.dirname(executable_image_path.resolved_path))) + + # handle @loader_path + elif recorded_path.startswith(ImagePath.LOADER_PATH_TOKEN): + path.resolved_path = os.path.normpath(recorded_path.replace(ImagePath.LOADER_PATH_TOKEN, os.path.dirname(self.image_path.resolved_path))) + + # handle @rpath + elif recorded_path.startswith(ImagePath.RPATH_TOKEN): + for rpath in self.all_rpaths(): + resolved_path = os.path.normpath(recorded_path.replace(ImagePath.RPATH_TOKEN, rpath.resolved_path)) + if os.path.exists(resolved_path): + path.resolved_path = resolved_path + path.rpath_source = rpath.rpath_source + break + + # handle absolute path + elif recorded_path.startswith('/'): + path.resolved_path = recorded_path + + return path + + def __repr__(self): + return str(self.image_path) + + def dump(self): + print self.image_path + for dependency in self.dependencies(): + print '\t{0}'.format(dependency) + + @staticmethod + def shell(cmd_format, args, fatal = False): + cmd = cmd_format.format(*args) + popen = subprocess.Popen(cmd, shell = True, stdout = subprocess.PIPE) + output = popen.communicate()[0] + if popen.returncode and fatal: + print >> sys.stderr, 'Nonzero exit status for shell command "{0}"'.format(cmd) + sys.exit(1) + + return output + + @classmethod + def architectures_for_image_at_path(cls, path): + output = cls.shell('file "{}"', [path]) + file_architectures = re.findall(r' executable (\w+)', output) + ordering = 'x86_64 i386'.split() + file_architectures = sorted(file_architectures, lambda a, b: cmp(ordering.index(a), ordering.index(b))) + return file_architectures + + MH_EXECUTE = 0x2 + MH_DYLIB = 0x6 + MH_BUNDLE = 0x8 + + +# ANSI terminal coloring sequences +class Color: + HEADER = '\033[95m' + BLUE = '\033[94m' + GREEN = '\033[92m' + RED = '\033[91m' + ENDC = '\033[0m' + + @staticmethod + def red(string): + return Color.wrap(string, Color.RED) + + @staticmethod + def blue(string): + return Color.wrap(string, Color.BLUE) + + @staticmethod + def wrap(string, color): + return Color.HEADER + color + string + Color.ENDC + + +# This class holds path information for a mach-0 image file. It holds the path as it was recorded +# in the loading binary as well as the effective, resolved file system path. +# The former can contain @-replacement tokens. +# In the case where the recorded path contains an @rpath token that was resolved successfully, we also +# capture the path of the binary that supplied the rpath value that was used. +# That path itself can contain replacement tokens such as @loader_path. +class ImagePath: + + def __init__(self, resolved_path, recorded_path = None): + self.recorded_path = recorded_path + self.resolved_path = resolved_path + self.rpath_source = None + + def __repr__(self): + description = None + + if self.resolved_equals_recorded() or self.recorded_path == None: + description = self.resolved_path + else: + description = '{0} ({1})'.format(self.resolved_path, self.recorded_path) + + if (not self.is_system_location()) and (not self.uses_dyld_token()): + description = Color.blue(description) + + if self.rpath_source: + description += ' (rpath source: {0})'.format(self.rpath_source.image_path.resolved_path) + + if not self.exists(): + description += Color.red(' (missing)') + + return description + + def exists(self): + return self.resolved_path and os.path.exists(self.resolved_path) + + def resolved_equals_recorded(self): + return self.resolved_path and self.recorded_path and self.resolved_path == self.recorded_path + + def uses_dyld_token(self): + return self.recorded_path and self.recorded_path.startswith('@') + + def is_system_location(self): + system_prefixes = ['/System/Library', '/usr/lib'] + for prefix in system_prefixes: + if self.resolved_path and self.resolved_path.startswith(prefix): + return True + + EXECUTABLE_PATH_TOKEN = '@executable_path' + LOADER_PATH_TOKEN = '@loader_path' + RPATH_TOKEN = '@rpath' + + +# Command line driver +parser = optparse.OptionParser(usage = "Usage: %prog [options] path_to_mach_o_file") +parser.add_option("--arch", dest = "arch", help = "architecture", metavar = "ARCH") +parser.add_option("--all", dest = "include_system_libraries", help = "Include system frameworks and libraries", action="store_true") +(options, args) = parser.parse_args() + +if len(args) < 1: + parser.print_help() + sys.exit(1) + +archs = MachOFile.architectures_for_image_at_path(args[0]) +if archs and not options.arch: + print >> sys.stderr, 'Analyzing architecture {}, override with --arch if needed'.format(archs[0]) + options.arch = archs[0] + +toplevel_image = MachOFile(ImagePath(args[0]), options.arch) + +for dependency in toplevel_image.all_dependencies(): + if dependency.image_path.exists() and (not options.include_system_libraries) and dependency.image_path.is_system_location(): + continue + + dependency.dump() + print + diff --git a/setup.py b/setup.py index b2798e243..760fdd36f 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ submodules = { ["shiboken2", "qt5"], ["pyside2", "qt5"], ["pyside-tools2", "qt5"], - ["pyside-examples", "master"], + ["pyside-examples2", "qt5"], ], '1.3.0dev': [ ["shiboken", "master"], diff --git a/sources/pyside-examples b/sources/pyside-examples deleted file mode 160000 index df4f44b6a..000000000 --- a/sources/pyside-examples +++ /dev/null @@ -1 +0,0 @@ -Subproject commit df4f44b6aeb08f27da270392f5d9dc2e2f28e3a1 diff --git a/sources/pyside-examples2 b/sources/pyside-examples2 new file mode 160000 index 000000000..0d814764d --- /dev/null +++ b/sources/pyside-examples2 @@ -0,0 +1 @@ +Subproject commit 0d814764dd2d34553b4f4d8f34a0641457a21a7c diff --git a/sources/pyside-tools2 b/sources/pyside-tools2 index d7f2a9bc3..187123684 160000 --- a/sources/pyside-tools2 +++ b/sources/pyside-tools2 @@ -1 +1 @@ -Subproject commit d7f2a9bc3d228884235f19e1e73d132e7db39deb +Subproject commit 1871236847faa002737f7999c3fcc31cf848499c diff --git a/sources/pyside2 b/sources/pyside2 index 667b48159..99ea8dec7 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit 667b4815923b1c8f17bfebbbe233a6e89f7e9fe5 +Subproject commit 99ea8dec72c9a250bd0d0aeec5ca11edb9aa0d62 diff --git a/sources/shiboken2 b/sources/shiboken2 index 548654047..963ff1fdf 160000 --- a/sources/shiboken2 +++ b/sources/shiboken2 @@ -1 +1 @@ -Subproject commit 54865404733ce944e0ea939157bedcdd228b2210 +Subproject commit 963ff1fdf0172bf6aa87660802432c208ffab56c -- cgit v1.2.3 From 06a60584b71eb24ceaa9738bcab185d8a47fdc35 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Mon, 6 Jul 2015 00:11:29 +0200 Subject: support renamed pyside-examples folder --- setup.py | 17 ++++++++++++----- sources/pyside2 | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 760fdd36f..020a53f0d 100644 --- a/setup.py +++ b/setup.py @@ -113,6 +113,12 @@ from utils import regenerate_qt_resources from utils import filter_match from utils import osx_localize_libpaths +# guess a close folder name for extensions +def get_extension_folder(ext): + maybe = list(map(lambda x:x[0], submodules[__version__])) + folder = difflib.get_close_matches(ext, maybe)[0] + return folder + # Declare options OPTION_DEBUG = has_option("debug") OPTION_RELWITHDEBINFO = has_option('relwithdebinfo') @@ -203,7 +209,7 @@ Use --list-versions option to get list of available versions""" % OPTION_VERSION if OPTION_NOEXAMPLES: # remove pyside-exampes from submodules so they will not be included for idx, item in enumerate(submodules[__version__]): - if item[0] == 'pyside-examples': + if item[0].startswith('pyside-examples'): del submodules[__version__][idx] @@ -536,8 +542,7 @@ class pyside_build(_build): def build_extension(self, extension): # calculate the subrepos folder name - maybe = list(map(lambda x:x[0], submodules[__version__])) - folder = difflib.get_close_matches(extension, maybe)[0] + folder = get_extension_folder(extension) log.info("Building module %s..." % extension) @@ -717,8 +722,9 @@ class pyside_build(_build): vars=vars) if not OPTION_NOEXAMPLES: # /pyside-examples/examples/* -> /PySide/examples + folder = get_extension_folder('pyside-examples') copydir( - "{sources_dir}/pyside-examples/examples", + "{sources_dir}/%s/examples" % folder, "{dist_dir}/PySide/examples", force=False, vars=vars) # Re-generate examples Qt resource files for Python 3 compatibility @@ -836,8 +842,9 @@ class pyside_build(_build): vars=vars) if not OPTION_NOEXAMPLES: # /pyside-examples/examples/* -> /PySide/examples + folder = get_extension_folder('pyside-examples') copydir( - "{sources_dir}/pyside-examples/examples", + "{sources_dir}/%s/examples" % folder, "{dist_dir}/PySide/examples", force=False, vars=vars) # Re-generate examples Qt resource files for Python 3 compatibility diff --git a/sources/pyside2 b/sources/pyside2 index 99ea8dec7..c4e2fb03a 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit 99ea8dec72c9a250bd0d0aeec5ca11edb9aa0d62 +Subproject commit c4e2fb03ad7a996d30a9ed34182996b19ecddc38 -- cgit v1.2.3 From 58e895b740173f4c575a6cbd13c476c085d47329 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Tue, 7 Jul 2015 01:50:09 +0200 Subject: update sub repos --- sources/pyside2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pyside2 b/sources/pyside2 index c4e2fb03a..7ad76d7c9 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit c4e2fb03ad7a996d30a9ed34182996b19ecddc38 +Subproject commit 7ad76d7c92ab00dbb3a178295eeb5de267d482e7 -- cgit v1.2.3 From 213d5f8a1f79ecbe04a75aa417804215ef4e5ac0 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Wed, 8 Jul 2015 17:33:11 +0200 Subject: update sub-repos --- sources/pyside2 | 2 +- sources/shiboken2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/pyside2 b/sources/pyside2 index 7ad76d7c9..8b253b47d 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit 7ad76d7c92ab00dbb3a178295eeb5de267d482e7 +Subproject commit 8b253b47de00847fea5a7f57c47a27d85e948967 diff --git a/sources/shiboken2 b/sources/shiboken2 index 963ff1fdf..70afb33fd 160000 --- a/sources/shiboken2 +++ b/sources/shiboken2 @@ -1 +1 @@ -Subproject commit 963ff1fdf0172bf6aa87660802432c208ffab56c +Subproject commit 70afb33fd3e9e87ac86f635ba88e005af5eabf86 -- cgit v1.2.3 From 82d638b30b4bdee87faf5324108c9d0da6acc761 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Tue, 14 Jul 2015 09:27:03 +0200 Subject: update sub-repo --- sources/pyside2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pyside2 b/sources/pyside2 index 8b253b47d..d11801d4d 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit 8b253b47de00847fea5a7f57c47a27d85e948967 +Subproject commit d11801d4d00c180f3416919ffb040d21e82cab8e -- cgit v1.2.3 From 5acd8ae260af22950024dd40f2e65da253cb6e26 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Thu, 16 Jul 2015 16:40:26 +0200 Subject: support the location of the installed Qt5 docs. This configuration needs to be set by setup.py and is then known in the make files. --- qtinfo.py | 4 ++++ setup.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/qtinfo.py b/qtinfo.py index 631adb667..7c4cde76b 100644 --- a/qtinfo.py +++ b/qtinfo.py @@ -33,6 +33,9 @@ class QtInfo(object): def getHeadersPath(self): return self.getProperty("QT_INSTALL_HEADERS") + def getDocsPath(self): + return self.getProperty("QT_INSTALL_DOCS") + def getProperty(self, prop_name): cmd = [self._qmake_path, "-query", prop_name] proc = subprocess.Popen(cmd, stdout = subprocess.PIPE, shell=False) @@ -52,3 +55,4 @@ class QtInfo(object): imports_dir = property(getImportsPath) translations_dir = property(getTranslationsPath) headers_dir = property(getHeadersPath) + docs_dir = property(getDocsPath) diff --git a/setup.py b/setup.py index 020a53f0d..f9451d840 100644 --- a/setup.py +++ b/setup.py @@ -496,6 +496,7 @@ class pyside_build(_build): log.info("Qt qmake: %s" % self.qmake_path) log.info("Qt version: %s" % qtinfo.version) log.info("Qt bins: %s" % qtinfo.bins_dir) + log.info("Qt docs: %s" % qtinfo.docs_dir) log.info("Qt plugins: %s" % qtinfo.plugins_dir) log.info("-" * 3) log.info("OpenSSL libs: %s" % OPTION_OPENSSL) @@ -569,6 +570,7 @@ class pyside_build(_build): "-DQT_QMAKE_EXECUTABLE=%s" % self.qmake_path, "-DBUILD_TESTS=%s" % self.build_tests, "-DDISABLE_DOCSTRINGS=True", + "-DQt5Help_DIR=%s" % self.qtinfo.docs_dir, "-DCMAKE_BUILD_TYPE=%s" % self.build_type, "-DCMAKE_INSTALL_PREFIX=%s" % self.install_dir, module_src_dir @@ -639,6 +641,7 @@ class pyside_build(_build): "py_version": self.py_version, "qt_version": self.qtinfo.version, "qt_bin_dir": self.qtinfo.bins_dir, + "qt_doc_dir": self.qtinfo.docs_dir, "qt_lib_dir": self.qtinfo.libs_dir, "qt_plugins_dir": self.qtinfo.plugins_dir, "qt_imports_dir": self.qtinfo.imports_dir, -- cgit v1.2.3 From 7bf0147397b74b4a3e12bae51b06d4de185a5c67 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Sun, 19 Jul 2015 00:51:59 +0200 Subject: update sub-repos --- sources/pyside2 | 2 +- sources/shiboken2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/pyside2 b/sources/pyside2 index d11801d4d..9c90cb744 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit d11801d4d00c180f3416919ffb040d21e82cab8e +Subproject commit 9c90cb744ec7a6d503bddd7b5c8d5aec03df3b39 diff --git a/sources/shiboken2 b/sources/shiboken2 index 70afb33fd..81e19b94a 160000 --- a/sources/shiboken2 +++ b/sources/shiboken2 @@ -1 +1 @@ -Subproject commit 70afb33fd3e9e87ac86f635ba88e005af5eabf86 +Subproject commit 81e19b94a2ae7c2daec94d7422cc3700734dc459 -- cgit v1.2.3 From 4370956e0517dba28908aaa6d6d63db25a15946f Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Tue, 21 Jul 2015 10:27:49 +0200 Subject: update sub-repos --- sources/pyside2 | 2 +- sources/shiboken2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/pyside2 b/sources/pyside2 index 9c90cb744..5966329c6 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit 9c90cb744ec7a6d503bddd7b5c8d5aec03df3b39 +Subproject commit 5966329c62ce0f1a1b901b4b64988d6ba917bd43 diff --git a/sources/shiboken2 b/sources/shiboken2 index 81e19b94a..5c50ed1d8 160000 --- a/sources/shiboken2 +++ b/sources/shiboken2 @@ -1 +1 @@ -Subproject commit 81e19b94a2ae7c2daec94d7422cc3700734dc459 +Subproject commit 5c50ed1d83125b0e8ab6565bb59c7a8c2c2af39b -- cgit v1.2.3 From 4c37babe0eb0390a96f68628d0108a2c606f3451 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Mon, 27 Jul 2015 23:36:12 +0200 Subject: update sub-repos --- sources/pyside2 | 2 +- sources/shiboken2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/pyside2 b/sources/pyside2 index 5966329c6..290fe8baa 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit 5966329c62ce0f1a1b901b4b64988d6ba917bd43 +Subproject commit 290fe8baa3ca83afd71818e54e760186f7e89b7c diff --git a/sources/shiboken2 b/sources/shiboken2 index 5c50ed1d8..70b88893e 160000 --- a/sources/shiboken2 +++ b/sources/shiboken2 @@ -1 +1 @@ -Subproject commit 5c50ed1d83125b0e8ab6565bb59c7a8c2c2af39b +Subproject commit 70b88893e95589dc5c42638e0dff1b408e1d1c32 -- cgit v1.2.3 From 48493c6950c9df97bc4b084eb59594ed00a5631d Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Mon, 27 Jul 2015 23:42:20 +0200 Subject: update sub-repos --- sources/pyside2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pyside2 b/sources/pyside2 index 5966329c6..0efd5b947 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit 5966329c62ce0f1a1b901b4b64988d6ba917bd43 +Subproject commit 0efd5b947b96d154473bb3b8723306073fd0aed5 -- cgit v1.2.3 From 1c1969a8d62fec6d7293faaa0869e5f34dda8b8a Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Mon, 27 Jul 2015 23:42:20 +0200 Subject: update sub-repos --- sources/pyside2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pyside2 b/sources/pyside2 index 5966329c6..95d634737 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit 5966329c62ce0f1a1b901b4b64988d6ba917bd43 +Subproject commit 95d63473797f569bc673bd3c5e393623ee408c98 -- cgit v1.2.3 From 4666f0869b2879bb37e1b5b5e867355bdbfe6f31 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Mon, 10 Aug 2015 11:29:49 +0200 Subject: update sub-repos --- sources/pyside2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pyside2 b/sources/pyside2 index 95d634737..c5539eed9 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit 95d63473797f569bc673bd3c5e393623ee408c98 +Subproject commit c5539eed974e5a6ce7a55f69e88e9b477fafa99e -- cgit v1.2.3 From 5a31e29dccd7bd13c0d36c28218243afe3d76e98 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Sun, 16 Aug 2015 02:35:32 +0200 Subject: be more forgiving when file trees cannot be removed (happens often during window debugging) --- setup.py | 15 ++++++++++++--- sources/pyside2 | 2 +- sources/shiboken2 | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index f9451d840..7bb2d7af9 100644 --- a/setup.py +++ b/setup.py @@ -242,7 +242,11 @@ for n in ["pyside_package", "build", "PySide-%s" % __version__]: d = os.path.join(script_dir, n) if os.path.isdir(d): print("Removing %s" % d) - rmtree(d) + try: + rmtree(d) + except Exception as e: + print('***** problem removing "{}"'.format(d)) + print('ignored error: {}'.format(e)) # Prepare package folders for pkg in ["pyside_package/PySide", "pyside_package/pysideuic"]: @@ -556,9 +560,14 @@ class pyside_build(_build): return if os.path.exists(module_build_dir): log.info("Deleting module build folder %s..." % module_build_dir) - rmtree(module_build_dir) + try: + rmtree(module_build_dir) + except Exception as e: + print('***** problem removing "{}"'.format(module_build_dir)) + print('ignored error: {}'.format(e)) log.info("Creating module build folder %s..." % module_build_dir) - os.makedirs(module_build_dir) + if not os.path.exists(module_build_dir): + os.makedirs(module_build_dir) os.chdir(module_build_dir) module_src_dir = os.path.join(self.sources_dir, folder) diff --git a/sources/pyside2 b/sources/pyside2 index c5539eed9..b480da560 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit c5539eed974e5a6ce7a55f69e88e9b477fafa99e +Subproject commit b480da5601c9725094080a900b2c82d986483982 diff --git a/sources/shiboken2 b/sources/shiboken2 index 70b88893e..28f1649a3 160000 --- a/sources/shiboken2 +++ b/sources/shiboken2 @@ -1 +1 @@ -Subproject commit 70b88893e95589dc5c42638e0dff1b408e1d1c32 +Subproject commit 28f1649a34d386966059b23d69ebd34433e593f5 -- cgit v1.2.3 From a4bd0f4176c8475260c0b94ba56ee0a480a51536 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Sun, 16 Aug 2015 22:31:39 +0200 Subject: update sub-repos --- sources/pyside-tools2 | 2 +- sources/pyside2 | 2 +- sources/shiboken2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/pyside-tools2 b/sources/pyside-tools2 index 187123684..a71b6d189 160000 --- a/sources/pyside-tools2 +++ b/sources/pyside-tools2 @@ -1 +1 @@ -Subproject commit 1871236847faa002737f7999c3fcc31cf848499c +Subproject commit a71b6d189fac12d24c201ba367aa6c6e5a802c13 diff --git a/sources/pyside2 b/sources/pyside2 index b480da560..8bb976244 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit b480da5601c9725094080a900b2c82d986483982 +Subproject commit 8bb9762445116d9b000fbe2993f93c2256086516 diff --git a/sources/shiboken2 b/sources/shiboken2 index 28f1649a3..3744b4275 160000 --- a/sources/shiboken2 +++ b/sources/shiboken2 @@ -1 +1 @@ -Subproject commit 28f1649a34d386966059b23d69ebd34433e593f5 +Subproject commit 3744b4275f1402a7cf86015da54d7592c9fb6e09 -- cgit v1.2.3 From d4dfb97cedc94bbc91f035cd709201f24a5757d5 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Tue, 25 Aug 2015 04:00:37 +0200 Subject: update sub-repos --- sources/pyside2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pyside2 b/sources/pyside2 index 8bb976244..ace45ad97 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit 8bb9762445116d9b000fbe2993f93c2256086516 +Subproject commit ace45ad9773ee15050bf0259ceb1a5180264230a -- cgit v1.2.3 From c673bd469a20eaea17ebd6f37aea6b59d83b45e7 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Sat, 12 Sep 2015 19:26:53 +0200 Subject: update submodules --- sources/pyside2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pyside2 b/sources/pyside2 index ace45ad97..1fae0520b 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit ace45ad9773ee15050bf0259ceb1a5180264230a +Subproject commit 1fae0520bac2bb449a0b5b477a7e51e702b4ac98 -- cgit v1.2.3 From 376056018d601dd30c3faa3197e716764b074d13 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Sat, 12 Sep 2015 19:54:13 +0200 Subject: update submodules --- .gitmodules | 8 ++++---- sources/pyside2 | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 08eb8ddd6..4cb5df7dd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,16 +1,16 @@ [submodule "sources/pyside2"] path = sources/pyside2 - url = https://bitbucket.org/ctismer/pyside2 +url=https://github.com/PySide/pyside2 branch = qt5 [submodule "sources/shiboken2"] path = sources/shiboken2 - url = https://bitbucket.org/ctismer/shiboken2 +url=https://github.com/PySide/shiboken2 branch = qt5 [submodule "sources/pyside-tools2"] path = sources/pyside-tools2 - url = https://bitbucket.org/ctismer/pyside-tools2 +url=https://github.com/PySide/pyside-tools2 branch = qt5 [submodule "sources/pyside-examples2"] path = sources/pyside-examples2 - url = https://bitbucket.org/ctismer/pyside-examples2 +url=https://github.com/PySide/pyside-examples2 branch = qt5 diff --git a/sources/pyside2 b/sources/pyside2 index ace45ad97..1fae0520b 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit ace45ad9773ee15050bf0259ceb1a5180264230a +Subproject commit 1fae0520bac2bb449a0b5b477a7e51e702b4ac98 -- cgit v1.2.3 From ac6d35ebd58e688e285b2736eb52c88f24e623c5 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Tue, 15 Sep 2015 11:41:13 +0200 Subject: small update to state that the docs are still from 4.8 --- README.rst | 14 ++++++++++---- sources/pyside2 | 2 +- sources/shiboken2 | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 809354c7f..74b382ac5 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,6 @@ -====== -PySide -====== +======= +PySide2 +======= .. image:: https://pypip.in/wheel/PySide/badge.png :target: https://pypi.python.org/pypi/PySide/ @@ -27,6 +27,12 @@ PySide Introduction ============ +.. note:: + + This text is from PySide 1.2.X. We need to update it when + PySide2 for Qt5 is more ready. + + PySide is the Python Qt bindings project, providing access the complete Qt 4.8 framework as well as to generator tools for rapidly generating bindings for any C++ libraries. @@ -45,7 +51,7 @@ PySide requires Python 2.6 or later and Qt 4.6 or better. .. note:: - Qt 5.x is currently not supported. + Qt 5.x is currently in the works. Installation ============ diff --git a/sources/pyside2 b/sources/pyside2 index 1fae0520b..970c0d536 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit 1fae0520bac2bb449a0b5b477a7e51e702b4ac98 +Subproject commit 970c0d536994a14ab7faeea3b1c30793d5ecbaa8 diff --git a/sources/shiboken2 b/sources/shiboken2 index 3744b4275..4e76936b3 160000 --- a/sources/shiboken2 +++ b/sources/shiboken2 @@ -1 +1 @@ -Subproject commit 3744b4275f1402a7cf86015da54d7592c9fb6e09 +Subproject commit 4e76936b33886fa653cb11a7f4a17312dd3750c8 -- cgit v1.2.3 From 31660d0e0a3a0270c586809df5924af2ccbf79db Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Tue, 15 Sep 2015 12:34:29 +0200 Subject: trying to fix badges --- README.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 74b382ac5..26ab178e8 100644 --- a/README.rst +++ b/README.rst @@ -2,19 +2,19 @@ PySide2 ======= -.. image:: https://pypip.in/wheel/PySide/badge.png +.. image:: https://img.shields.io/pypi/wheel/pyside.svg :target: https://pypi.python.org/pypi/PySide/ :alt: Wheel Status -.. image:: https://pypip.in/download/PySide/badge.png +.. image:: https://img.shields.io/pypi/dm/pyside.svg :target: https://pypi.python.org/pypi/PySide/ :alt: Downloads -.. image:: https://pypip.in/version/PySide/badge.png +.. image:: https://img.shields.io/pypi/v/pyside.svg :target: https://pypi.python.org/pypi/PySide/ :alt: Latest Version -.. image:: https://pypip.in/license/PySide/badge.png +.. image:: https://binstar.org/asmeurer/pyside/badges/license.svg :target: https://pypi.python.org/pypi/PySide/ :alt: License @@ -29,7 +29,7 @@ Introduction .. note:: - This text is from PySide 1.2.X. We need to update it when + This text is mostly from PySide 1.2.X. We need to update it when PySide2 for Qt5 is more ready. -- cgit v1.2.3 From 0dd99fb749b6b68a79c7f7a9faaa90595e3be9e2 Mon Sep 17 00:00:00 2001 From: empyrical Date: Thu, 17 Sep 2015 02:05:49 -0600 Subject: Fix subprocess.mswindows check for Python 3.5 --- popenasync.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/popenasync.py b/popenasync.py index df4944ee7..78ae1cbf3 100644 --- a/popenasync.py +++ b/popenasync.py @@ -23,7 +23,12 @@ if sys.version_info >= (3,): else: null_byte = '\x00' -if subprocess.mswindows: +if hasattr(subprocess, 'mswindows'): + mswindows = subprocess.mswindows +else: + mswindows = subprocess._mswindows + +if mswindows: if sys.version_info >= (3,): # Test date should be in ascii. def encode(s): @@ -142,7 +147,7 @@ class Popen(subprocess.Popen): getattr(self, which).close() setattr(self, which, None) - if subprocess.mswindows: + if mswindows: def kill(self): # Recipes #http://me.in-berlin.de/doc/python/faq/windows.html#how-do-i-emulate-os-kill-in-windows -- cgit v1.2.3 From 9c63384d3e7453c518e55094f5b8639fd0cbcfb5 Mon Sep 17 00:00:00 2001 From: empyrical Date: Thu, 17 Sep 2015 02:49:04 -0600 Subject: Don't use the 'mswindows' private attribute --- popenasync.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/popenasync.py b/popenasync.py index 78ae1cbf3..eb1a238fc 100644 --- a/popenasync.py +++ b/popenasync.py @@ -23,10 +23,7 @@ if sys.version_info >= (3,): else: null_byte = '\x00' -if hasattr(subprocess, 'mswindows'): - mswindows = subprocess.mswindows -else: - mswindows = subprocess._mswindows +mswindows = (sys.platform == "win32") if mswindows: if sys.version_info >= (3,): -- cgit v1.2.3