Skip to content
Permalink
Browse files

run 2to3 on source

  • Loading branch information
jef-n committed Sep 21, 2016
1 parent 8069154 commit 31df84aa6b97bd02482cab4fd3a18947ee279a26
Showing 464 changed files with 2,399 additions and 1,671 deletions.
@@ -1,10 +1,10 @@
QGIS
Building QGIS from source - step by step
Thursday June 09, 2016
Wednesday September 21, 2016


Last Updated: Thursday June 09, 2016
Last Change : Thursday June 09, 2016
Last Updated: Wednesday September 21, 2016
Last Change : Wednesday July 27, 2016


1. Introduction
@@ -356,7 +356,7 @@ If you want to use `ccmake` or other interactive tools, run the following
command in the empty build directory once before starting to use the
interactive tools.

cmake -DENABLE_QT5=ON -DPORT_PLUGINS=ON
cmake

If everything went ok you can finally start to compile. (As usual append a -jX where X is the number of available cores option to make to speed up your build process)

@@ -52,6 +52,5 @@ cmake \
-DWITH_SERVER=ON \
-DWITH_INTERNAL_YAML=OFF \
-DDISABLE_DEPRECATED=ON \
-DPORT_PLUGINS=ON \
-DCXX_EXTRA_FLAGS="$CLANG_WARNINGS" \
..
@@ -5,7 +5,7 @@
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>QGIS</TITLE>

<!-- Included /home/fischer/src/qgis/doc/style.css -->
<!-- Included /home/fischer/src/qgis3/doc/style.css -->
<STYLE TYPE="text/css">
body{ background: white;
color: black;
@@ -77,13 +77,13 @@
<DIV CLASS="header" ID="header">
<H1>QGIS</H1>
<H2>Building QGIS from source - step by step</H2>
<H3>Thursday June 09, 2016</H3>
<H3>Wednesday September 21, 2016</H3>
</DIV>

<DIV CLASS="body" ID="body">
<P>
Last Updated: Thursday June 09, 2016
Last Change : Thursday June 09, 2016
Last Updated: Wednesday September 21, 2016
Last Change : Wednesday July 27, 2016
</P>
<DIV CLASS="toc">

@@ -577,7 +577,7 @@ <H3>3.10.1. Install build dependencies</H3>
</P>

<div class="code"><PRE>
cmake -DENABLE_QT5=ON -DPORT_PLUGINS=ON
cmake
</PRE></div>

<P>
@@ -3016,5 +3016,5 @@ <H1>9. Authors and Acknowledgments</H1>

</DIV>
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -\-encoding=utf-8 -o/home/fischer/src/qgis/debian/build-master-pyqtwrapper-qt4/doc/INSTALL.html -t html /home/fischer/src/qgis/doc/INSTALL.t2t -->
<!-- cmdline: txt2tags -\-encoding=utf-8 -o/home/fischer/src/qgis3/debian/build-master-qt5/doc/INSTALL.html -t html /home/fischer/src/qgis3/doc/INSTALL.t2t -->
</BODY></HTML>
@@ -235,7 +235,7 @@ command in the empty build directory once before starting to use the
interactive tools.

```
cmake -DENABLE_QT5=ON -DPORT_PLUGINS=ON
cmake
```

If everything went ok you can finally start to compile. (As usual append a -jX where X is the number of available cores option to make to speed up your build process)
@@ -16,6 +16,7 @@
* *
***************************************************************************
"""
from builtins import zip

__author__ = 'Martin Dobias'
__date__ = 'January 2007'
@@ -31,7 +32,7 @@ def mapping_feature(feature):
geom = feature.geometry()
properties = {}
fields = [field.name() for field in feature.fields()]
properties = dict(zip(fields, feature.attributes()))
properties = dict(list(zip(fields, feature.attributes())))
return {'type': 'Feature',
'properties': properties,
'geometry': geom.__geo_interface__}
@@ -18,6 +18,8 @@
***************************************************************************/
Some portions of code were taken from https://code.google.com/p/pydee/
"""
from builtins import str
from builtins import range
import os

from qgis.PyQt.QtCore import Qt, QTimer, QSettings, QCoreApplication, QSize, QByteArray, QFileInfo, QUrl, QDir
@@ -410,7 +412,7 @@ def __init__(self, parent=None):
}

self.classMenu = QMenu()
for (title, icon), commands in default_command.items():
for (title, icon), commands in list(default_command.items()):
action = self.classMenu.addAction(icon, title)
action.triggered.connect(partial(self.shell.commandConsole, commands))

@@ -18,6 +18,9 @@
***************************************************************************/
Some portions of code were taken from https://code.google.com/p/pydee/
"""
from __future__ import print_function
from builtins import str
from builtins import range
from qgis.PyQt.QtCore import Qt, QObject, QEvent, QSettings, QCoreApplication, QFileInfo, QSize
from qgis.PyQt.QtGui import QFont, QFontMetrics, QColor, QKeySequence, QCursor
from qgis.PyQt.QtWidgets import QShortcut, QMenu, QApplication, QWidget, QGridLayout, QSpacerItem, QSizePolicy, QFileDialog, QTabWidget, QTreeWidgetItem, QFrame, QLabel, QToolButton, QMessageBox
@@ -47,7 +50,7 @@ def __init__(self, window, tab, *args):
self.window = window
self.tab = tab
self._handlers = {}
for shortcut, handler in KeyFilter.SHORTCUTS.items():
for shortcut, handler in list(KeyFilter.SHORTCUTS.items()):
modifiers = shortcut[0]
if not isinstance(modifiers, list):
modifiers = [modifiers]
@@ -1190,7 +1193,7 @@ def listObject(self, tab):
for superClass in class_data.super:
if superClass == 'object':
continue
if isinstance(superClass, basestring):
if isinstance(superClass, str):
superClassName.append(superClass)
else:
superClassName.append(superClass.name)
@@ -18,6 +18,8 @@
***************************************************************************/
Some portions of code were taken from https://code.google.com/p/pydee/
"""
from builtins import range
from builtins import object

from qgis.PyQt.QtCore import Qt, QCoreApplication, QSettings
from qgis.PyQt.QtGui import QColor, QFont, QKeySequence
@@ -18,6 +18,8 @@
***************************************************************************/
Some portions of code were taken from https://code.google.com/p/pydee/
"""
from builtins import bytes
from builtins import range

from qgis.PyQt.QtCore import Qt, QSettings, QByteArray, QCoreApplication, QFile, QSize
from qgis.PyQt.QtWidgets import QDialog, QMenu, QShortcut, QApplication
@@ -18,6 +18,7 @@
***************************************************************************/
Some portions of code were taken from https://code.google.com/p/pydee/
"""
from builtins import range

from qgis.PyQt.QtCore import QCoreApplication, QSize, QSettings, QFileInfo, Qt
from qgis.PyQt.QtWidgets import QDialog, QFileDialog, QMessageBox, QTableWidgetItem
@@ -16,6 +16,8 @@
* *
***************************************************************************
"""
from builtins import str
from builtins import object

__author__ = 'Nathan Woodrow'
__date__ = 'May 2014'
@@ -156,7 +158,7 @@ def __str__(self):
# Define a `with edit(layer)` statement


class edit:
class edit(object):

def __init__(self, layer):
self.layer = layer
@@ -8,17 +8,6 @@

FILE(WRITE ${CMAKE_BINARY_DIR}/stagecount 0)

# The target port-plugins acts as a container for all port-plugin-XXX targets
# Each port-plugin-XXX target will run scripts/2to3 on a plugin and migrate
# Python 3 and Qt 5 code.
SET (PORT_PLUGINS FALSE CACHE BOOL "Determines whether python plugins in staged or installed locations should be migrated to Python 3 and Qt 5")
IF(PORT_PLUGINS)
ADD_CUSTOM_TARGET(port-plugins ALL)
ELSE(PORT_PLUGINS)
ADD_CUSTOM_TARGET(port-plugins)
ENDIF(PORT_PLUGINS)


MACRO (PLUGIN_INSTALL plugin subdir )
FILE(READ ${CMAKE_BINARY_DIR}/stagecount n)
MATH(EXPR n "${n}+1")
@@ -45,11 +34,6 @@ MACRO (PLUGIN_INSTALL plugin subdir )
ADD_DEPENDENCIES(staged-plugins zzz-${plugin}-stageinstall)
ADD_CUSTOM_TARGET(staged-${plugin} DEPENDS zzz-${plugin}-stageinstall)
FILE(WRITE ${_cmake} "")

ADD_CUSTOM_TARGET(port-plugin-${plugin})
PY_2TO3(port-plugin-${plugin} ${PYTHON_OUTPUT_DIRECTORY}/plugins/${plugin})
ADD_DEPENDENCIES(port-plugins port-plugin-${plugin})
ADD_DEPENDENCIES(port-plugin-${plugin} staged-${plugin})
ENDIF(NOT TARGET zzz-${plugin}-stageinstall)

ADD_CUSTOM_TARGET(zzz-${plugin}-${n}-depend DEPENDS ${ARGN})
@@ -17,6 +17,8 @@
* *
***************************************************************************/
"""
from builtins import str
from builtins import object
# Import the PyQt and QGIS libraries
from qgis.PyQt.QtCore import QCoreApplication, QSettings, QLocale, QFileInfo, QTranslator
from qgis.PyQt.QtWidgets import QMessageBox, QMenu, QAction
@@ -53,7 +55,7 @@
raise ImportError(error_str)


class GdalTools:
class GdalTools(object):

def __init__(self, iface):
if not valid:
@@ -62,9 +64,9 @@ def __init__(self, iface):
# Save reference to the QGIS interface
self.iface = iface
try:
self.QgisVersion = unicode(Qgis.QGIS_VERSION_INT)
self.QgisVersion = str(Qgis.QGIS_VERSION_INT)
except:
self.QgisVersion = unicode(Qgis.qgisVersion)[0]
self.QgisVersion = str(Qgis.qgisVersion)[0]

if Qgis.QGIS_VERSION[0:3] < "1.5":
# For i18n support
@@ -97,7 +99,7 @@ def initGui(self):
if int(self.QgisVersion) < 1:
QMessageBox.warning(
self.iface.getMainWindow(), "Gdal Tools",
QCoreApplication.translate("GdalTools", "QGIS version detected: ") + unicode(self.QgisVersion) + ".xx\n"
QCoreApplication.translate("GdalTools", "QGIS version detected: ") + str(self.QgisVersion) + ".xx\n"
+ QCoreApplication.translate("GdalTools", "This version of Gdal Tools requires at least QGIS version 1.0.0\nPlugin will not be enabled."))
return None

0 comments on commit 31df84a

Please sign in to comment.
You can’t perform that action at this time.