[Kde-bindings] Rescuing PyKDE's twine2 from gitorious

Shaheed Haque srhaque at theiet.org
Fri Apr 3 21:10:22 UTC 2015


Thanks Dennis. I tried the attached patch to get things building, but sadly
to no avail. I've not had a chance to dive into the whys and wherefores,
but thought this might be a useful stepping stone.

(See the patch for instructions)



On 3 April 2015 at 09:41, Dennis Nienhüser <earthwings at gentoo.org> wrote:

> Hi,
>
> Am 01.04.2015 21:43, schrieb Simon Edwards:
>
>> Hello to all those interested in helping PyKDE,
>>
>> As a lot of people have mentioned to me this week, gitorious is going
>> down and twine2 needs to move. ( http://gitorious.org/twine2 ) It is
>> effectively a KDE project and should be moved to KDE's infrastructure
>> and positioned up on projects.kde.org under the "KDE/KDE
>> bindings/Python/twine2".
>>
>
> the KDE git repository twine2 is ready and contains all the code from the
> original gitorious one. I'd suggest to leave a note about the move in the
> gitorious twine2 repository as it will be up for at least two more months
> still. Simon, can you do that?
>
> The KDE twine2 repository is currently located in the playground/bindings
> path [1], pending a KDE Review before moving to kde/kdebindings/python.
> That shouldn't affect development in practice.
>
> Regards,
> Dennis
>
> [1] https://projects.kde.org/projects/playground/bindings/twine2
>
>
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20150403/d5bab760/attachment.html>
-------------- next part --------------
diff --git a/kf5.py b/kf5.py
index 935bed9..11c28a6 100644
--- a/kf5.py
+++ b/kf5.py
@@ -16,6 +16,48 @@
 # along with this program; if not, write to the
 # Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"""    
+    Pre-requisites in addition to cmake, extra-cmake-modules, g++ and so on (Ubuntu package names):
+    
+    1. python-ply
+    
+    2. qt5-qmake
+    
+    3. qtbase5-dev
+    
+    4. sip-dev
+    
+    5. A directory layout like this:
+    
+        source
+            frameworks
+                kitemmodels
+            pykde5
+                cmake
+                sip
+            pyqt5
+            twine2
+                <this file>
+        build
+            frameworks
+            pykde5
+            pyqt5
+            ...
+    
+    Note: the pyqt5 will typically be a link to somethng like PyQt-gpl-5.4.1
+    which is the form currently used by Riverbank for PyQt.
+    
+    6. Configfure and build like this:
+    
+      cd .../build/frameworks/kitemmodels
+      cmake ../../../source/frameworks/kitemmodels/CMakeLists.txt
+      cd .../build/pyqt5
+      python ../../source/pyqt5/configure.py --qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake
+      cd .../build/pykde5
+      python ../../source/twine2/kf5.py
+    
+    The output is a set of files in the source/pykde5 directory.
+"""
 
 import re
 import toolkit
@@ -23,12 +65,17 @@ import qtkde5macros
 import os.path
 import sipsymboldata
 
-outputBaseDirectory = "/home/sbe/devel/git/kde/kdebindings/pykde5"
-cmakelistBaseDirectory = "/home/sbe/devel/git/kde/frameworks"
-kdelibsBuildDirectory = "/home/sbe/devel/git_build/kde/frameworks"
-cmakelistGitBaseDirectory = "/home/sbe/devel/git"
-sipImportDir = "/home/sbe/devel/kdesvninstall/share/sip/PyQt5"
-sipImportDirs = [sipImportDir, outputBaseDirectory+"/sip"]
+TWINE2_SRC = os.path.dirname(os.path.realpath(__file__))
+SRC_BASE_DIR = os.path.dirname(TWINE2_SRC)
+BLD_BASE_DIR = os.path.join(os.path.dirname(SRC_BASE_DIR), "build")
+PYKDE_SRC = os.path.join(SRC_BASE_DIR, "pykde5")
+outputBaseDirectory = PYKDE_SRC
+cmakelistBaseDirectory = os.path.join(SRC_BASE_DIR, "frameworks")
+kdelibsBuildDirectory = os.path.join(BLD_BASE_DIR, "frameworks")
+cmakelistGitBaseDirectory = PYKDE_SRC
+sipImportDirs = [os.path.join(SRC_BASE_DIR, "pyqt5", "sip"),
+                 os.path.join(BLD_BASE_DIR, "pyqt5", "sip"),
+                 os.path.join(outputBaseDirectory, "sip")]
 
 ###########################################################################
 kauth = toolkit.ModuleGenerator(
@@ -50,7 +97,7 @@ kauth = toolkit.ModuleGenerator(
     bareMacros=qtkde5macros.QtBareMacros(["KAUTH_EXPORT"]),
     
     # Sip generation
-    sipImportDirs=[sipImportDir],
+    sipImportDirs=sipImportDirs,
     sipImports=["QtCore/QtCoremod.sip","QtGui/QtGuimod.sip","QtNetwork/QtNetworkmod.sip"],
     copyrightNotice=qtkde5macros.copyrightNotice(),
     exportMacros=["KAUTH_EXPORT"],
@@ -79,7 +126,7 @@ kitemmodels = toolkit.ModuleGenerator(
     bareMacros=qtkde5macros.QtBareMacros(["KITEMMODELS_EXPORT"]),
 
     # Sip generation
-    sipImportDirs=[sipImportDir],
+    sipImportDirs=sipImportDirs,
     sipImports=["QtCore/QtCoremod.sip"],
     copyrightNotice=qtkde5macros.copyrightNotice(),
     exportMacros=["KITEMMODELS_EXPORT"],
@@ -110,7 +157,7 @@ kitemviews = toolkit.ModuleGenerator(
     bareMacros=qtkde5macros.QtBareMacros(["KITEMVIEWS_EXPORT"]),
 
     # Sip generation
-    sipImportDirs=[sipImportDir],
+    sipImportDirs=sipImportDirs,
     sipImports=["QtCore/QtCoremod.sip","QtGui/QtGuimod.sip","QtWidgets/QtWidgetsmod.sip"],
     copyrightNotice=qtkde5macros.copyrightNotice(),
     exportMacros=["KITEMVIEWS_EXPORT"],


More information about the Kde-bindings mailing list