|
|
3517469 |
From ce17d35586de1b9fdc21e3f8450dd1d2b76d5bcc Mon Sep 17 00:00:00 2001
|
|
|
3517469 |
From: Scott Talbert <swt@techie.net>
|
|
|
3517469 |
Date: Mon, 18 Jan 2021 21:06:46 -0500
|
|
|
3517469 |
Subject: [PATCH] Add support for building with sip 5
|
|
|
3517469 |
|
|
|
3517469 |
---
|
|
|
3517469 |
project.py | 29 +++++++++++++++++++++++++++++
|
|
|
3517469 |
pyproject.toml | 14 ++++++++++++++
|
|
|
3517469 |
src/qhexedit.sip | 2 +-
|
|
|
3517469 |
3 files changed, 44 insertions(+), 1 deletion(-)
|
|
|
3517469 |
create mode 100644 project.py
|
|
|
3517469 |
create mode 100644 pyproject.toml
|
|
|
3517469 |
|
|
|
3517469 |
diff --git a/project.py b/project.py
|
|
|
3517469 |
new file mode 100644
|
|
|
3517469 |
index 0000000..c9ee67f
|
|
|
3517469 |
--- /dev/null
|
|
|
3517469 |
+++ b/project.py
|
|
|
3517469 |
@@ -0,0 +1,29 @@
|
|
|
3517469 |
+"""The build configuration file for QHexEdit, used by sip."""
|
|
|
3517469 |
+
|
|
|
3517469 |
+import os
|
|
|
3517469 |
+from os.path import abspath, join
|
|
|
3517469 |
+from sipbuild import Option
|
|
|
3517469 |
+from pyqtbuild import PyQtBindings, PyQtProject
|
|
|
3517469 |
+import PyQt5
|
|
|
3517469 |
+
|
|
|
3517469 |
+
|
|
|
3517469 |
+class QHexEditProject(PyQtProject):
|
|
|
3517469 |
+ """The QHexEdit Project class."""
|
|
|
3517469 |
+
|
|
|
3517469 |
+ def __init__(self):
|
|
|
3517469 |
+ super().__init__()
|
|
|
3517469 |
+ self.bindings_factories = [QHexEditBindings]
|
|
|
3517469 |
+
|
|
|
3517469 |
+ def update(self, tool):
|
|
|
3517469 |
+ """Allows SIP to find PyQt5 .sip files."""
|
|
|
3517469 |
+ super().update(tool)
|
|
|
3517469 |
+ self.sip_include_dirs.append(join(PyQt5.__path__[0], 'bindings'))
|
|
|
3517469 |
+
|
|
|
3517469 |
+
|
|
|
3517469 |
+class QHexEditBindings(PyQtBindings):
|
|
|
3517469 |
+ """The QHexEdit Bindings class."""
|
|
|
3517469 |
+
|
|
|
3517469 |
+ def __init__(self, project):
|
|
|
3517469 |
+ super().__init__(project, name='QHexEdit',
|
|
|
3517469 |
+ sip_file='qhexedit.sip',
|
|
|
3517469 |
+ qmake_QT=['widgets'])
|
|
|
3517469 |
diff --git a/pyproject.toml b/pyproject.toml
|
|
|
3517469 |
new file mode 100644
|
|
|
3517469 |
index 0000000..b5edaa4
|
|
|
3517469 |
--- /dev/null
|
|
|
3517469 |
+++ b/pyproject.toml
|
|
|
3517469 |
@@ -0,0 +1,14 @@
|
|
|
3517469 |
+[build-system]
|
|
|
3517469 |
+requires = ["sip >=5", "PyQt-builder", "PyQt5"]
|
|
|
3517469 |
+build-backend = "sipbuild.api"
|
|
|
3517469 |
+
|
|
|
3517469 |
+[tool.sip.metadata]
|
|
|
3517469 |
+name = "QHexEdit"
|
|
|
3517469 |
+version = "0.8.9"
|
|
|
3517469 |
+
|
|
|
3517469 |
+[tools.sip]
|
|
|
3517469 |
+abi-version = "12.8"
|
|
|
3517469 |
+project-factory = "pyqtbuild:PyQtProject"
|
|
|
3517469 |
+
|
|
|
3517469 |
+[tool.sip.project]
|
|
|
3517469 |
+sip-files-dir = "src"
|
|
|
3517469 |
diff --git a/src/qhexedit.sip b/src/qhexedit.sip
|
|
|
3517469 |
index f7db293..6d4ebae 100644
|
|
|
3517469 |
--- a/src/qhexedit.sip
|
|
|
3517469 |
+++ b/src/qhexedit.sip
|
|
|
3517469 |
@@ -1,4 +1,4 @@
|
|
|
3517469 |
-%Module(name=qhexedit, version=1)
|
|
|
3517469 |
+%Module(name=qhexedit)
|
|
|
3517469 |
|
|
|
3517469 |
%Import QtCore/QtCoremod.sip
|
|
|
3517469 |
%Import QtGui/QtGuimod.sip
|
|
|
3517469 |
--
|
|
|
3517469 |
2.31.1
|
|
|
3517469 |
|