aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitmodules7
-rw-r--r--setup.py66
m---------sources/pyside-tools0
m---------sources/pyside-tools20
m---------sources/pyside219
5 files changed, 42 insertions, 50 deletions
diff --git a/.gitmodules b/.gitmodules
index dc44c6ab8..221a929bf 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2,9 +2,6 @@
path = sources/pyside2
url = https://bitbucket.org/ctismer/pyside2
branch = qt5
-[submodule "sources/pyside-tools"]
- path = sources/pyside-tools
- url = https://github.com/PySide/Tools.git
[submodule "sources/pyside-examples"]
path = sources/pyside-examples
url = https://github.com/PySide/Examples.git
@@ -12,3 +9,7 @@
path = sources/shiboken2
url = https://bitbucket.org/ctismer/shiboken2
branch = qt5
+[submodule "sources/pyside-tools2"]
+ path = sources/pyside-tools2
+ url = https://bitbucket.org/ctismer/pyside-tools2
+ branch = qt5
diff --git a/setup.py b/setup.py
index a0b1bcee7..1e3496b5e 100644
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@ submodules = {
'2.0.0.dev0': [
["shiboken2", "qt5"],
["pyside2", "qt5"],
- ["pyside-tools", "master"],
+ ["pyside-tools2", "qt5"],
["pyside-examples", "master"],
],
'1.3.0dev': [
@@ -204,8 +204,8 @@ if OPTION_NOEXAMPLES:
for idx, item in enumerate(submodules[__version__]):
if item[0] == 'pyside-examples':
del submodules[__version__][idx]
-
-
+
+
# Initialize, pull and checkout submodules
if os.path.isdir(".git") and not OPTION_IGNOREGIT and not OPTION_ONLYPACKAGE:
print("Initializing submodules for PySide version %s" % __version__)
@@ -312,7 +312,7 @@ class pyside_build(_build):
self.build_type = "Release"
self.qtinfo = None
self.build_tests = False
-
+
def run(self):
platform_arch = platform.architecture()[0]
log.info("Python architecture is %s" % platform_arch)
@@ -362,7 +362,7 @@ class pyside_build(_build):
raise DistutilsSetupError(
"Failed to find qmake."
" Please specify the path to qmake with --qmake parameter.")
-
+
# Prepare parameters
py_executable = sys.executable
py_version = "%s.%s" % (sys.version_info[0], sys.version_info[1])
@@ -412,7 +412,7 @@ class pyside_build(_build):
# the lib and the normal one. This allows a debug PySide to
# be built with a non-debug Python.
lib_exts = [dbgPostfix + e for e in lib_exts] + lib_exts
-
+
libs_tried = []
for lib_ext in lib_exts:
lib_name = "libpython%s%s%s" % (py_version, lib_suff, lib_ext)
@@ -451,25 +451,25 @@ class pyside_build(_build):
if not qt_version:
log.error("Failed to query the Qt version with qmake %s" % qtinfo.qmake_path)
sys.exit(1)
-
+
# Update the PATH environment variable
update_env_path([py_scripts_dir, qt_dir])
-
+
build_name = "py%s-qt%s-%s-%s" % \
(py_version, qt_version, platform.architecture()[0], build_type.lower())
-
+
script_dir = os.getcwd()
sources_dir = os.path.join(script_dir, "sources")
build_dir = os.path.join(script_dir, "pyside_build", "%s" % build_name)
install_dir = os.path.join(script_dir, "pyside_install", "%s" % build_name)
-
+
# Try to ensure that tools built by this script (such as shiboken)
# are found before any that may already be installed on the system.
update_env_path([os.path.join(install_dir, 'bin')])
-
- # Tell cmake to look here for *.cmake files
+
+ # Tell cmake to look here for *.cmake files
os.environ['CMAKE_PREFIX_PATH'] = install_dir
-
+
self.make_path = make_path
self.make_generator = make_generator
self.debug = OPTION_DEBUG
@@ -486,7 +486,7 @@ class pyside_build(_build):
self.qtinfo = qtinfo
self.site_packages_dir = get_python_lib(1, 0, prefix=install_dir)
self.build_tests = OPTION_BUILDTESTS
-
+
log.info("=" * 30)
log.info("Package version: %s" % __version__)
log.info("Build type: %s" % self.build_type)
@@ -515,7 +515,7 @@ class pyside_build(_build):
log.info("-" * 3)
log.info("OpenSSL libs: %s" % OPTION_OPENSSL)
log.info("=" * 30)
-
+
# Prepare folders
if not os.path.exists(self.sources_dir):
log.info("Creating sources folder %s..." % self.sources_dir)
@@ -526,7 +526,7 @@ class pyside_build(_build):
if not os.path.exists(self.install_dir):
log.info("Creating install folder %s..." % self.install_dir)
os.makedirs(self.install_dir)
-
+
if not OPTION_ONLYPACKAGE:
# Build extensions
for ext in ['shiboken', 'pyside', 'pyside-tools']:
@@ -537,7 +537,7 @@ class pyside_build(_build):
# Prepare packages
self.prepare_packages()
-
+
# Build packages
_build.run(self)
@@ -561,7 +561,7 @@ class pyside_build(_build):
folder = difflib.get_close_matches(extension, maybe)[0]
log.info("Building module %s..." % extension)
-
+
# Prepare folders
os.chdir(self.build_dir)
module_build_dir = os.path.join(self.build_dir, extension)
@@ -575,9 +575,9 @@ class pyside_build(_build):
log.info("Creating module build folder %s..." % module_build_dir)
os.makedirs(module_build_dir)
os.chdir(module_build_dir)
-
+
module_src_dir = os.path.join(self.sources_dir, folder)
-
+
# Build module
cmake_cmd = [
OPTION_CMAKE,
@@ -610,34 +610,34 @@ class pyside_build(_build):
cmake_cmd.append("-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes")
if sys.version_info[0] > 2:
cmake_cmd.append("-DUSE_PYTHON3=ON")
-
+
if sys.platform == 'darwin':
cmake_cmd.append('-DALTERNATIVE_QT_INCLUDE_DIR=' + self.qtinfo.headers_dir)
-
+
if OPTION_OSXARCH:
- # also tell cmake which architecture to use
+ # also tell cmake which architecture to use
cmake_cmd.append("-DCMAKE_OSX_ARCHITECTURES:STRING={}".format(OPTION_OSXARCH))
log.info("Configuring module %s (%s)..." % (extension, module_src_dir))
if run_process(cmake_cmd) != 0:
raise DistutilsSetupError("Error configuring " + extension)
-
+
log.info("Compiling module %s..." % extension)
cmd_make = [self.make_path]
if OPTION_JOBS:
cmd_make.append(OPTION_JOBS)
if run_process(cmd_make) != 0:
raise DistutilsSetupError("Error compiling " + extension)
-
+
if extension.lower() == "shiboken":
log.info("Generating Shiboken documentation %s..." % extension)
if run_process([self.make_path, "doc"]) != 0:
raise DistutilsSetupError("Error generating documentation " + extension)
-
+
log.info("Installing module %s..." % extension)
if run_process([self.make_path, "install/fast"]) != 0:
raise DistutilsSetupError("Error pseudo installing " + extension)
-
+
os.chdir(self.script_dir)
def prepare_packages(self):
@@ -788,7 +788,7 @@ class pyside_build(_build):
self.update_rpath("{dist_dir}/PySide".format(**vars), executables)
def prepare_packages_win32(self, vars):
- pdbs = ['*.pdb'] if self.debug or self.build_type == 'RelWithDebInfo' else []
+ pdbs = ['*.pdb'] if self.debug or self.build_type == 'RelWithDebInfo' else []
# <install>/lib/site-packages/PySide/* -> <setup>/PySide
copydir(
"{site_packages_dir}/PySide",
@@ -815,7 +815,7 @@ class pyside_build(_build):
copyfile(
"{build_dir}/shiboken/shibokenmodule/shiboken{dbgPostfix}.pdb",
"{dist_dir}/PySide/shiboken{dbgPostfix}.pdb",
- vars=vars)
+ vars=vars)
# <install>/lib/site-packages/pysideuic/* -> <setup>/pysideuic
copydir(
"{site_packages_dir}/pysideuic",
@@ -874,7 +874,7 @@ class pyside_build(_build):
"libeay32.dll",
"ssleay32.dll"],
force=False, vars=vars)
-
+
# <qt>/bin/*.dll -> <setup>/PySide
copydir("{qt_bin_dir}", "{dist_dir}/PySide",
filter=[
@@ -897,7 +897,7 @@ class pyside_build(_build):
copydir("{qt_lib_dir}", "{dist_dir}/PySide",
filter=["*.pdb"],
recursive=False, vars=vars)
-
+
# I think these are the qt-mobility DLLs, at least some are,
# so let's copy them too
# <qt>/lib/*.dll -> <setup>/PySide
@@ -915,7 +915,7 @@ class pyside_build(_build):
copydir("{qt_lib_dir}", "{dist_dir}/PySide",
filter=pdbs,
recursive=False, vars=vars)
-
+
# <qt>/plugins/* -> <setup>/PySide/plugins
copydir("{qt_plugins_dir}", "{dist_dir}/PySide/plugins",
filter=["*.dll"] + pdbs,
@@ -1044,7 +1044,7 @@ setup(
'develop': pyside_develop,
'install': pyside_install,
},
-
+
# Add a bogus extension module (will never be built here since we are
# overriding the build command to do it using cmake) so things like
# bdist_egg will know that there are extension modules and will name the
diff --git a/sources/pyside-tools b/sources/pyside-tools
deleted file mode 160000
-Subproject 8783dfcbb58f7d8c60aa0624fe6d99a36ba9a39
diff --git a/sources/pyside-tools2 b/sources/pyside-tools2
new file mode 160000
+Subproject edcad2b4f3c7c6dc12b8774c931600bf1136370
diff --git a/sources/pyside2 b/sources/pyside2
-Subproject 0c64d1b2c6e5e0951675ad9b22294db4a10741c
+Subproject a1fbcbf713c103c60208a8001dae855596d02bc