diff options
author | Mateusz Skowroński <skowri@gmail.com> | 2016-04-16 23:59:21 +0200 |
---|---|---|
committer | Thomas Karl Pietrowski <thopiekar@googlemail.com> | 2016-04-16 23:59:21 +0200 |
commit | 62768aba4a6938e0c65dd3aeb39d5938b5ca7c31 (patch) | |
tree | 57d4753d922bf507b39a785b0ad4bec67d6c727d | |
parent | cfc0276dcb1988a4001fa7deece028d63f5d5bc7 (diff) |
Rename tools to show they are compatible with PySide2 and allow insta… (#4)
* Rename tools to show they are compatible with PySide2 and allow installation parallel to PySide1 tools.
* Fix install target typo.
-rw-r--r-- | CMakeLists.txt | 29 | ||||
-rw-r--r-- | pylupdate/CMakeLists.txt | 9 | ||||
-rw-r--r-- | pylupdate/fetchtr.cpp | 10 | ||||
-rw-r--r-- | pylupdate/main.cpp | 24 | ||||
-rw-r--r-- | pylupdate/pyside2-lupdate.1 (renamed from pylupdate/pyside-lupdate.1) | 10 | ||||
-rw-r--r-- | pyrcc/CMakeLists.txt | 9 | ||||
-rw-r--r-- | pyrcc/main.cpp | 4 | ||||
-rw-r--r-- | pyrcc/pyside2-rcc.1 (renamed from pyrcc/pyside-rcc.1) | 6 | ||||
-rw-r--r-- | pyrcc/rcc.cpp | 2 | ||||
-rw-r--r-- | pyside2-uic (renamed from pyside-uic) | 12 | ||||
-rw-r--r-- | pyside2uic/Compiler/__init__.py (renamed from pysideuic/Compiler/__init__.py) | 0 | ||||
-rw-r--r-- | pyside2uic/Compiler/compiler.py (renamed from pysideuic/Compiler/compiler.py) | 12 | ||||
-rw-r--r-- | pyside2uic/Compiler/indenter.py (renamed from pysideuic/Compiler/indenter.py) | 0 | ||||
-rw-r--r-- | pyside2uic/Compiler/misc.py (renamed from pysideuic/Compiler/misc.py) | 2 | ||||
-rw-r--r-- | pyside2uic/Compiler/proxy_type.py (renamed from pysideuic/Compiler/proxy_type.py) | 4 | ||||
-rw-r--r-- | pyside2uic/Compiler/qobjectcreator.py (renamed from pysideuic/Compiler/qobjectcreator.py) | 4 | ||||
-rw-r--r-- | pyside2uic/Compiler/qtproxies.py (renamed from pysideuic/Compiler/qtproxies.py) | 12 | ||||
-rw-r--r-- | pyside2uic/__init__.py.in (renamed from pysideuic/__init__.py.in) | 6 | ||||
-rw-r--r-- | pyside2uic/driver.py (renamed from pysideuic/driver.py) | 8 | ||||
-rw-r--r-- | pyside2uic/exceptions.py (renamed from pysideuic/exceptions.py) | 0 | ||||
-rw-r--r-- | pyside2uic/icon_cache.py (renamed from pysideuic/icon_cache.py) | 0 | ||||
-rw-r--r-- | pyside2uic/objcreator.py (renamed from pysideuic/objcreator.py) | 6 | ||||
-rw-r--r-- | pyside2uic/port_v2/__init__.py (renamed from pysideuic/port_v2/__init__.py) | 0 | ||||
-rw-r--r-- | pyside2uic/port_v2/as_string.py (renamed from pysideuic/port_v2/as_string.py) | 0 | ||||
-rw-r--r-- | pyside2uic/port_v2/ascii_upper.py (renamed from pysideuic/port_v2/ascii_upper.py) | 0 | ||||
-rw-r--r-- | pyside2uic/port_v2/invoke.py (renamed from pysideuic/port_v2/invoke.py) | 2 | ||||
-rw-r--r-- | pyside2uic/port_v2/load_plugin.py (renamed from pysideuic/port_v2/load_plugin.py) | 2 | ||||
-rw-r--r-- | pyside2uic/port_v2/proxy_base.py (renamed from pysideuic/port_v2/proxy_base.py) | 2 | ||||
-rw-r--r-- | pyside2uic/port_v2/string_io.py (renamed from pysideuic/port_v2/string_io.py) | 0 | ||||
-rw-r--r-- | pyside2uic/port_v3/__init__.py (renamed from pysideuic/port_v3/__init__.py) | 0 | ||||
-rw-r--r-- | pyside2uic/port_v3/as_string.py (renamed from pysideuic/port_v3/as_string.py) | 0 | ||||
-rw-r--r-- | pyside2uic/port_v3/ascii_upper.py (renamed from pysideuic/port_v3/ascii_upper.py) | 0 | ||||
-rw-r--r-- | pyside2uic/port_v3/invoke.py (renamed from pysideuic/port_v3/invoke.py) | 2 | ||||
-rw-r--r-- | pyside2uic/port_v3/load_plugin.py (renamed from pysideuic/port_v3/load_plugin.py) | 2 | ||||
-rw-r--r-- | pyside2uic/port_v3/proxy_base.py (renamed from pysideuic/port_v3/proxy_base.py) | 2 | ||||
-rw-r--r-- | pyside2uic/port_v3/string_io.py (renamed from pysideuic/port_v3/string_io.py) | 0 | ||||
-rw-r--r-- | pyside2uic/properties.py (renamed from pysideuic/properties.py) | 8 | ||||
-rw-r--r-- | pyside2uic/pyside2-uic.1 (renamed from pysideuic/pyside-uic.1) | 6 | ||||
-rw-r--r-- | pyside2uic/uiparser.py (renamed from pysideuic/uiparser.py) | 6 | ||||
-rw-r--r-- | pyside2uic/widget-plugins/qtdeclarative.py (renamed from pysideuic/widget-plugins/qtdeclarative.py) | 0 | ||||
-rw-r--r-- | pyside2uic/widget-plugins/qtwebkit.py (renamed from pysideuic/widget-plugins/qtwebkit.py) | 0 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tests/rcc/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/rcc/rcc_image_test.py | 3 | ||||
-rw-r--r-- | tests/rcc/rcc_test.py | 2 | ||||
-rwxr-xr-x | tests/rcc/run_test.sh | 5 |
46 files changed, 106 insertions, 111 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1cd62dc..b70f5c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,12 +5,12 @@ find_package(Shiboken2 2.0.0 REQUIRED) find_package(Qt5 REQUIRED Core) find_package(PySide2 2.0.0 REQUIRED) -set(pyside_tools_MAJOR_VERSION "2") -set(pyside_tools_MINOR_VERSION "0") -set(pyside_tools_MICRO_VERSION "0") -set(pyside2_tools_VERSION "${pyside_tools_MAJOR_VERSION}.${pyside_tools_MINOR_VERSION}.${pyside_tools_MICRO_VERSION}") +set(pyside2_tools_MAJOR_VERSION "2") +set(pyside2_tools_MINOR_VERSION "0") +set(pyside2_tools_MICRO_VERSION "0") +set(pyside2_tools_VERSION "${pyside2_tools_MAJOR_VERSION}.${pyside2_tools_MINOR_VERSION}.${pyside2_tools_MICRO_VERSION}") -configure_file("pysideuic/__init__.py.in" "__init__.py" @ONLY) +configure_file("pyside2uic/__init__.py.in" "pyside2uic/__init__.py" @ONLY) option(BUILD_TESTS "Build tests." TRUE) @@ -29,7 +29,7 @@ if (NOT SITE_PACKAGE) endif() endif() -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pyside-uic +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pyside2-uic DESTINATION bin PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ @@ -37,16 +37,16 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pyside-uic WORLD_EXECUTE WORLD_READ) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py" - DESTINATION "${SITE_PACKAGE}/pysideuic") -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pysideuic + DESTINATION "${SITE_PACKAGE}/pyside2uic") +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pyside2uic DESTINATION ${SITE_PACKAGE} PATTERN "*.in" EXCLUDE - PATTERN "*pysideuic/__init__.py" EXCLUDE - PATTERN "*pysideuic\\__init__.py" EXCLUDE) + PATTERN "*pyside2uic/__init__.py" EXCLUDE + PATTERN "*pyside2uic\\__init__.py" EXCLUDE) -# Man pages for pyside-uic +# Man pages for pyside2-uic if (NOT win32) - file(GLOB manpages "${CMAKE_CURRENT_SOURCE_DIR}/pysideuic/*.1") + file(GLOB manpages "${CMAKE_CURRENT_SOURCE_DIR}/pyside2uic/*.1") install(FILES ${manpages} DESTINATION share/man/man1) endif() @@ -57,7 +57,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake" add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") -set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${pyside_tools_VERSION}) +set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${pyside2_tools_VERSION}) add_custom_target(dist COMMAND mkdir -p "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}" && git log > "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}/ChangeLog" && @@ -67,7 +67,7 @@ add_custom_target(dist echo "Source package created at ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2.\n" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) -set(PYSIDERCC_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/pyrcc/pyside-rcc) +set(PYSIDE2RCC_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/pyrcc/pyside2-rcc) add_subdirectory(pyrcc) add_subdirectory(pylupdate) @@ -75,4 +75,3 @@ if (BUILD_TESTS) enable_testing() add_subdirectory(tests) endif () - diff --git a/pylupdate/CMakeLists.txt b/pylupdate/CMakeLists.txt index 72cdf7d..83e5bf0 100644 --- a/pylupdate/CMakeLists.txt +++ b/pylupdate/CMakeLists.txt @@ -19,8 +19,8 @@ find_package(Qt5Widgets) set(lupdate_MOC_HEADERS translator.h) qt5_wrap_cpp(lupdate_MOC_OUTFILES ${lupdate_MOC_HEADERS}) -add_executable(pyside-lupdate ${lupdate_SRC} ${lupdate_MOC_OUTFILES}) -include_directories(pyside-lupdate +add_executable(pyside2-lupdate ${lupdate_SRC} ${lupdate_MOC_OUTFILES}) +include_directories(pyside2-lupdate ${CMAKE_CURRENT_SOURCE_DIR} ${Qt5Xml_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS} @@ -28,18 +28,17 @@ include_directories(pyside-lupdate ${Qt5Widgets_INCLUDE_DIRS} ) -target_link_libraries(pyside-lupdate +target_link_libraries(pyside2-lupdate ${Qt5Core_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ) -install(TARGETS pyside-lupdate RUNTIME DESTINATION bin) +install(TARGETS pyside2-lupdate RUNTIME DESTINATION bin) # Man pages if (NOT win32) file(GLOB manpages "${CMAKE_CURRENT_SOURCE_DIR}/*.1") install(FILES ${manpages} DESTINATION share/man/man1) endif() - diff --git a/pylupdate/fetchtr.cpp b/pylupdate/fetchtr.cpp index 8f3d138..06485a4 100644 --- a/pylupdate/fetchtr.cpp +++ b/pylupdate/fetchtr.cpp @@ -478,7 +478,7 @@ static bool matchString( QByteArray *s ) static bool matchEncoding( bool *utf8 ) { // Remove any leading module paths. - if (yyTok == Tok_Ident && strcmp(yyIdent, "PySide") == 0) + if (yyTok == Tok_Ident && strcmp(yyIdent, "PySide2") == 0) { yyTok = getToken(); @@ -731,7 +731,7 @@ void fetchtr_py( const char *fileName, MetaTranslator *tor, char buf[100]; strerror_s(buf, sizeof(buf), errno); fprintf( stderr, - "pyside-lupdate error: Cannot open Python source file '%s': %s\n", + "pyside2-lupdate error: Cannot open Python source file '%s': %s\n", fileName, buf ); } #else @@ -739,7 +739,7 @@ void fetchtr_py( const char *fileName, MetaTranslator *tor, if ( yyInFile == 0 ) { if ( mustExist ) fprintf( stderr, - "pyside-lupdate error: Cannot open Python source file '%s': %s\n", + "pyside2-lupdate error: Cannot open Python source file '%s': %s\n", fileName, strerror(errno) ); #endif return; @@ -862,10 +862,10 @@ void fetchtr_ui( const char *fileName, MetaTranslator *tor, #if defined(_MSC_VER) && _MSC_VER >= 1400 char buf[100]; strerror_s(buf, sizeof(buf), errno); - fprintf( stderr, "pyside-lupdate error: cannot open UI file '%s': %s\n", + fprintf( stderr, "pyside2-lupdate error: cannot open UI file '%s': %s\n", fileName, buf ); #else - fprintf( stderr, "pyside-lupdate error: cannot open UI file '%s': %s\n", + fprintf( stderr, "pyside2-lupdate error: cannot open UI file '%s': %s\n", fileName, strerror(errno) ); #endif } diff --git a/pylupdate/main.cpp b/pylupdate/main.cpp index 1f4d3ce..f0e6d5b 100644 --- a/pylupdate/main.cpp +++ b/pylupdate/main.cpp @@ -54,8 +54,8 @@ typedef QList<MetaTranslatorMessage> TML; static void printUsage() { fprintf( stderr, "Usage:\n" - " pyside-lupdate [options] project-file\n" - " pyside-lupdate [options] source-files -ts ts-files\n" + " pyside2-lupdate [options] project-file\n" + " pyside2-lupdate [options] source-files -ts ts-files\n" "Options:\n" " -help Display this information and exit\n" " -noobsolete\n" @@ -63,7 +63,7 @@ static void printUsage() " -verbose\n" " Explain what is being done\n" " -version\n" - " Display the version of pyside-lupdate and exit\n" ); + " Display the version of pyside2-lupdate and exit\n" ); } static void updateTsFiles( const MetaTranslator& fetchedTor, @@ -90,10 +90,10 @@ static void updateTsFiles( const MetaTranslator& fetchedTor, #if defined(_MSC_VER) && _MSC_VER >= 1400 char buf[100]; strerror_s(buf, sizeof(buf), errno); - fprintf( stderr, "pyside-lupdate error: Cannot save '%s': %s\n", + fprintf( stderr, "pyside2-lupdate error: Cannot save '%s': %s\n", fn.toLatin1().constData(), buf ); #else - fprintf( stderr, "pyside-lupdate error: Cannot save '%s': %s\n", + fprintf( stderr, "pyside2-lupdate error: Cannot save '%s': %s\n", fn.toLatin1().constData(), strerror(errno) ); #endif } @@ -135,7 +135,7 @@ int main( int argc, char **argv ) verbose = true; continue; } else if ( qstrcmp(argv[i], "-version") == 0 ) { - fprintf( stderr, "pyside-lupdate version %s\n", QT_VERSION_STR ); + fprintf( stderr, "pyside2-lupdate version %s\n", QT_VERSION_STR ); return 0; } else if ( qstrcmp(argv[i], "-ts") == 0 ) { metTsFlag = true; @@ -152,10 +152,10 @@ int main( int argc, char **argv ) #if defined(_MSC_VER) && _MSC_VER >= 1400 char buf[100]; strerror_s(buf, sizeof(buf), errno); - fprintf( stderr, "pyside-lupdate error: Cannot open file '%s': %s\n", + fprintf( stderr, "pyside2-lupdate error: Cannot open file '%s': %s\n", argv[i], buf ); #else - fprintf( stderr, "pyside-lupdate error: Cannot open file '%s': %s\n", + fprintf( stderr, "pyside2-lupdate error: Cannot open file '%s': %s\n", argv[i], strerror(errno) ); #endif return 1; @@ -207,12 +207,12 @@ int main( int argc, char **argv ) if ( !metSomething ) { fprintf( stderr, - "pyside-lupdate warning: File '%s' does not look like a" + "pyside2-lupdate warning: File '%s' does not look like a" " project file\n", argv[i] ); } else if ( tsFileNames.isEmpty() ) { fprintf( stderr, - "pyside-lupdate warning: Met no 'TRANSLATIONS' entry in" + "pyside2-lupdate warning: Met no 'TRANSLATIONS' entry in" " project file '%s'\n", argv[i] ); } @@ -224,13 +224,13 @@ int main( int argc, char **argv ) tsFileNames.append( argv[i] ); } else { fprintf( stderr, - "pyside-lupdate warning: For some reason, I cannot" + "pyside2-lupdate warning: For some reason, I cannot" " save '%s'\n", argv[i] ); } } else { fprintf( stderr, - "pyside-lupdate error: File '%s' lacks .ts extension\n", + "pyside2-lupdate error: File '%s' lacks .ts extension\n", argv[i] ); } } else { diff --git a/pylupdate/pyside-lupdate.1 b/pylupdate/pyside2-lupdate.1 index d2ea10d..d5e95e0 100644 --- a/pylupdate/pyside-lupdate.1 +++ b/pylupdate/pyside2-lupdate.1 @@ -1,12 +1,12 @@ -.TH PYSIDE-LUPDATE "1" "December 2010" "pyside-lupdate" "User Commands" +.TH PYSIDE-LUPDATE "1" "December 2010" "pyside2-lupdate" "User Commands" .SH NAME -pyside\-lupdate \- extracts translatable messages from Qt UI files and Python source code. +pyside2\-lupdate \- extracts translatable messages from Qt UI files and Python source code. .SH DESCRIPTION .SS "Usage:" .IP -pyside\-lupdate [options] project\-file +pyside2\-lupdate [options] project\-file .IP -pyside\-lupdate [options] source\-files \-ts ts\-files +pyside2\-lupdate [options] source\-files \-ts ts\-files .SS "Options:" .TP \fB\-noobsolete @@ -16,7 +16,7 @@ Drop all obsolete strings Explain what is being done .TP \fB\-version -Display the version of pyside-lupdate and exit +Display the version of pyside2-lupdate and exit .TP \fB\-help Display this information and exit diff --git a/pyrcc/CMakeLists.txt b/pyrcc/CMakeLists.txt index 85094a5..b486e32 100644 --- a/pyrcc/CMakeLists.txt +++ b/pyrcc/CMakeLists.txt @@ -1,19 +1,18 @@ find_package(Qt5Xml) -add_executable(pyside-rcc main.cpp rcc.cpp) -include_directories(pyside-rcc +add_executable(pyside2-rcc main.cpp rcc.cpp) +include_directories(pyside2-rcc ${Qt5Xml_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS}) -target_link_libraries(pyside-rcc +target_link_libraries(pyside2-rcc ${Qt5Core_LIBRARIES} ${Qt5Xml_LIBRARIES}) -install(TARGETS pyside-rcc RUNTIME DESTINATION bin) +install(TARGETS pyside2-rcc RUNTIME DESTINATION bin) # Man pages if (NOT win32) file(GLOB manpages "${CMAKE_CURRENT_SOURCE_DIR}/*.1") install(FILES ${manpages} DESTINATION share/man/man1) endif() - diff --git a/pyrcc/main.cpp b/pyrcc/main.cpp index d9cecca..3baddc7 100644 --- a/pyrcc/main.cpp +++ b/pyrcc/main.cpp @@ -45,7 +45,7 @@ static QString resourceRoot; bool processResourceFile(const QStringList &filenamesIn, const QString &filenameOut, bool list) { if (verbose) - fprintf(stderr, "PySide resource compiler\n"); + fprintf(stderr, "PySide2 resource compiler\n"); //setup RCCResourceLibrary library; @@ -91,7 +91,7 @@ bool processResourceFile(const QStringList &filenamesIn, const QString &filename int showHelp(const char *argv0, const QString &error) { - fprintf(stderr, "PySide resource compiler\n"); + fprintf(stderr, "PySide2 resource compiler\n"); if (!error.isEmpty()) fprintf(stderr, "%s: %s\n", argv0, error.toLatin1().constData()); fprintf(stderr, "Usage: %s [options] <inputs>\n\n" diff --git a/pyrcc/pyside-rcc.1 b/pyrcc/pyside2-rcc.1 index da65823..6c78d3b 100644 --- a/pyrcc/pyside-rcc.1 +++ b/pyrcc/pyside2-rcc.1 @@ -1,10 +1,10 @@ -.TH PYSIDE\-RCC "1" "December 2010" "pyside\-rcc" "User Commands" +.TH PYSIDE\-RCC "1" "December 2010" "pyside2\-rcc" "User Commands" .SH NAME -pyside\-rcc \- PySide resource compiler +pyside2\-rcc \- PySide2 resource compiler .SH DESCRIPTION .SS "Usage:" .IP -pyside\-rcc [options] <inputs> +pyside2\-rcc [options] <inputs> .SS "Options:" .TP \fB\-o\fR file diff --git a/pyrcc/rcc.cpp b/pyrcc/rcc.cpp index 68f3858..7d380b0 100644 --- a/pyrcc/rcc.cpp +++ b/pyrcc/rcc.cpp @@ -399,7 +399,7 @@ RCCResourceLibrary::writeHeader(FILE *out) fprintf(out, "# Resource object code\n"); fprintf(out, "#\n"); fprintf(out, "# Created: %s\n", QDateTime::currentDateTime().toString().toUtf8().constData()); - fprintf(out, "# by: The Resource Compiler for PySide (Qt v%s)\n", QT_VERSION_STR); + fprintf(out, "# by: The Resource Compiler for PySide2 (Qt v%s)\n", QT_VERSION_STR); fprintf(out, "#\n"); fprintf(out, "# WARNING! All changes made in this file will be lost!\n"); fprintf(out, "\n"); @@ -25,19 +25,19 @@ import sys import optparse from PySide2 import QtCore -from pysideuic.driver import Driver +from pyside2uic.driver import Driver from PySide2 import __version__ as PySideVersion -from pysideuic import __version__ as PySideUicVersion +from pyside2uic import __version__ as PySideUicVersion -Version = "PySide User Interface Compiler version %s, running on PySide %s." % (PySideUicVersion, PySideVersion) +Version = "PySide2 User Interface Compiler version %s, running on PySide2 %s." % (PySideUicVersion, PySideVersion) def main(): if sys.hexversion >= 0x03000000: - from pysideuic.port_v3.invoke import invoke + from pyside2uic.port_v3.invoke import invoke else: - from pysideuic.port_v2.invoke import invoke + from pyside2uic.port_v2.invoke import invoke - parser = optparse.OptionParser(usage="pyside-uic [options] <ui-file>", + parser = optparse.OptionParser(usage="pyside2-uic [options] <ui-file>", version=Version) parser.add_option("-p", "--preview", dest="preview", action="store_true", default=False, diff --git a/pysideuic/Compiler/__init__.py b/pyside2uic/Compiler/__init__.py index 6aa6c34..6aa6c34 100644 --- a/pysideuic/Compiler/__init__.py +++ b/pyside2uic/Compiler/__init__.py diff --git a/pysideuic/Compiler/compiler.py b/pyside2uic/Compiler/compiler.py index 7d8ef3b..2013170 100644 --- a/pysideuic/Compiler/compiler.py +++ b/pyside2uic/Compiler/compiler.py @@ -22,13 +22,13 @@ import sys -from pysideuic.properties import Properties -from pysideuic.uiparser import UIParser -from pysideuic.Compiler import qtproxies -from pysideuic.Compiler.indenter import createCodeIndenter, getIndenter, \ +from pyside2uic.properties import Properties +from pyside2uic.uiparser import UIParser +from pyside2uic.Compiler import qtproxies +from pyside2uic.Compiler.indenter import createCodeIndenter, getIndenter, \ write_code -from pysideuic.Compiler.qobjectcreator import CompilerCreatorPolicy -from pysideuic.Compiler.misc import write_import +from pyside2uic.Compiler.qobjectcreator import CompilerCreatorPolicy +from pyside2uic.Compiler.misc import write_import class UICompiler(UIParser): diff --git a/pysideuic/Compiler/indenter.py b/pyside2uic/Compiler/indenter.py index c8700ae..c8700ae 100644 --- a/pysideuic/Compiler/indenter.py +++ b/pyside2uic/Compiler/indenter.py diff --git a/pysideuic/Compiler/misc.py b/pyside2uic/Compiler/misc.py index 37046c0..bd95663 100644 --- a/pysideuic/Compiler/misc.py +++ b/pyside2uic/Compiler/misc.py @@ -21,7 +21,7 @@ # 02110-1301 USA -from pysideuic.Compiler.indenter import write_code +from pyside2uic.Compiler.indenter import write_code def write_import(module_name, from_imports): diff --git a/pysideuic/Compiler/proxy_type.py b/pyside2uic/Compiler/proxy_type.py index c80843a..01a26fb 100644 --- a/pysideuic/Compiler/proxy_type.py +++ b/pyside2uic/Compiler/proxy_type.py @@ -20,7 +20,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA -from pysideuic.Compiler.misc import Literal, moduleMember +from pyside2uic.Compiler.misc import Literal, moduleMember class ProxyType(type): @@ -42,7 +42,7 @@ class ProxyType(type): raise # Avoid a circular import. - from pysideuic.Compiler.qtproxies import LiteralProxyClass + from pyside2uic.Compiler.qtproxies import LiteralProxyClass return type(name, (LiteralProxyClass, ), {"module": moduleMember(type.__getattribute__(cls, "module"), diff --git a/pysideuic/Compiler/qobjectcreator.py b/pyside2uic/Compiler/qobjectcreator.py index 3842f16..fd1b685 100644 --- a/pysideuic/Compiler/qobjectcreator.py +++ b/pyside2uic/Compiler/qobjectcreator.py @@ -28,8 +28,8 @@ try: except NameError: from sets import Set as set -from pysideuic.Compiler.indenter import write_code -from pysideuic.Compiler.qtproxies import QtWidgets, Literal, strict_getattr +from pyside2uic.Compiler.indenter import write_code +from pyside2uic.Compiler.qtproxies import QtWidgets, Literal, strict_getattr logger = logging.getLogger(__name__) diff --git a/pysideuic/Compiler/qtproxies.py b/pyside2uic/Compiler/qtproxies.py index 88d515e..506c5df 100644 --- a/pysideuic/Compiler/qtproxies.py +++ b/pyside2uic/Compiler/qtproxies.py @@ -24,15 +24,15 @@ import sys import re -from pysideuic.Compiler.indenter import write_code -from pysideuic.Compiler.misc import Literal, moduleMember +from pyside2uic.Compiler.indenter import write_code +from pyside2uic.Compiler.misc import Literal, moduleMember if sys.hexversion >= 0x03000000: - from pysideuic.port_v3.proxy_base import ProxyBase - from pysideuic.port_v3.as_string import as_string + from pyside2uic.port_v3.proxy_base import ProxyBase + from pyside2uic.port_v3.as_string import as_string else: - from pysideuic.port_v2.proxy_base import ProxyBase - from pysideuic.port_v2.as_string import as_string + from pyside2uic.port_v2.proxy_base import ProxyBase + from pyside2uic.port_v2.as_string import as_string i18n_strings = [] i18n_context = "" diff --git a/pysideuic/__init__.py.in b/pyside2uic/__init__.py.in index c6eba75..6e06e72 100644 --- a/pysideuic/__init__.py.in +++ b/pyside2uic/__init__.py.in @@ -24,14 +24,14 @@ __all__ = ("compileUi", "compileUiDir", "widgetPluginPath") __version__ = "@pyside_tools_VERSION@" -from pysideuic.Compiler import indenter, compiler +from pyside2uic.Compiler import indenter, compiler _header = """# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '%s' # # Created: %s -# by: pyside-uic %s running on PySide %s +# by: pyside2-uic %s running on PySide2 %s # # WARNING! All changes made in this file will be lost! @@ -146,4 +146,4 @@ def compileUi(uifile, pyfile, execute=False, indent=4, from_imports=False): # The list of directories that are searched for widget plugins. -from pysideuic.objcreator import widgetPluginPath +from pyside2uic.objcreator import widgetPluginPath diff --git a/pysideuic/driver.py b/pyside2uic/driver.py index abadd87..7b37509 100644 --- a/pysideuic/driver.py +++ b/pyside2uic/driver.py @@ -24,7 +24,7 @@ import sys import logging -from pysideuic import compileUi +from pyside2uic import compileUi class Driver(object): @@ -32,7 +32,7 @@ class Driver(object): called by code that is Python v2/v3 specific. """ - LOGGER_NAME = 'PySide.uic' + LOGGER_NAME = 'PySide2.uic' def __init__(self, opts, ui_file): """ Initialise the object. opts is the parsed options. ui_file is the @@ -108,7 +108,7 @@ class Driver(object): """ Handle a NoSuchWidgetError exception. """ if e.args[0].startswith("Q3"): - sys.stderr.write("Error: Q3Support widgets are not supported by PySide.\n") + sys.stderr.write("Error: Q3Support widgets are not supported by PySide2.\n") else: sys.stderr.write(str(e) + "\n") @@ -123,6 +123,6 @@ class Driver(object): from PySide2 import QtCore sys.stderr.write("""An unexpected error occurred. -Check that you are using the latest version of PySide and report the error to +Check that you are using the latest version of PySide2 and report the error to http://bugs.openbossa.org, including the ui file used to trigger the error. """) diff --git a/pysideuic/exceptions.py b/pyside2uic/exceptions.py index 18bb51a..18bb51a 100644 --- a/pysideuic/exceptions.py +++ b/pyside2uic/exceptions.py diff --git a/pysideuic/icon_cache.py b/pyside2uic/icon_cache.py index 523d207..523d207 100644 --- a/pysideuic/icon_cache.py +++ b/pyside2uic/icon_cache.py diff --git a/pysideuic/objcreator.py b/pyside2uic/objcreator.py index 06f3092..deed44f 100644 --- a/pysideuic/objcreator.py +++ b/pyside2uic/objcreator.py @@ -23,12 +23,12 @@ import sys import os.path -from pysideuic.exceptions import NoSuchWidgetError, WidgetPluginError +from pyside2uic.exceptions import NoSuchWidgetError, WidgetPluginError if sys.hexversion >= 0x03000000: - from pysideuic.port_v3.load_plugin import load_plugin + from pyside2uic.port_v3.load_plugin import load_plugin else: - from pysideuic.port_v2.load_plugin import load_plugin + from pyside2uic.port_v2.load_plugin import load_plugin # The list of directories that are searched for widget plugins. This is diff --git a/pysideuic/port_v2/__init__.py b/pyside2uic/port_v2/__init__.py index 164c865..164c865 100644 --- a/pysideuic/port_v2/__init__.py +++ b/pyside2uic/port_v2/__init__.py diff --git a/pysideuic/port_v2/as_string.py b/pyside2uic/port_v2/as_string.py index 23272b2..23272b2 100644 --- a/pysideuic/port_v2/as_string.py +++ b/pyside2uic/port_v2/as_string.py diff --git a/pysideuic/port_v2/ascii_upper.py b/pyside2uic/port_v2/ascii_upper.py index 05843bf..05843bf 100644 --- a/pysideuic/port_v2/ascii_upper.py +++ b/pyside2uic/port_v2/ascii_upper.py diff --git a/pysideuic/port_v2/invoke.py b/pyside2uic/port_v2/invoke.py index 7652904..0072c97 100644 --- a/pysideuic/port_v2/invoke.py +++ b/pyside2uic/port_v2/invoke.py @@ -20,7 +20,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA -from pysideuic.exceptions import NoSuchWidgetError +from pyside2uic.exceptions import NoSuchWidgetError def invoke(driver): diff --git a/pysideuic/port_v2/load_plugin.py b/pyside2uic/port_v2/load_plugin.py index 5212d6f..3e82f9f 100644 --- a/pysideuic/port_v2/load_plugin.py +++ b/pyside2uic/port_v2/load_plugin.py @@ -20,7 +20,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA -from pysideuic.exceptions import WidgetPluginError +from pyside2uic.exceptions import WidgetPluginError def load_plugin(plugin, plugin_globals, plugin_locals): diff --git a/pysideuic/port_v2/proxy_base.py b/pyside2uic/port_v2/proxy_base.py index 732b2e2..b5cacb8 100644 --- a/pysideuic/port_v2/proxy_base.py +++ b/pyside2uic/port_v2/proxy_base.py @@ -20,7 +20,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA -from pysideuic.Compiler.proxy_type import ProxyType +from pyside2uic.Compiler.proxy_type import ProxyType class ProxyBase(object): diff --git a/pysideuic/port_v2/string_io.py b/pyside2uic/port_v2/string_io.py index 4657b52..4657b52 100644 --- a/pysideuic/port_v2/string_io.py +++ b/pyside2uic/port_v2/string_io.py diff --git a/pysideuic/port_v3/__init__.py b/pyside2uic/port_v3/__init__.py index 164c865..164c865 100644 --- a/pysideuic/port_v3/__init__.py +++ b/pyside2uic/port_v3/__init__.py diff --git a/pysideuic/port_v3/as_string.py b/pyside2uic/port_v3/as_string.py index 51acccf..51acccf 100644 --- a/pysideuic/port_v3/as_string.py +++ b/pyside2uic/port_v3/as_string.py diff --git a/pysideuic/port_v3/ascii_upper.py b/pyside2uic/port_v3/ascii_upper.py index 00af8b8..00af8b8 100644 --- a/pysideuic/port_v3/ascii_upper.py +++ b/pyside2uic/port_v3/ascii_upper.py diff --git a/pysideuic/port_v3/invoke.py b/pyside2uic/port_v3/invoke.py index 5128092..81edfb4 100644 --- a/pysideuic/port_v3/invoke.py +++ b/pyside2uic/port_v3/invoke.py @@ -20,7 +20,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA -from pysideuic.exceptions import NoSuchWidgetError +from pyside2uic.exceptions import NoSuchWidgetError def invoke(driver): diff --git a/pysideuic/port_v3/load_plugin.py b/pyside2uic/port_v3/load_plugin.py index b85ec76..3fc4020 100644 --- a/pysideuic/port_v3/load_plugin.py +++ b/pyside2uic/port_v3/load_plugin.py @@ -20,7 +20,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA -from pysideuic.exceptions import WidgetPluginError +from pyside2uic.exceptions import WidgetPluginError def load_plugin(plugin, plugin_globals, plugin_locals): diff --git a/pysideuic/port_v3/proxy_base.py b/pyside2uic/port_v3/proxy_base.py index 928b03f..c24f6ab 100644 --- a/pysideuic/port_v3/proxy_base.py +++ b/pyside2uic/port_v3/proxy_base.py @@ -20,7 +20,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA -from pysideuic.Compiler.proxy_type import ProxyType +from pyside2uic.Compiler.proxy_type import ProxyType class ProxyBase(metaclass=ProxyType): diff --git a/pysideuic/port_v3/string_io.py b/pyside2uic/port_v3/string_io.py index cce6b3a..cce6b3a 100644 --- a/pysideuic/port_v3/string_io.py +++ b/pyside2uic/port_v3/string_io.py diff --git a/pysideuic/properties.py b/pyside2uic/properties.py index 27387fc..f4d3fc2 100644 --- a/pysideuic/properties.py +++ b/pyside2uic/properties.py @@ -24,13 +24,13 @@ import logging import os.path import sys -from pysideuic.exceptions import UnsupportedPropertyError -from pysideuic.icon_cache import IconCache +from pyside2uic.exceptions import UnsupportedPropertyError +from pyside2uic.icon_cache import IconCache if sys.hexversion >= 0x03000000: - from pysideuic.port_v3.ascii_upper import ascii_upper + from pyside2uic.port_v3.ascii_upper import ascii_upper else: - from pysideuic.port_v2.ascii_upper import ascii_upper + from pyside2uic.port_v2.ascii_upper import ascii_upper logger = logging.getLogger(__name__) DEBUG = logger.debug diff --git a/pysideuic/pyside-uic.1 b/pyside2uic/pyside2-uic.1 index 6130d7d..98b4a4e 100644 --- a/pysideuic/pyside-uic.1 +++ b/pyside2uic/pyside2-uic.1 @@ -1,10 +1,10 @@ -.TH PYSIDE-UIC "1" "December 2010" "pyside-uic" "User Commands" +.TH PYSIDE-UIC "1" "December 2010" "pyside2-uic" "User Commands" .SH NAME -pyside\-uic \- DESCRIPTION... +pyside2\-uic \- DESCRIPTION... .SH DESCRIPTION .SS "Usage:" .IP -pyside\-uic [options] <ui\-file> +pyside2\-uic [options] <ui\-file> .SS "Options:" .TP \fB\-\-version diff --git a/pysideuic/uiparser.py b/pyside2uic/uiparser.py index 15421c1..0fd9481 100644 --- a/pysideuic/uiparser.py +++ b/pyside2uic/uiparser.py @@ -31,9 +31,9 @@ except ImportError: from xml.etree.ElementTree import parse, SubElement -from pysideuic.exceptions import NoSuchWidgetError -from pysideuic.objcreator import QObjectCreator -from pysideuic.properties import Properties +from pyside2uic.exceptions import NoSuchWidgetError +from pyside2uic.objcreator import QObjectCreator +from pyside2uic.properties import Properties logger = logging.getLogger(__name__) diff --git a/pysideuic/widget-plugins/qtdeclarative.py b/pyside2uic/widget-plugins/qtdeclarative.py index a4b5284..a4b5284 100644 --- a/pysideuic/widget-plugins/qtdeclarative.py +++ b/pyside2uic/widget-plugins/qtdeclarative.py diff --git a/pysideuic/widget-plugins/qtwebkit.py b/pyside2uic/widget-plugins/qtwebkit.py index f5475c9..f5475c9 100644 --- a/pysideuic/widget-plugins/qtwebkit.py +++ b/pyside2uic/widget-plugins/qtwebkit.py diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c4da74a..c2da412 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,5 @@ find_package(Shiboken2 2.0.0 REQUIRED) add_subdirectory(rcc) -add_test(QWizard ${SHIBOKEN_PYTHON_INTERPRETER} ${CMAKE_SOURCE_DIR}/pyside-uic "${CMAKE_CURRENT_SOURCE_DIR}/qwizard_test.ui") +add_test(QWizard ${SHIBOKEN_PYTHON_INTERPRETER} ${CMAKE_SOURCE_DIR}/pyside2-uic "${CMAKE_CURRENT_SOURCE_DIR}/qwizard_test.ui") set_tests_properties(QWizard PROPERTIES - ENVIRONMENT "PYTHONPATH=$ENV{PYTHONPATH}:${CMAKE_SOURCE_DIR}") + ENVIRONMENT "PYTHONPATH=$ENV{PYTHONPATH}:${CMAKE_SOURCE_DIR}:${CMAKE_CURRENT_SOURCE_DIR}") diff --git a/tests/rcc/CMakeLists.txt b/tests/rcc/CMakeLists.txt index 134896c..70341ab 100644 --- a/tests/rcc/CMakeLists.txt +++ b/tests/rcc/CMakeLists.txt @@ -1,4 +1,3 @@ - macro(ADD_RCC_TEST name pyfile qrcfile) add_test(${name} ${CMAKE_CURRENT_SOURCE_DIR}/run_test.sh ${PYSIDERCC_EXECUTABLE} @@ -9,4 +8,3 @@ endmacro() add_rcc_test(RccTest rcc_test.py example.qrc) add_rcc_test(RccImageTest rcc_image_test.py image.qrc) - diff --git a/tests/rcc/rcc_image_test.py b/tests/rcc/rcc_image_test.py index 136d15e..00015be 100644 --- a/tests/rcc/rcc_image_test.py +++ b/tests/rcc/rcc_image_test.py @@ -1,7 +1,8 @@ import unittest -from PySide.QtGui import QApplication, QPixmap +from PySide2.QtWidgets import QApplication +from PySide2.QtGui import QPixmap import image_rc diff --git a/tests/rcc/rcc_test.py b/tests/rcc/rcc_test.py index 544804f..91b5ca8 100644 --- a/tests/rcc/rcc_test.py +++ b/tests/rcc/rcc_test.py @@ -1,6 +1,6 @@ import os import unittest -from PySide.QtCore import QFile +from PySide2.QtCore import QFile import example_rc class TestRccSimple(unittest.TestCase): diff --git a/tests/rcc/run_test.sh b/tests/rcc/run_test.sh index f3b7882..72c4906 100755 --- a/tests/rcc/run_test.sh +++ b/tests/rcc/run_test.sh @@ -3,11 +3,10 @@ # This is a nasty workaround of a CTest limitation # of setting the environment variables for the test. -# $1: pyside-rcc +# $1: pyside2-rcc # $2: python test # $3: qrc file export PYTHONPATH=$PYTHONPATH:`pwd` $1 -o `basename $3 .qrc`_rc.py $3 -`pkg-config shiboken --variable=python_interpreter` $2 - +`pkg-config shiboken2 --variable=python_interpreter` $2 |