Skip to content

Commit

Permalink
Some minor cleaning up.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Nov 20, 2019
1 parent 561b984 commit f2d16f0
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 31 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Expand Up @@ -1065,9 +1065,8 @@ endif()

# On Linux, our Python package needs to be directly linked to OpenCOR otherwise
# Python extension DSOs can't find symbols
# Note: this is because the lookup scope changes for DSOs that are loaded
# using dlopen()...
# (See https://www.akkadia.org/drepper/dsohowto.pdf)
# Note: this is because the lookup scope changes for DSOs that are loaded using
# dlopen() (see https://www.akkadia.org/drepper/dsohowto.pdf)...

if(NOT WIN32 AND NOT APPLE)
include_directories(${PYTHON_INCLUDE_DIR})
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Expand Up @@ -69,8 +69,8 @@ int main(int pArgC, char *pArgV[])
// (otherwise Python extension DSOs can't find symbols), which can be done
// by setting Py_NoUserSiteDirectory to 1
// Note: this is because the lookup scope changes for DSOs that are loaded
// using dlopen()...
// (See https://www.akkadia.org/drepper/dsohowto.pdf)
// using dlopen() (see
// https://www.akkadia.org/drepper/dsohowto.pdf)...

#ifdef Q_OS_LINUX
Py_NoUserSiteDirectory = 1;
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/support/CellMLSupport/src/cellmlfileruntime.cpp
Expand Up @@ -512,8 +512,8 @@ void CellmlFileRuntime::update(CellmlFile *pCellmlFile, bool pAll)
// the statements that are related to computed variables (since we want to
// be able to recompute those whenever the user modifies a parameter)
// Note: ideally, we wouldn't have to do that, but the CellML API doesn't
// distinguish between 'proper' and 'computed' constants...
// (See https://tracker.physiomeproject.org/show_bug.cgi?id=3499)
// distinguish between 'proper' and 'computed' constants (see
// https://tracker.physiomeproject.org/show_bug.cgi?id=3499)...

static const QRegularExpression InitializationStatementRegEx = QRegularExpression(R"(^(CONSTANTS|RATES|STATES)\[\d*\] = [+-]?\d*\.?\d+([eE][+-]?\d+)?;$)");

Expand Down
Expand Up @@ -34,8 +34,8 @@ PLUGININFO_FUNC PythonPackagesPluginInfo()
{
Descriptions descriptions;

descriptions.insert("en", QString::fromUtf8("a plugin to provide the <a href=\"https://www.python.org/\">Python</a> site-packages."));
descriptions.insert("fr", QString::fromUtf8("une extension ..."));
descriptions.insert("en", QString::fromUtf8("a plugin to access some <a href=\"https://www.python.org/\">Python</a> packages."));
descriptions.insert("fr", QString::fromUtf8(R"(une extension pour accéder des paquets <a href=\"https://www.python.org/\">Python</a>.)"));

return new PluginInfo(PluginInfo::Category::ThirdParty, false, false,
QStringList() << "Python",
Expand Down
22 changes: 11 additions & 11 deletions src/plugins/thirdParty/PythonQt/CMakeLists.txt
Expand Up @@ -27,10 +27,10 @@ string(REPLACE "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/ext"

if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
if(WIN32 OR NOT USE_PREBUILT_PYTHONQT_PACKAGE)
# If not Windows then we only use the Debug library when we are
# actually building PythonQt for debugging
# If we are not on Windows then we only use the debug library when we
# are actually building PythonQt for debugging

set(DEBUG_POSTFIX "_d") # PythonQt uses this for all platforms
set(DEBUG_POSTFIX "_d")
endif()
endif()

Expand Down Expand Up @@ -109,7 +109,7 @@ else()
set(QUIET_MAKE -c)
else()
if(NOT APPLE)
# Make sure correct value of RPATH is set in library
# Make sure that the correct value of RPATH is set

set(QMAKE_LFLAGS_OPTION "QMAKE_LFLAGS+=\\'-Wl,-rpath,\\\$\\\$ORIGIN/../lib\\'")
elseif()
Expand All @@ -126,7 +126,7 @@ else()
set(QMAKE_DEBUG_OPTION)
endif()

# Wrap our WebKit
# Wrap our copy of QtWebKit

set(QMAKE_INCLUDE_PATH "INCLUDEPATH+=${QTWEBKIT_INCLUDE_DIR}")

Expand Down Expand Up @@ -171,7 +171,7 @@ else()
${PROJECT_BINARY_DIR}/build/python.prf
@ONLY)

ExternalProject_Add_Step(${PACKAGE_BUILD} update_configuration
ExternalProject_Add_Step(${PACKAGE_BUILD} updateConfiguration
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/PythonQtOpenCOR.pro
${PACKAGE_BUILD_DIR}/PythonQtOpenCOR.pro
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/build/python.prf
Expand All @@ -196,17 +196,17 @@ else()
set(REAL_FULL_SHARED_LIBRARY ${FULL_LOCAL_EXTERNAL_PACKAGE_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}PythonQt${DEBUG_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}.${LIBRARY_VERSION})
endif()

ExternalProject_Add_Step(${PACKAGE_BUILD} CopyLibrary
ExternalProject_Add_Step(${PACKAGE_BUILD} copyLibrary
COMMAND ${CMAKE_COMMAND} -E remove -f ${FULL_SHARED_LIBRARY}
COMMAND ${CMAKE_COMMAND} -E copy ${REAL_FULL_SHARED_LIBRARY} ${FULL_SHARED_LIBRARY}
DEPENDEES install)

if(APPLE)
# Set RPATH in library to enable linking independent of location
# Set RPATH to enable linking independent of location

ExternalProject_Add_Step(${PACKAGE_BUILD} set_rpath
ExternalProject_Add_Step(${PACKAGE_BUILD} setRpath
COMMAND install_name_tool -id @rpath/${SHARED_LIBRARY} ${FULL_SHARED_LIBRARY}
DEPENDEES CopyLibrary)
DEPENDEES copyLibrary)
endif()

endif()
Expand Down Expand Up @@ -247,7 +247,7 @@ add_plugin(PythonQt
)

# Update our list of Python specific dependencies
# Note: we use COPY_EXTERNAL_BINARIES_TARGET instead of PROJECT_NAME to prevent
# Note: we use COPY_EXTERNAL_BINARIES_TARGET rather than PROJECT_NAME to prevent
# a cyclic dependency...

set(PYTHON_DEPENDENCIES ${PYTHON_DEPENDENCIES} ${COPY_EXTERNAL_BINARIES_TARGET} PARENT_SCOPE)
Expand Up @@ -14,7 +14,7 @@ CONFIG += qt
CONFIG -= flat


# allow to choose static linking through the environment variable PYTHONQT_STATIC
# Allow to choose static linking through the environment variable PYTHONQT_STATIC
PYTHONQT_STATIC = $$(PYTHONQT_STATIC)
isEmpty(PYTHONQT_STATIC) {
CONFIG += dll
Expand Down
11 changes: 5 additions & 6 deletions src/plugins/thirdParty/PythonQt/qmake/build/common.prf.in
@@ -1,18 +1,17 @@

# depending on your Qt configuration, you want to enable or disable
# Depending on your Qt configuration, you want to enable or disable
# one of the release/debug builds (if all three lines are commented,
# the default of your Qt installation will used)

# build with both debug and release mode
# Build with both debug and release mode
#CONFIG += debug_and_release build_all

# build with release mode only
# Build with release mode only
#CONFIG += release

# build with debug mode only
# Build with debug mode only
#CONFIG += debug

# for all debug builds, add "_d" extension to target
# For all debug builds, add "_d" extension to target
CONFIG(debug, debug|release) {
TARGET = $${TARGET}_d
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/thirdParty/PythonQt/qmake/build/python.prf.in
@@ -1,4 +1,4 @@
# profile to include and link Python
# Profile to include and link Python

INCLUDEPATH += @PYTHON_INCLUDE_DIR@
LIBS += @PYTHON_LIBRARY@
@@ -1,4 +1,4 @@
# If Qt has support for webkit, add it:
# If Qt has support for QtWebKit, add it:
qtHaveModule(webkit):CONFIG += PythonQtWebKit

CONFIG += qt
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/thirdParty/PythonQt/src/pythonqtplugin.cpp
Expand Up @@ -38,8 +38,8 @@ PLUGININFO_FUNC PythonQtPluginInfo()
{
Descriptions descriptions;

descriptions.insert("en", QString::fromUtf8("a plugin to allow the use of Qt with Python."));
descriptions.insert("fr", QString::fromUtf8("une extension ..."));
descriptions.insert("en", QString::fromUtf8("a plugin to use <a href=\"https://www.qt.io/\">Qt</a> with <a href=\"https://www.python.org/\">Python</a>."));
descriptions.insert("fr", QString::fromUtf8("un plugin pour utiliser <a href=\"https://www.qt.io/\">Qt</a> avec <a href=\"https://www.python.org/\">Python</a>"));

return new PluginInfo(PluginInfo::Category::ThirdParty, false, false,
QStringList() << "Python",
Expand Down

0 comments on commit f2d16f0

Please sign in to comment.